Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
cc838690
Commit
cc838690
authored
May 08, 2017
by
Java-刘 彧阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增重置密码接口,供内容部运营人员使用
parent
dad88e05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
InnerController.java
...tgroup/xyqb/controller/external/user/InnerController.java
+26
-0
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/user/InnerController.java
View file @
cc838690
...
...
@@ -15,6 +15,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -443,4 +444,29 @@ public class InnerController {
return
JsonResult
.
buildSuccessResult
(
null
,
UserSpouseRet
.
getUserSpouseRet
(
userSpouse
));
}
/**
* 重置密码接口,供内部人员使用(例如绝影)
* @param key
* @param phone
* @return
*/
@RequestMapping
(
"/user/password/reset/{key}/{phone}"
)
public
JsonResult
resetPassword
(
@PathVariable
(
"key"
)
String
key
,
@PathVariable
(
"phone"
)
String
phone
)
{
LOGGER
.
info
(
"密码重置请求,phone:[{}]"
,
phone
);
if
(
StringUtils
.
isBlank
(
key
)){
return
JsonResult
.
buildErrorStateResult
(
"用户密码重置失败."
,
null
);
}
if
(
"ecf75c1f-2ccb-4661-8e4b-2874c0f45a2b"
.
equalsIgnoreCase
(
key
)){
LOGGER
.
error
(
"密码重置失败,key错误!@!,phone:[{}]"
,
phone
);
return
JsonResult
.
buildErrorStateResult
(
"用户密码重置失败."
,
null
);
}
try
{
userService
.
resetPassword
(
phone
,
"123456"
);
//默认重置的密码是123456
return
JsonResult
.
buildSuccessResult
(
"用户密码已重置."
,
"null"
);
}
catch
(
Exception
e
){
LOGGER
.
error
(
"密码重置失败,phone[{}],err:[{}]"
,
phone
,
e
);
}
return
JsonResult
.
buildErrorStateResult
(
"用户密码重置失败."
,
null
);
}
}
\ No newline at end of file
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