fix 用户注入 create_by 字段为空 NPE

Signed-off-by: Mac666 <support@mail.pigx.vip>
This commit is contained in:
Mac666 2023-08-08 04:55:21 +00:00 committed by Gitee
parent bd10793118
commit 27f24eb116
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -96,6 +96,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
SysUser sysUser = new SysUser();
BeanUtils.copyProperties(userDto, sysUser);
sysUser.setDelFlag(CommonConstants.STATUS_NORMAL);
sysUser.setCreateBy(userDto.getUsername());
sysUser.setPassword(ENCODER.encode(userDto.getPassword()));
baseMapper.insert(sysUser);
// 保存用户岗位信息