lyhzzz 2 년 전
부모
커밋
7046f2158b

+ 3 - 0
src/main/java/com/fdkankan/ucenter/constant/LoginConstant.java

@@ -118,4 +118,7 @@ public class LoginConstant {
     public static final int FAILURE_CODE_3036 = 3036;
     public static final String FAILURE_MSG_3036= "文本超过长度限制";
 
+    public static final int FAILURE_CODE_3037 = 3037;
+    public static final String FAILURE_MSG_3037= "上传失败,登录账号未绑定当前相机";
+
 }

+ 1 - 1
src/main/java/com/fdkankan/ucenter/controller/app/AppController.java

@@ -169,7 +169,7 @@ public class AppController extends BaseController {
                 return Result.failure(CameraConstant.FAILURE_CODE_6003, CameraConstant.FAILURE_MSG_6003);
             }
             if(roleIds.contains(8L) && ( detailEntity.getUserId()== null || !detailEntity.getUserId().equals(user.getId()))){
-                return Result.failure(CameraConstant.FAILURE_CODE_6003, CameraConstant.FAILURE_MSG_6003);
+                return Result.failure(LoginConstant.FAILURE_CODE_3037, LoginConstant.FAILURE_MSG_3037);
             }
         }
         if(!redisUtil.hasKey(RedisKeyUtil.PREFIX_CACHE_CAMERA + username)){

+ 2 - 2
src/main/java/com/fdkankan/ucenter/service/impl/AppService.java

@@ -147,7 +147,7 @@ public class AppService {
         }
         Long userId = commonCheckCamera(param);
         if(userId == null){
-            throw new BusinessException(LoginConstant.FAILURE_CODE_3016, LoginConstant.FAILURE_MSG_3016);
+            throw new BusinessException(LoginConstant.FAILURE_CODE_3037, LoginConstant.FAILURE_MSG_3037);
         }
         String redisValue = "";
         User user = userService.getById(userId);
@@ -156,7 +156,7 @@ public class AppService {
         }
         redisValue = JSONObject.toJSONString(user);
         if(!stripeService.checkUserStripePay(user.getId(),user.getUserName())){
-            throw new BusinessException(LoginConstant.FAILURE_CODE_3016, LoginConstant.FAILURE_MSG_3016);
+            throw new BusinessException(LoginConstant.FAILURE_CODE_3037, LoginConstant.FAILURE_MSG_3037);
         }
         String token = redisLogin(param.getAppUserName(),redisValue, 604800L);
         JSONObject obj = new JSONObject();