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
Litemall
Commits
ba380680
Commit
ba380680
authored
Nov 01, 2018
by
Junling Bu
Browse files
fix[litemall-admin-api]: 修复用户名和手机号校验失败
parent
db0995d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminAdminController.java
View file @
ba380680
...
...
@@ -81,7 +81,7 @@ public class AdminAdminController {
if
(
StringUtils
.
isEmpty
(
name
)){
return
ResponseUtil
.
badArgument
();
}
if
(
RegexUtil
.
isUsername
(
name
)){
if
(
!
RegexUtil
.
isUsername
(
name
)){
return
ResponseUtil
.
fail
(
402
,
"管理员名称不符合规定"
);
}
String
password
=
admin
.
getPassword
();
...
...
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminUserController.java
View file @
ba380680
...
...
@@ -68,7 +68,7 @@ public class AdminUserController {
if
(
StringUtils
.
isEmpty
(
user
)){
return
ResponseUtil
.
badArgument
();
}
if
(
RegexUtil
.
isUsername
(
username
)){
if
(
!
RegexUtil
.
isUsername
(
username
)){
return
ResponseUtil
.
fail
(
402
,
"用户名不符合规定"
);
}
String
password
=
user
.
getPassword
();
...
...
@@ -79,7 +79,7 @@ public class AdminUserController {
if
(
StringUtils
.
isEmpty
(
mobile
)){
return
ResponseUtil
.
badArgument
();
}
if
(
RegexUtil
.
isMobileExact
(
mobile
)){
if
(
!
RegexUtil
.
isMobileExact
(
mobile
)){
return
ResponseUtil
.
fail
(
402
,
"用户手机号码格式不正确"
);
}
return
null
;
...
...
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