Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Jeepay
Commits
1088a5eb
Commit
1088a5eb
authored
Jun 17, 2021
by
xiaoyu
Browse files
账户设置增加Base64解析
parent
b42de3bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/CurrentUserController.java
View file @
1088a5eb
...
...
@@ -15,6 +15,7 @@
*/
package
com.jeequan.jeepay.mgr.ctrl
;
import
cn.hutool.core.codec.Base64
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jeequan.jeepay.core.aop.MethodLog
;
...
...
@@ -118,14 +119,14 @@ public class CurrentUserController extends CommonCtrl{
@MethodLog
(
remark
=
"修改密码"
)
public
ApiRes
modifyPwd
()
throws
BizException
{
//更改密码,
验证当前用户信息
String
currentUserPwd
=
getValStringRequired
(
"originalPwd"
);
//当前用户登录密码
//更改密码,验证当前用户信息
String
currentUserPwd
=
Base64
.
decodeStr
(
getValStringRequired
(
"originalPwd"
)
)
;
//当前用户登录密码
//验证当前密码是否正确
if
(!
sysUserAuthService
.
validateCurrentUserPwd
(
currentUserPwd
)){
throw
new
BizException
(
"原密码验证失败!"
);
}
String
opUserPwd
=
getValStringRequired
(
"confirmPwd"
);
String
opUserPwd
=
Base64
.
decodeStr
(
getValStringRequired
(
"confirmPwd"
)
)
;
// 验证原密码与新密码是否相同
if
(
opUserPwd
.
equals
(
currentUserPwd
))
{
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/CurrentUserController.java
View file @
1088a5eb
...
...
@@ -15,6 +15,7 @@
*/
package
com.jeequan.jeepay.mch.ctrl
;
import
cn.hutool.core.codec.Base64
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jeequan.jeepay.core.aop.MethodLog
;
...
...
@@ -124,14 +125,14 @@ public class CurrentUserController extends CommonCtrl{
Long
opSysUserId
=
getValLongRequired
(
"recordId"
);
//操作员ID
//更改密码,
验证当前用户信息
String
currentUserPwd
=
getValStringRequired
(
"originalPwd"
);
//当前用户登录密码
//更改密码,验证当前用户信息
String
currentUserPwd
=
Base64
.
decodeStr
(
getValStringRequired
(
"originalPwd"
)
)
;
//当前用户登录密码
//验证当前密码是否正确
if
(!
sysUserAuthService
.
validateCurrentUserPwd
(
currentUserPwd
)){
throw
new
BizException
(
"原密码验证失败!"
);
}
String
opUserPwd
=
getValStringRequired
(
"confirmPwd"
);
String
opUserPwd
=
Base64
.
decodeStr
(
getValStringRequired
(
"confirmPwd"
)
)
;
// 验证原密码与新密码是否相同
if
(
opUserPwd
.
equals
(
currentUserPwd
))
{
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysUserController.java
View file @
1088a5eb
...
...
@@ -153,7 +153,7 @@ public class SysUserController extends CommonCtrl {
Boolean
resetPass
=
getReqParamJSON
().
getBoolean
(
"resetPass"
);
if
(
resetPass
!=
null
&&
resetPass
)
{
//判断是否重置密码
String
updatePwd
=
getReqParamJSON
().
getBoolean
(
"defaultPass"
)
==
false
?
Base64
.
decodeStr
(
getValStringRequired
(
"confirmPwd"
))
:
CS
.
DEFAULT_PWD
;
String
updatePwd
=
getReqParamJSON
().
getBoolean
(
"defaultPass"
)
==
false
?
Base64
.
decodeStr
(
getValStringRequired
(
"confirmPwd"
))
:
CS
.
DEFAULT_PWD
;
sysUserAuthService
.
resetAuthInfo
(
sysUser
.
getSysUserId
(),
null
,
null
,
updatePwd
,
CS
.
SYS_TYPE
.
MCH
);
// 删除用户redis缓存信息
authService
.
delAuthentication
(
Arrays
.
asList
(
recordId
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment