Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
9c45247a
Commit
9c45247a
authored
Jun 25, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加密码重置日志
parent
397a6f9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
portal-manager/src/main/java/com/mortals/xhx/module/user/web/UserController.java
.../java/com/mortals/xhx/module/user/web/UserController.java
+4
-0
No files found.
portal-manager/src/main/java/com/mortals/xhx/module/user/web/UserController.java
View file @
9c45247a
...
@@ -157,11 +157,13 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
...
@@ -157,11 +157,13 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
public
String
changePassword
(
@RequestBody
UserEntity
entity
)
{
public
String
changePassword
(
@RequestBody
UserEntity
entity
)
{
JSONObject
ret
=
new
JSONObject
();
JSONObject
ret
=
new
JSONObject
();
try
{
try
{
String
busiDesc
=
this
.
getModuleDesc
()
+
"密码修改"
;
String
oldPwd
=
LoginAESUtil
.
decrypt
(
entity
.
getOldPwd
(),
AES_KEY
,
AES_IV
,
LoginAESUtil
.
AES_CBC
);
String
oldPwd
=
LoginAESUtil
.
decrypt
(
entity
.
getOldPwd
(),
AES_KEY
,
AES_IV
,
LoginAESUtil
.
AES_CBC
);
String
newPwd
=
LoginAESUtil
.
decrypt
(
entity
.
getNewPwd
(),
AES_KEY
,
AES_IV
,
LoginAESUtil
.
AES_CBC
);
String
newPwd
=
LoginAESUtil
.
decrypt
(
entity
.
getNewPwd
(),
AES_KEY
,
AES_IV
,
LoginAESUtil
.
AES_CBC
);
entity
.
setOldPwd
(
oldPwd
);
entity
.
setOldPwd
(
oldPwd
);
entity
.
setNewPwd
(
newPwd
);
entity
.
setNewPwd
(
newPwd
);
service
.
updateUserPwd
(
super
.
getCurUser
().
getLoginName
(),
entity
.
getOldPwd
(),
entity
.
getNewPwd
());
service
.
updateUserPwd
(
super
.
getCurUser
().
getLoginName
(),
entity
.
getOldPwd
(),
entity
.
getNewPwd
());
recordSysLog
(
request
,
busiDesc
+
"【成功】"
);
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
ret
.
put
(
KEY_RESULT_MSG
,
"密码修改成功!"
);
ret
.
put
(
KEY_RESULT_MSG
,
"密码修改成功!"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -285,11 +287,13 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
...
@@ -285,11 +287,13 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
public
String
resetPassword
(
@RequestBody
UserEntity
entity
)
{
public
String
resetPassword
(
@RequestBody
UserEntity
entity
)
{
JSONObject
ret
=
new
JSONObject
();
JSONObject
ret
=
new
JSONObject
();
try
{
try
{
String
busiDesc
=
this
.
getModuleDesc
()
+
"密码重置"
;
String
newPwd
=
LoginAESUtil
.
decrypt
(
entity
.
getNewPwd
(),
AES_KEY
,
AES_IV
,
LoginAESUtil
.
AES_CBC
);
String
newPwd
=
LoginAESUtil
.
decrypt
(
entity
.
getNewPwd
(),
AES_KEY
,
AES_IV
,
LoginAESUtil
.
AES_CBC
);
entity
.
setNewPwd
(
newPwd
);
entity
.
setNewPwd
(
newPwd
);
String
loginName
=
LoginAESUtil
.
decrypt
(
entity
.
getLoginName
(),
AES_KEY
,
AES_IV
,
LoginAESUtil
.
AES_CBC
);
String
loginName
=
LoginAESUtil
.
decrypt
(
entity
.
getLoginName
(),
AES_KEY
,
AES_IV
,
LoginAESUtil
.
AES_CBC
);
entity
.
setLoginName
(
loginName
);
entity
.
setLoginName
(
loginName
);
service
.
resetUserPwd
(
entity
.
getLoginName
(),
entity
.
getNewPwd
(),
this
.
getContext
());
service
.
resetUserPwd
(
entity
.
getLoginName
(),
entity
.
getNewPwd
(),
this
.
getContext
());
recordSysLog
(
request
,
busiDesc
+
"【成功】"
);
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
ret
.
put
(
KEY_RESULT_MSG
,
"密码修改成功!"
);
ret
.
put
(
KEY_RESULT_MSG
,
"密码修改成功!"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
Write
Preview
Markdown
is supported
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