Parcourir la source

用户导入,公司LOGO与名称开发

anderx il y a 2 ans
Parent
commit
3fa7e4aac9

+ 6 - 6
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java

@@ -530,15 +530,15 @@ public class SysUserServiceImpl implements ISysUserService
         {
             try
             {
+                if (StringUtils.isEmpty(user.getDeptName())){
+                    throw  new ServiceException("部门数据异常");
+                }
+                if (StringUtils.isEmpty(user.getFullJob())){
+                    throw  new ServiceException("全职/兼职数据异常");
+                }
                 // 验证是否存在这个用户
                 SysUser u = userMapper.checkJobNumber(user.getJobNumber(),company);
                 if (StringUtils.isNull(u)){
-                    if (StringUtils.isEmpty(user.getDeptName())){
-                        throw  new ServiceException("部门数据异常");
-                    }
-                    if (StringUtils.isEmpty(user.getFullJob())){
-                        throw  new ServiceException("全职/兼职数据异常");
-                    }
                     user.setPassword(SecurityUtils.encryptPassword(password));
                     user.setCreateBy(operName);
                     user.setUserId(null);