Showing
7 changed files
with
43 additions
and
38 deletions
| ... | @@ -7,6 +7,10 @@ import org.springframework.context.annotation.Configuration; | ... | @@ -7,6 +7,10 @@ import org.springframework.context.annotation.Configuration; |
| 7 | @Data | 7 | @Data |
| 8 | @Configuration | 8 | @Configuration |
| 9 | public class PropertiesConfig { | 9 | public class PropertiesConfig { |
| 10 | + | ||
| 11 | + @Value("${fcl.interface.fedex_api_address}") | ||
| 12 | + private String fedexApiAddress; | ||
| 13 | + | ||
| 10 | @Value("${fcl.login.url}") | 14 | @Value("${fcl.login.url}") |
| 11 | private String fclLoginUrl; | 15 | private String fclLoginUrl; |
| 12 | 16 | ... | ... |
| ... | @@ -84,7 +84,7 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { | ... | @@ -84,7 +84,7 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { |
| 84 | //返回匹配出来第一个账户信息 | 84 | //返回匹配出来第一个账户信息 |
| 85 | return Utils.first(resultUserList); | 85 | return Utils.first(resultUserList); |
| 86 | } catch (Exception e){ | 86 | } catch (Exception e){ |
| 87 | - log.error(LogShowModel.showException("Exception",e)); | 87 | + log.error("findUserByFcl error : ",e); |
| 88 | return null; | 88 | return null; |
| 89 | } | 89 | } |
| 90 | } | 90 | } | ... | ... |
| ... | @@ -89,9 +89,9 @@ public class LoginControllerUtils { | ... | @@ -89,9 +89,9 @@ public class LoginControllerUtils { |
| 89 | fclInfoDto.setUserId(userDataApiVo.getUserId()); | 89 | fclInfoDto.setUserId(userDataApiVo.getUserId()); |
| 90 | fclInfoDto.setEmailAddress(userDataApiVo.getEmailAddress()); | 90 | fclInfoDto.setEmailAddress(userDataApiVo.getEmailAddress()); |
| 91 | }catch(Exception ex){ | 91 | }catch(Exception ex){ |
| 92 | - log.error("getFclInfo | fdxLogin: {}, secretValue: {} url: {}, userId: {} |具体原因: " | 92 | + String errorInfo = String.format("getFclInfo | fdxLogin: %s, secretValue: %s url: %s, userId: %s ", |
| 93 | - , fclInfoDto.getFdxLogin(), fclInfoDto.getOAuthSecret(), propertiesConfig.getUserInfoUrl(),fclInfoDto.getUserId()); | 93 | + fclInfoDto.getFdxLogin(), fclInfoDto.getOAuthSecret(), propertiesConfig.getUserInfoUrl(),fclInfoDto.getUserId()); |
| 94 | - ex.printStackTrace(); | 94 | + log.error(errorInfo, ex); |
| 95 | }finally{ | 95 | }finally{ |
| 96 | /** | 96 | /** |
| 97 | * 获取用户计费账号 | 97 | * 获取用户计费账号 |
| ... | @@ -133,9 +133,9 @@ public class LoginControllerUtils { | ... | @@ -133,9 +133,9 @@ public class LoginControllerUtils { |
| 133 | (StringUtils.isNotEmpty(ext1) ? ext1 : (StringUtils.isNotEmpty(ext2) ? ext2 : "")); | 133 | (StringUtils.isNotEmpty(ext1) ? ext1 : (StringUtils.isNotEmpty(ext2) ? ext2 : "")); |
| 134 | log.info("shipperAccountApi1 - getShipperAccount : {}",shipperAccountApi1); | 134 | log.info("shipperAccountApi1 - getShipperAccount : {}",shipperAccountApi1); |
| 135 | }catch(Exception ex){ | 135 | }catch(Exception ex){ |
| 136 | - log.error("getShipperAccount api1 | fdxLogin: {}, secretValue: {} url: {}, userId: {} |具体原因: " | 136 | + String errorInfo = String.format("getShipperAccount api1 | fdxLogin: %s, secretValue: %s url: %s, userId: %s", |
| 137 | - , fclInfoDto.getFdxLogin(), fclInfoDto.getOAuthSecret(), propertiesConfig.getUserInfoUrl(),fclInfoDto.getUserId()); | 137 | + fclInfoDto.getFdxLogin(), fclInfoDto.getOAuthSecret(), propertiesConfig.getUserInfoUrl(),fclInfoDto.getUserId()); |
| 138 | - ex.printStackTrace(); | 138 | + log.error(errorInfo, ex); |
| 139 | } | 139 | } |
| 140 | /** | 140 | /** |
| 141 | * 补偿shipperAccount | 141 | * 补偿shipperAccount |
| ... | @@ -148,9 +148,9 @@ public class LoginControllerUtils { | ... | @@ -148,9 +148,9 @@ public class LoginControllerUtils { |
| 148 | shipperAccountApi2 = this.getEANInfo(fclAccountsResponseVo); | 148 | shipperAccountApi2 = this.getEANInfo(fclAccountsResponseVo); |
| 149 | log.info("shipperAccountApi2 - getShipperAccount : {}",shipperAccountApi2); | 149 | log.info("shipperAccountApi2 - getShipperAccount : {}",shipperAccountApi2); |
| 150 | }catch(Exception ex){ | 150 | }catch(Exception ex){ |
| 151 | - log.error("getShipperAccount api2 | fdxLogin: {}, secretValue: {} url: {}, userId: {} |具体原因: " | 151 | + String errorInfo = String.format("getShipperAccount api2 | fdxLogin: %s, secretValue: %s url: %s, userId: %s", |
| 152 | - , fclInfoDto.getFdxLogin(), fclInfoDto.getOAuthSecret(), propertiesConfig.getUserInfoUrl(),fclInfoDto.getUserId()); | 152 | + fclInfoDto.getFdxLogin(), fclInfoDto.getOAuthSecret(), propertiesConfig.getUserInfoUrl(),fclInfoDto.getUserId()); |
| 153 | - ex.printStackTrace(); | 153 | + log.error(errorInfo, ex); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | /** | 156 | /** |
| ... | @@ -190,7 +190,8 @@ public class LoginControllerUtils { | ... | @@ -190,7 +190,8 @@ public class LoginControllerUtils { |
| 190 | // 将List中的元素用逗号分隔符拼接成一个字符串 | 190 | // 将List中的元素用逗号分隔符拼接成一个字符串 |
| 191 | userEANNumber = String.join(",", uniqueElements); | 191 | userEANNumber = String.join(",", uniqueElements); |
| 192 | }catch (Exception e){ | 192 | }catch (Exception e){ |
| 193 | - log.error("getUniqueStr | eanOneExt1 : {} | eanTwoExt1 : {} | 具体原因: ", eanOneExt1, eanTwoExt1,e); | 193 | + String errorInfo = String.format("getUniqueStr | eanOneExt1 : %s | eanTwoExt1 : %s",eanOneExt1, eanTwoExt1); |
| 194 | + log.error(errorInfo, e); | ||
| 194 | } | 195 | } |
| 195 | return userEANNumber; | 196 | return userEANNumber; |
| 196 | } | 197 | } | ... | ... |
| ... | @@ -31,23 +31,23 @@ export: | ... | @@ -31,23 +31,23 @@ export: |
| 31 | fcl: | 31 | fcl: |
| 32 | login: | 32 | login: |
| 33 | url: | 33 | url: |
| 34 | - https://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnLogin | 34 | + http://127.0.0.1:8083/manager-server/auth/wlgnLogin |
| 35 | - redjrectLogin: https://iclear-connectuat.apac.fedex.com/ipc/#/redjrectLogin | 35 | + redjrectLogin: http://127.0.0.1/ipc/#/redjrectLogin |
| 36 | preClearIndex: | 36 | preClearIndex: |
| 37 | - url: http://iclear-connectuat.apac.fedex.com | 37 | + url: http://127.0.0.1:8083/ipc |
| 38 | interface: | 38 | interface: |
| 39 | logurl: https://www.fedex.com/secure-login/en-us/#/login-credentials?redirectUrl=http://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnForward | 39 | logurl: https://www.fedex.com/secure-login/en-us/#/login-credentials?redirectUrl=http://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnForward |
| 40 | - fedex_api_address: https://api.fedex.com | 40 | + fedex_api_address: https://api.fedex.com.cn |
| 41 | proxy_url: cn2-proxy.apac.fedex.com:3128 | 41 | proxy_url: cn2-proxy.apac.fedex.com:3128 |
| 42 | token: | 42 | token: |
| 43 | - url: /auth/oauth/v2/token | 43 | + url: ${fcl.interface.fedex_api_address}/auth/oauth/v2/token |
| 44 | grant_type : client_credentials | 44 | grant_type : client_credentials |
| 45 | client_id: l7c13f958213e04d1280f807789bd783a3 | 45 | client_id: l7c13f958213e04d1280f807789bd783a3 |
| 46 | client_secret: 3d43932198b6467a8e20d024bfa82e1c | 46 | client_secret: 3d43932198b6467a8e20d024bfa82e1c |
| 47 | scope: oob | 47 | scope: oob |
| 48 | account: | 48 | account: |
| 49 | - url: /user/v2/accounts | 49 | + url: ${fcl.interface.fedex_api_address}/user/v2/accounts |
| 50 | shippingaccounts: | 50 | shippingaccounts: |
| 51 | - url: /administration/v1/users/shippingaccounts | 51 | + url: ${fcl.interface.fedex_api_address}/administration/v1/users/shippingaccounts |
| 52 | userinfo: | 52 | userinfo: |
| 53 | - url: /user/v2/users/userinfo | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 53 | + url: ${fcl.interface.fedex_api_address}/user/v2/users/userinfo | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -30,17 +30,17 @@ fcl: | ... | @@ -30,17 +30,17 @@ fcl: |
| 30 | url: https://exportdeclaration-tw.apac.fedex.com | 30 | url: https://exportdeclaration-tw.apac.fedex.com |
| 31 | interface: | 31 | interface: |
| 32 | logurl: https://www.fedex.com/secure-login/zh-tw/#/login-credentials?redirectUrl=https://exportdeclaration-tw.apac.fedex.com/icleartw/auth/wlgnForward | 32 | logurl: https://www.fedex.com/secure-login/zh-tw/#/login-credentials?redirectUrl=https://exportdeclaration-tw.apac.fedex.com/icleartw/auth/wlgnForward |
| 33 | - fedex_api_address: https://api.fedex.com | 33 | + fedex_api_address: https://api.fedex.com.cn |
| 34 | proxy_url: cn2-proxy.apac.fedex.com:3128 | 34 | proxy_url: cn2-proxy.apac.fedex.com:3128 |
| 35 | token: | 35 | token: |
| 36 | - url: /auth/oauth/v2/token | 36 | + url: ${fcl.interface.fedex_api_address}/auth/oauth/v2/token |
| 37 | grant_type : client_credentials | 37 | grant_type : client_credentials |
| 38 | client_id: l7c13f958213e04d1280f807789bd783a3 | 38 | client_id: l7c13f958213e04d1280f807789bd783a3 |
| 39 | client_secret: 3d43932198b6467a8e20d024bfa82e1c | 39 | client_secret: 3d43932198b6467a8e20d024bfa82e1c |
| 40 | scope: oob | 40 | scope: oob |
| 41 | account: | 41 | account: |
| 42 | - url: /user/v2/accounts | 42 | + url: ${fcl.interface.fedex_api_address}/user/v2/accounts |
| 43 | shippingaccounts: | 43 | shippingaccounts: |
| 44 | - url: /administration/v1/users/shippingaccounts | 44 | + url: ${fcl.interface.fedex_api_address}/administration/v1/users/shippingaccounts |
| 45 | userinfo: | 45 | userinfo: |
| 46 | - url: /user/v2/users/userinfo | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 46 | + url: ${fcl.interface.fedex_api_address}/user/v2/users/userinfo | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -25,23 +25,23 @@ export: | ... | @@ -25,23 +25,23 @@ export: |
| 25 | fcl: | 25 | fcl: |
| 26 | login: | 26 | login: |
| 27 | url: | 27 | url: |
| 28 | - https://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnLogin | 28 | + http://47.103.140.98:7010/manager-server/auth/wlgnLogin |
| 29 | - redjrectLogin: https://iclear-connectuat.apac.fedex.com/ipc/#/redjrectLogin | 29 | + redjrectLogin: http://192.168.1.251/ipc/#/redjrectLogin |
| 30 | preClearIndex: | 30 | preClearIndex: |
| 31 | - url: http://iclear-connectuat.apac.fedex.com | 31 | + url: http://192.168.1.251/ipc |
| 32 | interface: | 32 | interface: |
| 33 | logurl: https://www.fedex.com/secure-login/en-us/#/login-credentials?redirectUrl=http://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnForward | 33 | logurl: https://www.fedex.com/secure-login/en-us/#/login-credentials?redirectUrl=http://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnForward |
| 34 | - fedex_api_address: https://api.fedex.com | 34 | + fedex_api_address: https://api.fedex.com.cn |
| 35 | proxy_url: cn2-proxy.apac.fedex.com:3128 | 35 | proxy_url: cn2-proxy.apac.fedex.com:3128 |
| 36 | token: | 36 | token: |
| 37 | - url: /auth/oauth/v2/token | 37 | + url: ${fcl.interface.fedex_api_address}/auth/oauth/v2/token |
| 38 | grant_type : client_credentials | 38 | grant_type : client_credentials |
| 39 | client_id: l7c13f958213e04d1280f807789bd783a3 | 39 | client_id: l7c13f958213e04d1280f807789bd783a3 |
| 40 | client_secret: 3d43932198b6467a8e20d024bfa82e1c | 40 | client_secret: 3d43932198b6467a8e20d024bfa82e1c |
| 41 | scope: oob | 41 | scope: oob |
| 42 | account: | 42 | account: |
| 43 | - url: /user/v2/accounts | 43 | + url: ${fcl.interface.fedex_api_address}/user/v2/accounts |
| 44 | shippingaccounts: | 44 | shippingaccounts: |
| 45 | - url: /administration/v1/users/shippingaccounts | 45 | + url: ${fcl.interface.fedex_api_address}/administration/v1/users/shippingaccounts |
| 46 | userinfo: | 46 | userinfo: |
| 47 | - url: /user/v2/users/userinfo | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 47 | + url: ${fcl.interface.fedex_api_address}/user/v2/users/userinfo | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -27,20 +27,20 @@ fcl: | ... | @@ -27,20 +27,20 @@ fcl: |
| 27 | https://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnLogin | 27 | https://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnLogin |
| 28 | redjrectLogin: https://iclear-connectuat.apac.fedex.com/ipc/#/redjrectLogin | 28 | redjrectLogin: https://iclear-connectuat.apac.fedex.com/ipc/#/redjrectLogin |
| 29 | preClearIndex: | 29 | preClearIndex: |
| 30 | - url: http://iclear-connectuat.apac.fedex.com | 30 | + url: https://iclear-connectuat.apac.fedex.com/ipc |
| 31 | interface: | 31 | interface: |
| 32 | logurl: https://www.fedex.com/secure-login/en-us/#/login-credentials?redirectUrl=http://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnForward | 32 | logurl: https://www.fedex.com/secure-login/en-us/#/login-credentials?redirectUrl=http://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnForward |
| 33 | - fedex_api_address: https://api.fedex.com | 33 | + fedex_api_address: https://api.fedex.com.cn |
| 34 | proxy_url: cn2-proxy.apac.fedex.com:3128 | 34 | proxy_url: cn2-proxy.apac.fedex.com:3128 |
| 35 | token: | 35 | token: |
| 36 | - url: /auth/oauth/v2/token | 36 | + url: ${fcl.interface.fedex_api_address}/auth/oauth/v2/token |
| 37 | grant_type : client_credentials | 37 | grant_type : client_credentials |
| 38 | client_id: l7c13f958213e04d1280f807789bd783a3 | 38 | client_id: l7c13f958213e04d1280f807789bd783a3 |
| 39 | client_secret: 3d43932198b6467a8e20d024bfa82e1c | 39 | client_secret: 3d43932198b6467a8e20d024bfa82e1c |
| 40 | scope: oob | 40 | scope: oob |
| 41 | account: | 41 | account: |
| 42 | - url: /user/v2/accounts | 42 | + url: ${fcl.interface.fedex_api_address}/user/v2/accounts |
| 43 | shippingaccounts: | 43 | shippingaccounts: |
| 44 | - url: /administration/v1/users/shippingaccounts | 44 | + url: ${fcl.interface.fedex_api_address}/administration/v1/users/shippingaccounts |
| 45 | userinfo: | 45 | userinfo: |
| 46 | - url: /user/v2/users/userinfo | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 46 | + url: ${fcl.interface.fedex_api_address}/user/v2/users/userinfo | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment