...
|
...
|
@@ -110,7 +110,9 @@ public class UpSoftAccountController { |
|
|
public ResponseEntity<ResultModel> modpwd(@CurrentAdmin XklAdminEntity admin, @RequestParam String newpwd) {
|
|
|
Assert.notNull(newpwd, "password can not be empty");
|
|
|
String salt = SecurityTool.genSalt();
|
|
|
String pass2Db = SecurityTool.getPassword(admin.getAccount(), newpwd, salt);
|
|
|
String adminType = Integer.toString(admin.getType());
|
|
|
String str = admin.getAccount() + newpwd + adminType + salt; // 构建待加密字符串
|
|
|
String pass2Db = SecurityTool.encode(SecurityTool.ALGORITHM_MD5, str);
|
|
|
admin.setPwd(pass2Db);
|
|
|
admin.setSalt(salt);
|
|
|
adminRepository.save(admin);
|
...
|
...
|
|