tao.mo

manager-server | 修改 |

FCL登录获取ean信息
mt
2025年5月27日17:15:01
......@@ -124,12 +124,14 @@ public class LoginControllerUtils {
*/
try{
ResponseEntity<String> resp = restTemplate.exchange(propertiesConfig.getUserShippingaccountsUrl(), HttpMethod.GET, entity, String.class);
log.info("apiExchange | resp: {}", JSON.toJSONString(resp));
FclEanTwoResponseVo fclAccountsResponse = JSON.parseObject(resp.getBody(), FclEanTwoResponseVo.class);
EanTwoVo eanInfo = this.getEanByEanTwoApi(fclAccountsResponse);
String ext1 = eanInfo.getDefaultEanInfo();
String ext2 = eanInfo.getAccountNumberInfo();
shipperAccountApi1 = (StringUtils.isNotEmpty(ext1) && StringUtils.isNotEmpty(ext2)) ? ext1 + "," + ext2 :
(StringUtils.isNotEmpty(ext1) ? ext1 : (StringUtils.isNotEmpty(ext2) ? ext2 : ""));
log.info("shipperAccountApi1 - getShipperAccount : {}",shipperAccountApi1);
}catch(Exception ex){
log.error("getShipperAccount api1 | fdxLogin: {}, secretValue: {} url: {}, userId: {} |具体原因: "
, fclInfoDto.getFdxLogin(), fclInfoDto.getOAuthSecret(), propertiesConfig.getUserInfoUrl(),fclInfoDto.getUserId());
......@@ -141,8 +143,10 @@ public class LoginControllerUtils {
*/
try{
ResponseEntity<String> resp = restTemplate.exchange(propertiesConfig.getUserAccountUrl(), HttpMethod.GET, entity, String.class);
log.info("apiExchange | resp: {}", JSON.toJSONString(resp));
FCLAccountsResponseVo fclAccountsResponseVo = JSON.parseObject(resp.getBody(), FCLAccountsResponseVo.class);
shipperAccountApi2 = this.getEANInfo(fclAccountsResponseVo);
log.info("shipperAccountApi2 - getShipperAccount : {}",shipperAccountApi2);
}catch(Exception ex){
log.error("getShipperAccount api2 | fdxLogin: {}, secretValue: {} url: {}, userId: {} |具体原因: "
, fclInfoDto.getFdxLogin(), fclInfoDto.getOAuthSecret(), propertiesConfig.getUserInfoUrl(),fclInfoDto.getUserId());
......