!119 系统用户自定义导入时初始密码加密优化

Merge pull request !119 from zendwang/dev
feature/model
疯狂的狮子Li 3 years ago committed by Gitee
commit 14a05ddaca

@ -39,9 +39,9 @@ public class SysUserImportListener extends AnalysisEventListener<SysUserImportVo
private final StringBuilder failureMsg = new StringBuilder();
public SysUserImportListener(Boolean isUpdateSupport) {
String initPassword = SpringUtils.getBean(ISysConfigService.class).selectConfigByKey("sys.user.initPassword");
this.userService = SpringUtils.getBean(ISysUserService.class);
this.password = SpringUtils.getBean(ISysConfigService.class)
.selectConfigByKey("sys.user.initPassword");
this.password = SecurityUtils.encryptPassword(initPassword);
this.isUpdateSupport = isUpdateSupport;
this.operName = SecurityUtils.getUsername();
}
@ -53,7 +53,7 @@ public class SysUserImportListener extends AnalysisEventListener<SysUserImportVo
// 验证是否存在这个用户
if (StringUtils.isNull(user)) {
user = BeanUtil.toBean(userVo, SysUser.class);
user.setPassword(SecurityUtils.encryptPassword(password));
user.setPassword(password);
user.setCreateBy(operName);
userService.insertUser(user);
successNum++;

Loading…
Cancel
Save