Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
吴迪
gs1-office-web-sit
Commits
177ceb39
Commit
177ceb39
authored
Nov 19, 2024
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改】密码长度8-20 位字符,包括数字、大、小写字母、特殊字符中的至少2种
parent
3183b5da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
MemberServiceImpl.java
...office/modules/manage/service/impl/MemberServiceImpl.java
+4
-3
No files found.
src/main/java/io/office/modules/manage/service/impl/MemberServiceImpl.java
View file @
177ceb39
...
...
@@ -12,7 +12,6 @@ import io.office.modules.manage.entity.*;
import
io.office.modules.manage.service.MemberService
;
import
io.office.modules.manage.utils.DateUtils
;
import
io.office.modules.manage.utils.MD5Util
;
import
io.office.modules.manage.utils.PasswordValidator
;
import
io.office.modules.manage.utils.PhoneNumberUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.httpclient.NameValuePair
;
...
...
@@ -31,6 +30,8 @@ import java.util.Map;
import
java.util.concurrent.TimeUnit
;
import
java.util.regex.Pattern
;
import
static
io
.
office
.
modules
.
manage
.
utils
.
PasswordValidator
.
isValidPassword
;
@Service
(
"memberService"
)
@Slf4j
...
...
@@ -81,7 +82,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
throw
new
RRException
(
"用户名必须由数字和字母组成且不能是纯数字,长度2-8位"
);
}
//判断密码合法性
if
(!
checkPassW
ord
(
passWord
))
{
if
(!
isValidPassw
ord
(
passWord
))
{
throw
new
RRException
(
"密码长度8-20 位字符,包括数字、大、小写字母、特殊字符中的至少2种"
);
}
//判断重复密码
...
...
@@ -164,7 +165,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
throw
new
RRException
(
"两次密码信息不一致,请重新输入"
);
}
if
(!
PasswordValidator
.
isValidPassword
(
newPass
))
{
if
(!
isValidPassword
(
newPass
))
{
throw
new
RRException
(
"密码不符合要求,密码应该包含数字、大小写字母和特殊字符(@$!%*#?&)中的任意两种,并且长度在8-20个字符之间"
);
}
...
...
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