fix:新增defaultPassword配置项,创建用户接口改为默认配置密码

This commit is contained in:
orgin 2023-05-12 15:43:51 +08:00
parent 4db2a9df4b
commit c65e9b72a7
2 changed files with 18 additions and 12 deletions
jeecg-module-system
jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller
jeecg-system-start/src/main/resources

View File

@ -89,6 +89,9 @@ public class SysUserController {
@Value("${jeecg.path.upload}")
private String upLoadPath;
@Value("${system.auth.defaultPassword}")
private String defaultPassword;
@Autowired
private BaseCommonService baseCommonService;
@ -159,7 +162,7 @@ public class SysUserController {
user.setCreateTime(new Date());//设置创建时间
String salt = oConvertUtils.randomGen(8);
user.setSalt(salt);
String passwordEncode = PasswordUtil.encrypt(user.getUsername(), user.getPassword(), salt);
String passwordEncode = PasswordUtil.encrypt(user.getUsername(), defaultPassword, salt);
user.setPassword(passwordEncode);
user.setStatus(1);
user.setDelFlag(CommonConstant.DEL_FLAG_0);

View File

@ -292,3 +292,6 @@ third-app:
# appSecret
client-secret: ??
agent-id: ??
system:
auth:
defaultPassword: 123456