!388 fix 用户注入 create_by 字段为空 NPE

Merge pull request !388 from Mac666/N/A
This commit is contained in:
lengleng 2023-08-08 05:24:11 +00:00 committed by Gitee
commit 6a9fc60e2b
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);
// 保存用户岗位信息