浏览代码

修改微信登录失败直接报错

marxjaw 2 月之前
父节点
当前提交
12413c8bd2
共有 27 个文件被更改,包括 123 次插入99 次删除
  1. 5 4
      yt-adage/adage-service/src/main/java/com/ytpm/adage/controller/WxController.java
  2. 5 4
      yt-algebraic/algebraic-service/src/main/java/com/ytpm/algebraic/controller/WxController.java
  3. 5 4
      yt-allusion/allusion-service/src/main/java/com/ytpm/allusion/controller/WxController.java
  4. 5 4
      yt-answer/answer-service/src/main/java/com/ytpm/answer/controller/WxController.java
  5. 5 4
      yt-app/app-service/src/main/java/com/ytpm/controller/dyz/WxController.java
  6. 1 1
      yt-app/app-service/src/main/java/com/ytpm/controller/nofeeds/NfWxController.java
  7. 1 1
      yt-app/app-service/src/main/java/com/ytpm/controller/qnjz/QnWxController.java
  8. 5 4
      yt-arithmetic/arithmetic-service/src/main/java/com/ytpm/arithmetic/controller/WxController.java
  9. 5 4
      yt-calculator/calculator-service/src/main/java/com/ytpm/calculator/controller/WxController.java
  10. 5 4
      yt-carp/carp-service/src/main/java/com/ytpm/carp/controller/WxController.java
  11. 5 4
      yt-countstep/countstep-service/src/main/java/com/ytpm/countstep/controller/WxController.java
  12. 5 4
      yt-diary/diary-service/src/main/java/com/ytpm/diary/controller/WxController.java
  13. 5 4
      yt-dtw/dtw-service/src/main/java/com/ytpm/dtw/controller/WxController.java
  14. 5 4
      yt-emoticons/emoticons-service/src/main/java/com/ytpm/emoticons/controller/WxController.java
  15. 5 4
      yt-funarith/funarith-service/src/main/java/com/ytpm/funarith/controller/WxController.java
  16. 5 4
      yt-idiom/idiom-service/src/main/java/com/ytpm/idiom/controller/WxController.java
  17. 5 4
      yt-irun/irun-service/src/main/java/com/ytpm/irun/controller/WxController.java
  18. 5 4
      yt-lemon/lemon-service/src/main/java/com/ytpm/lemon/controller/WxController.java
  19. 5 4
      yt-lime/lime-service/src/main/java/com/ytpm/lime/controller/WxController.java
  20. 5 4
      yt-mileage/mileage-service/src/main/java/com/ytpm/mileage/controller/WxController.java
  21. 5 4
      yt-nofeeds/nofeeds-service/src/main/java/com/ytpm/nofeeds/controller/WxController.java
  22. 1 1
      yt-nofeeds/nofeeds-service/src/main/resources/bootstrap.yml
  23. 5 4
      yt-picking/picking-service/src/main/java/com/ytpm/picking/controller/WxController.java
  24. 5 4
      yt-raisepig/raisepig-service/src/main/java/com/ytpm/raisepig/controller/WxController.java
  25. 5 4
      yt-summary/summary-service/src/main/java/com/ytpm/summary/controller/WxController.java
  26. 5 4
      yt-vitality/vitality-service/src/main/java/com/ytpm/vitality/controller/WxController.java
  27. 5 4
      yt-walk/walk-service/src/main/java/com/ytpm/walk/controller/WxController.java

+ 5 - 4
yt-adage/adage-service/src/main/java/com/ytpm/adage/controller/WxController.java

@@ -18,6 +18,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-algebraic/algebraic-service/src/main/java/com/ytpm/algebraic/controller/WxController.java

@@ -18,6 +18,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-allusion/allusion-service/src/main/java/com/ytpm/allusion/controller/WxController.java

@@ -18,6 +18,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-answer/answer-service/src/main/java/com/ytpm/answer/controller/WxController.java

@@ -18,6 +18,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-app/app-service/src/main/java/com/ytpm/controller/dyz/WxController.java

@@ -19,6 +19,7 @@ import com.ytpm.dao.qnmjz.QnmUserMapper;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import com.ytpm.app.model.YtDyzPowerRecord;
 import com.ytpm.app.model.YtDyzUser;
@@ -68,16 +69,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -85,7 +86,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 1 - 1
yt-app/app-service/src/main/java/com/ytpm/controller/nofeeds/NfWxController.java

