Ver código fonte

协作改造

dengsixing 4 meses atrás
pai
commit
b31a9ff231

+ 5 - 2
src/main/java/com/fdkankan/scene/entity/SceneCooperation.java

@@ -12,10 +12,10 @@ import lombok.Setter;
 
 /**
  * <p>
- * 
+ *
  * </p>
  *
- * @author 
+ * @author
  * @since 2022-07-04
  */
 @Getter
@@ -50,5 +50,8 @@ public class SceneCooperation implements Serializable {
     @TableField("rec_status")
     private String recStatus;
 
+    @TableField("scene_type")
+    private String sceneType;
+
 
 }

+ 2 - 1
src/main/java/com/fdkankan/scene/service/impl/SceneCooperationServiceImpl.java

@@ -30,6 +30,7 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
         return this.getOne(
                 new LambdaQueryWrapper<SceneCooperation>()
                         .eq(SceneCooperation::getSceneNum, num)
-                        .eq(SceneCooperation::getUserId, userId));
+                        .eq(SceneCooperation::getUserId, userId)
+                        .eq(SceneCooperation::getSceneType, "mesh"));
     }
 }

+ 0 - 21
src/main/java/com/fdkankan/scene/service/impl/SceneEditServiceImpl.java

@@ -180,9 +180,6 @@ public class SceneEditServiceImpl implements ISceneEditService {
         sceneAuthVO.setIsExpired(isExpired);
         sceneAuthVO.setIsVip(isVip);
 
-        //判断过期时间
-        Date date = DateUtil.parse(expectedTime, DateExtUtil.dateStyle);
-
         if(camera != null){
             if(!scenePlus.getCameraId().equals(camera.getId())){
                 throw new BusinessException(ErrorCode.FAILURE_CODE_5014);
@@ -199,24 +196,6 @@ public class SceneEditServiceImpl implements ISceneEditService {
         }
 
         User user = userService.findByUserName(username);
-        if("18750226207".equals(username)){
-            log.info("18750226207该账号默认超级管理员,可以操作所有场景");
-        } else if(user == null || scenePlus.getUserId() == null || user.getId().longValue() != scenePlus.getUserId().longValue()){
-            log.info("user:" + user.getId() + ",scene:" + scenePlus.getUserId());
-
-            List<SceneCooperation> list =
-                sceneCooperationService.list(
-                    new LambdaQueryWrapper<SceneCooperation>()
-                        .eq(SceneCooperation::getSceneNum, num));
-            if(list != null && list.size() > 0){
-                if(list.get(0).getUserId().longValue() != user.getId().longValue()){
-                    throw new BusinessException(ErrorCode.FAILURE_CODE_5014);
-                }
-            }else {
-                throw new BusinessException(ErrorCode.FAILURE_CODE_5014);
-            }
-        }
-
         if(scenePlus.getCameraId() != null){
             camera = cameraService.getById(scenePlus.getCameraId());
             if(camera != null){