lyhzzz 9 달 전
부모
커밋
9b0ac3f074
1개의 변경된 파일14개의 추가작업 그리고 1개의 파일을 삭제
  1. 14 1
      src/main/java/com/fdkankan/manage/service/impl/JyUserPlatformServiceImpl.java

+ 14 - 1
src/main/java/com/fdkankan/manage/service/impl/JyUserPlatformServiceImpl.java

@@ -293,8 +293,21 @@ public class JyUserPlatformServiceImpl extends ServiceImpl<IJyUserPlatformMapper
             throw new BusinessException(ResultCode.ID_CARD_EXIT);
         }
         JyUser byIdCard1 = jyUserService.getByIdCard(param.getIdCard());
+        if(byIdCard1 != null && byIdCard1.getPlatformId()!=null ){
+            SysUser byId = sysUserService.getById(byIdCard1.getSysUserId());
+            if(byId.getRoleId() == 48L){
+                throw new BusinessException(ResultCode.PLATFORM_USER_ADDERROR);
+            }
+        }
+        if(byIdCard1!= null && byIdCard1.getStatus() !=1){
+            throw new BusinessException(ResultCode.USER_BAN);
+        }
         if(byIdCard1 != null){
-            throw new BusinessException(ResultCode.ID_CARD_EXIT);
+            JyUserPlatformAddParam param1 = new JyUserPlatformAddParam();
+            param1.setId(byIdCard1.getId());
+            param1.setStatus(byIdCard1.getStatus());
+            addByParam(param1);
+            return;
         }
 
         JyPlatformUserWait jyPlatformUserWait = new JyPlatformUserWait();