feat: 管理员账号密码固定为admin888
This commit is contained in:
+6
-1
@@ -230,7 +230,12 @@ public class SysUserController {
|
|||||||
user.setCreateTime(new Date());//设置创建时间
|
user.setCreateTime(new Date());//设置创建时间
|
||||||
String salt = RandomUtil.randomString(8);
|
String salt = RandomUtil.randomString(8);
|
||||||
user.setSalt(salt);
|
user.setSalt(salt);
|
||||||
String passwordEncode = PasswordUtil.encrypt(user.getUsername(), password, salt);
|
String passwordEncode = "";
|
||||||
|
if ("admin".equals(user.getUserType())) {
|
||||||
|
passwordEncode = PasswordUtil.encrypt(user.getUsername(), "admin888", salt);
|
||||||
|
} else {
|
||||||
|
passwordEncode = PasswordUtil.encrypt(user.getUsername(), password, salt);
|
||||||
|
}
|
||||||
user.setPassword(passwordEncode);
|
user.setPassword(passwordEncode);
|
||||||
user.setStatus(1);
|
user.setStatus(1);
|
||||||
user.setDelFlag(CommonConstant.DEL_FLAG_0);
|
user.setDelFlag(CommonConstant.DEL_FLAG_0);
|
||||||
|
|||||||
Reference in New Issue
Block a user