lyhzzz 9 hónapja
szülő
commit
9b0ac3f074

+ 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();