Browse Source

时间排序

lyhzzz 1 year ago
parent
commit
8b4bee7f53

+ 1 - 0
src/main/java/com/fdkankan/manage/common/ResultCode.java

@@ -78,6 +78,7 @@ public enum ResultCode  {
     SS_SCENE_DOWN_ERROR(60011, "深时点云场景下载失败"),
     COPY_NUM_NOT_GEN_OBJ(60012, "复制场景不支持生成 Obj"),
     SHARE_USER_ERROR(60013, "该用户已共享"),
+    SHARE_ERROR(60014, "无需分享给自己"),
 
 
     ;

+ 3 - 0
src/main/java/com/fdkankan/manage/service/impl/JyUserShareServiceImpl.java

@@ -81,6 +81,9 @@ public class JyUserShareServiceImpl extends ServiceImpl<IJyUserShareMapper, JyUs
         if(mainUser == null){
             throw new BusinessException(ResultCode.USER_NOT_EXIST);
         }
+        if(mainUser.getId().equals(jyUserId)){
+            throw new BusinessException(ResultCode.SHARE_ERROR);
+        }
         JyUserShare jyUserShare = this.getByMainUserIdAndUserId(mainUser.getId(),jyUserId);
         if(jyUserShare != null){
             throw new BusinessException(ResultCode.SHARE_USER_ERROR);