@@ -72,7 +72,7 @@ public class NfWxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(result.getCode(),result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 1 - 1
yt-app/app-service/src/main/java/com/ytpm/controller/qnjz/QnWxController.java

@@ -73,7 +73,7 @@ public class QnWxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(result.getCode(),result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-arithmetic/arithmetic-service/src/main/java/com/ytpm/arithmetic/controller/WxController.java

@@ -18,6 +18,7 @@ import com.ytpm.arithmetic.service.AppUserService;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-calculator/calculator-service/src/main/java/com/ytpm/calculator/controller/WxController.java

@@ -18,6 +18,7 @@ import com.ytpm.calculator.service.AppUserService;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-carp/carp-service/src/main/java/com/ytpm/carp/controller/WxController.java

@@ -18,6 +18,7 @@ import com.ytpm.carp.service.AppUserService;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-countstep/countstep-service/src/main/java/com/ytpm/countstep/controller/WxController.java

@@ -18,6 +18,7 @@ import com.ytpm.countstep.service.AppUserService;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-diary/diary-service/src/main/java/com/ytpm/diary/controller/WxController.java

@@ -18,6 +18,7 @@ import com.ytpm.diary.service.AppUserService;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-dtw/dtw-service/src/main/java/com/ytpm/dtw/controller/WxController.java

@@ -18,6 +18,7 @@ import com.ytpm.dtw.service.AppUserService;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-emoticons/emoticons-service/src/main/java/com/ytpm/emoticons/controller/WxController.java

@@ -18,6 +18,7 @@ import com.ytpm.emoticons.service.AppUserService;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-funarith/funarith-service/src/main/java/com/ytpm/funarith/controller/WxController.java

@@ -18,6 +18,7 @@ import com.ytpm.funarith.service.AppUserService;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-idiom/idiom-service/src/main/java/com/ytpm/idiom/controller/WxController.java

@@ -16,6 +16,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import com.ytpm.idiom.dao.AppUserMapper;
 import com.ytpm.idiom.service.AppUserService;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-irun/irun-service/src/main/java/com/ytpm/irun/controller/WxController.java

@@ -16,6 +16,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import com.ytpm.irun.dao.AppUserMapper;
 import com.ytpm.irun.service.AppUserService;
@@ -59,16 +60,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -76,7 +77,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-lemon/lemon-service/src/main/java/com/ytpm/lemon/controller/WxController.java

@@ -16,6 +16,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import com.ytpm.lemon.dao.AppUserMapper;
 import com.ytpm.lemon.service.AppUserService;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-lime/lime-service/src/main/java/com/ytpm/lime/controller/WxController.java

@@ -16,6 +16,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import com.ytpm.lime.dao.AppUserMapper;
 import com.ytpm.lime.service.AppUserService;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-mileage/mileage-service/src/main/java/com/ytpm/mileage/controller/WxController.java

@@ -16,6 +16,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import com.ytpm.mileage.dao.AppUserMapper;
 import com.ytpm.mileage.service.AppUserService;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-nofeeds/nofeeds-service/src/main/java/com/ytpm/nofeeds/controller/WxController.java

@@ -16,6 +16,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import com.ytpm.nofeeds.dao.AppUserMapper;
 import com.ytpm.nofeeds.service.AppUserService;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 1 - 1
yt-nofeeds/nofeeds-service/src/main/resources/bootstrap.yml

@@ -4,7 +4,7 @@ yt:
   port: 8848
   local: 127.0.0.1
   prod_1: 127.0.0.1
-  prod_2: 146.56.196.49
+  prod_2: 119.45.117.147
 spring:
   profiles:
     active: prod

+ 5 - 4
yt-picking/picking-service/src/main/java/com/ytpm/picking/controller/WxController.java

@@ -16,6 +16,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import com.ytpm.picking.dao.AppUserMapper;
 import com.ytpm.picking.service.AppUserService;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-raisepig/raisepig-service/src/main/java/com/ytpm/raisepig/controller/WxController.java

@@ -16,6 +16,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import com.ytpm.raisepig.dao.AppUserMapper;
 import com.ytpm.raisepig.service.AppUserService;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-summary/summary-service/src/main/java/com/ytpm/summary/controller/WxController.java

@@ -16,6 +16,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import com.ytpm.summary.dao.AppUserMapper;
 import com.ytpm.summary.service.AppUserService;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-vitality/vitality-service/src/main/java/com/ytpm/vitality/controller/WxController.java

@@ -16,6 +16,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import com.ytpm.vitality.dao.AppUserMapper;
 import com.ytpm.vitality.service.AppUserService;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }

+ 5 - 4
yt-walk/walk-service/src/main/java/com/ytpm/walk/controller/WxController.java

@@ -16,6 +16,7 @@ import com.ytpm.app.view.WxUserInfo;
 import com.ytpm.feign.RiskFeign;
 import com.ytpm.general.RepMessage;
 import com.ytpm.general.Result;
+import com.ytpm.general.StatusCode;
 import com.ytpm.handle.CustomerException;
 import com.ytpm.walk.dao.AppUserMapper;
 import com.ytpm.walk.service.AppUserService;
@@ -58,16 +59,16 @@ public class WxController {
         //根据应用获取配置调用微信接口登录
         WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfig(param.getAppType());
         if(Objects.isNull(defaultConfig)){
-            throw new CustomerException("微信登录失败,未找到相应配置!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,未找到相应配置!");
         }
         param.setAppId(defaultConfig.getPlatformAppId());
         WxLoginResult loginResult = getWechatLoginInfo(param.getWxCode(),param.getAppType(),defaultConfig.getAppId(),defaultConfig.getSecret());
         if(Objects.isNull(loginResult)|| StrUtil.isBlank(loginResult.getOpenid())){
-            throw new CustomerException("微信登录失败,请刷新授权码!");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信登录失败,请刷新授权码!");
         }
         WxUserInfo wxUserInfo = getWechatUserInfo(loginResult.getAccess_token(),loginResult.getOpenid());
         if(Objects.isNull(wxUserInfo)) {
-            throw new CustomerException("微信用户登录失败");
+            return new Result<>(StatusCode.ACCESS_ERR,"微信用户登录失败");
         }
         param.setLoginIp(getClientIp(request));
         YtDyzUser old = appUserService.crudForNewTrans(param,wxUserInfo,loginResult);
@@ -75,7 +76,7 @@ public class WxController {
         old.setRiskCode("313");
         Result<?> result = riskFeign.checkRisk(old);
         if(result.getCode()!=200){
-            throw new CustomerException(result.getMessage());
+            return new Result<>(StatusCode.ACCESS_ERR,result.getMessage());
         }
         return Result.resultOk(RepMessage.LOGIN_SUCCESS, old);
     }