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
a2ce79e9
Commit
a2ce79e9
authored
Aug 23, 2019
by
技术部-任文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
这种bug就应该拖出去罚裸蹲
parent
34b3ac53
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
UserController.java
...n/quantgroup/xyqb/controller/external/UserController.java
+3
-3
InnerController.java
...tgroup/xyqb/controller/internal/user/InnerController.java
+2
-3
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/UserController.java
View file @
a2ce79e9
...
...
@@ -263,7 +263,7 @@ public class UserController implements IBaseController {
log
.
info
(
"用户注册失败,密码不能为空:register -> registerFrom:{}, phoneNo:{}, password:{}"
,
registerFrom
,
phoneNo
,
password
);
return
JsonResult
.
buildErrorStateResult
(
"密码不能为空"
,
null
);
}
if
(
ValidationUtil
.
validatePassword
(
password
))
{
if
(
!
ValidationUtil
.
validatePassword
(
password
))
{
log
.
info
(
"用户注册失败,{}:register -> registerFrom:{}, phoneNo:{}, password:{}"
,
PasswordUtil
.
TOAST_MSG
,
registerFrom
,
phoneNo
,
password
);
return
JsonResult
.
buildErrorStateResult
(
PasswordUtil
.
TOAST_MSG
,
null
);
}
...
...
@@ -336,7 +336,7 @@ public class UserController implements IBaseController {
if
(
StringUtils
.
isBlank
(
password
))
{
return
JsonResult
.
buildErrorStateResult
(
"密码不能为空"
,
null
);
}
if
(
ValidationUtil
.
validatePassword
(
password
))
{
if
(
!
ValidationUtil
.
validatePassword
(
password
))
{
return
JsonResult
.
buildErrorStateResult
(
PasswordUtil
.
TOAST_MSG
,
null
);
}
verifyPhoneAndCode
(
phoneNo
,
verificationCode
);
...
...
@@ -365,7 +365,7 @@ public class UserController implements IBaseController {
if
(
StringUtils
.
isBlank
(
passwordNew
))
{
return
JsonResult
.
buildErrorStateResult
(
"密码不能为空"
,
null
);
}
if
(
ValidationUtil
.
validatePassword
(
password
))
{
if
(
!
ValidationUtil
.
validatePassword
(
password
))
{
return
JsonResult
.
buildErrorStateResult
(
PasswordUtil
.
TOAST_MSG
,
null
);
}
User
user
=
userService
.
findByPhoneWithCache
(
phoneNo
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/InnerController.java
View file @
a2ce79e9
...
...
@@ -1341,12 +1341,11 @@ public class InnerController implements IBaseController {
@RequestMapping
(
path
=
"/user/password/reset"
,
method
=
RequestMethod
.
POST
)
public
JsonResult
resetPassword
(
@RequestParam
(
"phone"
)
String
phone
,
@RequestParam
(
required
=
false
)
String
password
)
{
if
(
ValidationUtil
.
validatePhoneNo
(
phone
))
{
if
(
StringUtils
.
isNotBlank
(
password
)
&&
!
ValidationUtil
.
validatePassword
(
password
))
{
return
JsonResult
.
buildErrorStateResult
(
PasswordUtil
.
TOAST_MSG
,
null
);
}
// 默认重置的密码是123456
if
(
StringUtils
.
isBlank
(
password
)){
password
=
PasswordUtil
.
PASSWORD_DEFAULT
;
}
else
if
(!
ValidationUtil
.
validatePassword
(
password
))
{
return
JsonResult
.
buildErrorStateResult
(
PasswordUtil
.
TOAST_MSG
,
null
);
}
try
{
boolean
result
=
userService
.
resetPassword
(
phone
,
password
);
...
...
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