mirror of
https://github.com/jeequan/jeepay
synced 2024-11-17 14:58:04 +08:00
修改了编号的判断, 避免出现数据库服务异常;
This commit is contained in:
parent
5bbfe9c197
commit
2e14783eff
@ -137,6 +137,13 @@ public class SysUserService extends ServiceImpl<SysUserMapper, SysUser> {
|
||||
sysUserAuthService.resetAuthInfo(sysUserId, sysUser.getLoginUsername(), null, null, dbRecord.getSysType());
|
||||
}
|
||||
|
||||
//修改了编号
|
||||
if(StringUtils.isNotEmpty(sysUser.getUserNo()) && dbRecord.getUserNo() != null && !dbRecord.getUserNo().equals(sysUser.getUserNo())){
|
||||
if(count(SysUser.gw().eq(SysUser::getSysType, dbRecord.getSysType()).eq(SysUser::getUserNo, sysUser.getUserNo())) > 0){
|
||||
throw new BizException("该员工编号已关联其他用户!");
|
||||
}
|
||||
}
|
||||
|
||||
//修改用户主表
|
||||
baseMapper.updateById(sysUser);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user