|
|
@@ -172,25 +172,14 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
if (!this.checkUniqueAccount(req.getAccount(), req.getId())) {
|
|
|
throw new CustomException("账号已存在");
|
|
|
}
|
|
|
-// if (!this.checkUniqueEmail(req.getEmail(), req.getId())) {
|
|
|
-// throw new CustomException("邮箱已存在");
|
|
|
-// }
|
|
|
-// if (!this.checkUniquePhone(req.getPhone(), req.getId())) {
|
|
|
-// throw new CustomException("手机号已存在");
|
|
|
-// }
|
|
|
-// if (!this.checkUniqueStaffNumber(req.getStaffNumber(), req.getId())) {
|
|
|
-// throw new CustomException("工号已存在");
|
|
|
-// }
|
|
|
if(req.getIsSys()!=null&&1==req.getIsSys()){
|
|
|
try {
|
|
|
- LoginUser loginUser = (LoginUser) StpUtil.getTokenSession().get(Constants.LOGIN_USER_KEY);
|
|
|
+ LoginUser loginUser =SecurityUtil.getLoginUser();
|
|
|
if(req.getIsSys()==null||!Boolean.TRUE.equals(loginUser.isSys())){
|
|
|
throw new CustomException("当前用户没有操作系统级别用户的权限");
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
-// StpUtil.logout();
|
|
|
throw new CustomException("当前用户没有操作系统级别用户的权限");
|
|
|
-// throw NotLoginException.newInstance("", NotLoginException.DEFAULT_MESSAGE);
|
|
|
}
|
|
|
}
|
|
|
// 当前用户不是超级管理员,不允许修改
|