|
@@ -420,11 +420,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
errorInfo = errorInfo + "角色选为药企管理员时,组织架构必须为药企!";
|
|
|
}
|
|
|
}
|
|
|
- if (!userDTO.getDeptId().equals(SecurityUtils.getUser().getDeptId())) {
|
|
|
- if (userDTO.getRole().contains(5) || userDTO.getRole().contains(6)) {
|
|
|
- errorInfo = errorInfo + "不能跨机构维护学术推广员!";
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -479,7 +474,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
|
|
|
// 校验部门下是否有启用的用户
|
|
|
int count = count(Wrappers.<SysUser>lambdaQuery().eq(SysUser::getUsername, username)
|
|
|
- .eq(SysUser::getLockFlag, LockEnum.UN_LOCK).eq(SysUser::getDelFlag, DelEnum.NOT_DEL));
|
|
|
+ .eq(SysUser::getDeptId,creator.getDeptId())
|
|
|
+ .eq(SysUser::getLockFlag, LockEnum.UN_LOCK.val()).eq(SysUser::getDelFlag, DelEnum.NOT_DEL.val()));
|
|
|
if (count != 0) {
|
|
|
log.info("手机号被占用");
|
|
|
errorMap(errorMap, "手机号被占用", commonUserDTO.getId());
|