فهرست منبع

fix 大交管登录接口

459242451@qq.com 2 سال پیش
والد
کامیت
92e4e79442

+ 4 - 2
ruoyi-admin/src/main/resources/application-prod.yml

@@ -134,8 +134,10 @@ third:
   shipEepReportRecInfo: http://198.17.188.111:6201/huiyan/getShipEepReportRec # 船舶进出港记录
   shipBaseInfo: http://198.17.4.8:9004/getInfosByCondition # 船舶基本信息
   shipDynamicInfo: http://198.17.239.239:9004/getInfosByMmsi?mmsi= #船舶动态数据信息
-  userTokenInfo: http://198.17.188.64:80/slipperBack/portal/user/userInfo # 大交管用户信息
-  userLogin: http://198.17.188.64:80/slipperBack/main/mobile/login # 综合平台登录接口
+  #  userTokenInfo: http://198.17.188.64:80/slipperBack/portal/user/userInfo # 大交管用户信息
+  userTokenInfo: http://198.17.48.74:8290/api/portal/user/userInfo # 大交管用户信息
+  nwuserTokenInfo: http://198.17.48.74:8290/api/portal/user/userInfo # 内网大交管用户信息
+  userLogin: http://198.17.48.74:8290/api/main/mobile/login # 综合平台登录接口
 
 system:
   security: third # 走何种校验方式 self自身用户密码校验;third第三方登录校验

+ 1 - 0
ruoyi-admin/src/main/resources/application-test.yml

@@ -131,6 +131,7 @@ third:
   shipBaseInfo: http://198.17.239.239:7001/getInfosByCondition # 船舶基本信息
   shipDynamicInfo: http://198.17.239.239:9004/getInfosByMmsi?mmsi= #船舶动态数据信息
   userTokenInfo: http://36.156.155.131:8099/api/portal/user/userInfo # 大交管用户信息
+  nwuserTokenInfo: http://198.17.48.74:8290/api/portal/user/userInfo # 内网大交管用户信息
   userLogin: http://36.156.155.131:8099/api/main/mobile/login # 总和平台登录接口
 
 system:

+ 10 - 1
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java

@@ -68,6 +68,9 @@ public class SysLoginService {
     @Value("${third.userTokenInfo}")
     private String dajiaoguan_token;
 
+    @Value("${third.nwuserTokenInfo}")
+    private String nwdajiaoguan_token;
+
     /**
      * 登录验证
      *
@@ -156,8 +159,14 @@ public class SysLoginService {
         String password = Constants.DEFAULT_PASSWORD;
         try {
             // 保存用户
+            String loginUserInfoUrl = "";
+            if (IpUtils.innerOutIp()) {
+                loginUserInfoUrl = dajiaoguan_token;
+            } else {
+                loginUserInfoUrl = nwdajiaoguan_token;
+            }
             // 查询第三方用户信息
-            String getResult = HttpUtil.createGet(dajiaoguan_token).header("Authorization", thirdToken).execute().body();
+            String getResult = HttpUtil.createGet(loginUserInfoUrl).header("Authorization", thirdToken).execute().body();
             JSONObject getJson = JSONUtil.parseObj(getResult);
             int infoCode = getJson.getInt("code");
             if (infoCode == 1) {