bugfix 修复获取甬城泊车平台获取令牌错误

This commit is contained in:
Lemon
2023-11-23 11:46:11 +08:00
parent 2d3459c67b
commit 1cf38cd8e4
2 changed files with 27 additions and 5 deletions

View File

@@ -14,6 +14,7 @@ import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
import com.jsowell.thirdparty.lianlian.service.LianLianService;
import com.jsowell.thirdparty.lianlian.util.Cryptos;
import com.jsowell.thirdparty.lianlian.util.Encodes;
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -58,6 +59,24 @@ public class YCBCController extends BaseController {
}
}
/**
* 获取token接口
* http://localhost:8080/ycbc/v1/query_token
*/
@PostMapping("/v1/ycbcQuery_token")
public String ycbcQueryToken(@RequestBody YCBCGetTokenDTO dto) {
logger.info("请求甬城泊车平台令牌 params:{}", JSONObject.toJSONString(dto));
String token = "";
try {
token = ycbcService.YCBCGetToken(dto);
logger.info("请求甬城泊车平台令牌 result:{}", token);
} catch (Exception e) {
logger.error("请求甬城泊车平台令牌接口 异常");
return "";
}
return token;
}
/**
* 甬城泊车平台查询充电站信息