lyhzzz 2 miesięcy temu
rodzic
commit
907648f8a4

+ 9 - 9
src/main/java/com/fdkankan/manage/service/impl/UserServiceImpl.java

@@ -225,16 +225,16 @@ public class UserServiceImpl extends ServiceImpl<IUserMapper, User> implements I
         jyUser.setIsJm(param.getIsJm());
         if(param.getIsJm() != null && param.getIsJm() == 1){
             sysUser = sysUserService.getById(sysUser.getId());
-            if(sysUser.getRoleId() != 47L){
+            if(sysUser.getRoleId() == 48L ){
                 sysUserService.updateRoleId(sysUser.getId(),47L);
-            }
-            JyPlatform jyPlatform = jyPlatformService.getByIdCard(jyUser.getIdCard());
-            if(jyPlatform != null && jyPlatform.getStatus() == 0){
-                jyPlatform.setName(null);
-                jyPlatform.setPhone(null);
-                jyPlatform.setIdCard(null);
-                jyPlatform.setUpdateTime(null);
-                jyPlatformService.updateById(jyPlatform);
+                JyPlatform jyPlatform = jyPlatformService.getByIdCard(jyUser.getIdCard());
+                if(jyPlatform != null && jyPlatform.getStatus() == 0){
+                    jyPlatform.setName(null);
+                    jyPlatform.setPhone(null);
+                    jyPlatform.setIdCard(null);
+                    jyPlatform.setUpdateTime(null);
+                    jyPlatformService.updateById(jyPlatform);
+                }
             }
             jyUser.setPlatformId(1);
         }