Merge branch 'zhaoyue-dev3' into 'master'
MOD admin pass See merge request !34
Showing
2 changed files
with
11 additions
and
1 deletions
@@ -68,8 +68,10 @@ public class UpSoftAccountController { | @@ -68,8 +68,10 @@ public class UpSoftAccountController { | ||
68 | return new ResponseEntity<>(ResultModel.error(ResultStatus.USERNAME_OR_PASSWORD_ERROR), HttpStatus.OK); | 68 | return new ResponseEntity<>(ResultModel.error(ResultStatus.USERNAME_OR_PASSWORD_ERROR), HttpStatus.OK); |
69 | } | 69 | } |
70 | String salt = admin.getSalt(); | 70 | String salt = admin.getSalt(); |
71 | + String adminType = Integer.toString(admin.getType()); | ||
72 | + String str = account + password + adminType + salt; // 构建待加密字符串 | ||
73 | + String calcuPass = SecurityTool.encode(SecurityTool.ALGORITHM_MD5, str); | ||
71 | String pass_in_db = admin.getPwd(); | 74 | String pass_in_db = admin.getPwd(); |
72 | - String calcuPass = SecurityTool.getPassword(account, password, salt); | ||
73 | if (!calcuPass.equals(pass_in_db) ||//密码错误 | 75 | if (!calcuPass.equals(pass_in_db) ||//密码错误 |
74 | admin.getStatus() != 1) {//用户无效 | 76 | admin.getStatus() != 1) {//用户无效 |
75 | //提示用户名或密码错误 | 77 | //提示用户名或密码错误 |
@@ -84,4 +84,12 @@ public class User { | @@ -84,4 +84,12 @@ public class User { | ||
84 | public void setMemberId(long memberId) { | 84 | public void setMemberId(long memberId) { |
85 | this.memberId = memberId; | 85 | this.memberId = memberId; |
86 | } | 86 | } |
87 | + | ||
88 | + public long getCreateTime() { | ||
89 | + return createTime; | ||
90 | + } | ||
91 | + | ||
92 | + public void setCreateTime(long createTime) { | ||
93 | + this.createTime = createTime; | ||
94 | + } | ||
87 | } | 95 | } |
-
Please register or login to post a comment