|
|
@@ -551,7 +551,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
if (user.getDeptName()!=null){
|
|
|
SysDept sysDept = deptService.selectByDepName(user.getDeptName(), company);
|
|
|
if (sysDept !=null){
|
|
|
- user.setDeptId(sysDept.getDeptId());
|
|
|
+ throw new ServiceException("部门数据异常,找不到部门");
|
|
|
}
|
|
|
}
|
|
|
userMapper.insertUser(user);
|
|
|
@@ -580,11 +580,10 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
user.setSuperiorId(sysUser.getUserId());
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
if (user.getDeptName()!=null&&!user.getDeptName().equals(u.getDeptName())){
|
|
|
SysDept sysDept = deptService.selectByDepName(user.getDeptName(), company);
|
|
|
if (sysDept !=null){
|
|
|
- user.setDeptId(sysDept.getDeptId());
|
|
|
+ throw new ServiceException("部门数据异常,找不到部门");
|
|
|
}
|
|
|
}
|
|
|
if (user.getRoleName()!=null&&!user.getRoleName().equals(u.getRoleName())){
|
|
|
@@ -600,7 +599,6 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
userRoleMapper.batchUserRole(list);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
userMapper.updateUser(user);
|
|
|
successNum++;
|
|
|
successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 更新成功");
|