فهرست منبع

http://192.168.0.21/index.php?m=bug&f=view&bugID=43452

lyhzzz 1 سال پیش
والد
کامیت
1973bd7914
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      src/main/java/com/fdkankan/ucenter/service/impl/AppCameraService.java

+ 3 - 3
src/main/java/com/fdkankan/ucenter/service/impl/AppCameraService.java

@@ -84,6 +84,9 @@ public class AppCameraService {
         if(cameraDetail == null){
             throw new BusinessException(AppConstant.FAILURE_CODE_4010, AppConstant.FAILURE_MSG_4010);
         }
+        if(cameraDetail.getCompanyId()!=null){
+            throw new BusinessException(CameraConstant.FAILURE_CODE_6006, CameraConstant.FAILURE_MSG_6006);
+        }
         Set<Long> roleIds = userRoleService.getByUser(user);
         if(!roleIds.contains(5L) && !roleIds.contains(6L) && !roleIds.contains(1L)){
             Long countByUserId = cameraDetailService.getCountByUserId(user.getId());
@@ -91,9 +94,6 @@ public class AppCameraService {
                 throw new BusinessException(CameraConstant.FAILURE_CODE_6031, CameraConstant.FAILURE_MSG_6031);
             }
         }
-        if(cameraDetail.getCompanyId()!=null){
-            throw new BusinessException(CameraConstant.FAILURE_CODE_6006, CameraConstant.FAILURE_MSG_6006);
-        }
         List<Long> cameraIds = Collections.singletonList(camera.getId());
 
         LambdaUpdateWrapper<Camera> wrapper = new LambdaUpdateWrapper<>();