Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴学德
gdtel-gztel-school-center
Commits
f5807ce8
Commit
f5807ce8
authored
Sep 26, 2021
by
伍思炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
宽带下单时多媒体账号与密码的填写规则修改
parent
c89a14ea
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
3 deletions
+103
-3
apply-net/src/main/java/com/winsun/controller/DankuanController.java
+0
-0
apply-net/src/main/java/com/winsun/controller/RongHeController.java
+26
-3
apply-net/src/main/java/com/winsun/utils/CheckPwd.java
+77
-0
No files found.
apply-net/src/main/java/com/winsun/controller/DankuanController.java
View file @
f5807ce8
This diff is collapsed.
Click to expand it.
apply-net/src/main/java/com/winsun/controller/RongHeController.java
View file @
f5807ce8
...
...
@@ -35,6 +35,7 @@ import java.net.URLEncoder;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.regex.Pattern
;
/**
* 融合办理接口
...
...
@@ -170,6 +171,27 @@ public class RongHeController {
}
else
{
sell
=
""
;
}
if
(
StringUtils
.
isNotBlank
(
orderCustomerAccount
))
{
String
orderCustomerAccounts
=
orderCustomerAccount
.
split
(
"@"
)[
0
];
if
(!
orderPhone
.
equals
(
orderCustomerAccounts
))
{
Pattern
iphoneVerification
=
Pattern
.
compile
(
"^[1][3|4|5|6|7|8|9][0-9]{9}$"
);
if
(!
iphoneVerification
.
matcher
(
orderCustomerAccounts
).
matches
())
{
return
ResponseData
.
error
(
"多媒体账号请填写为手机号"
);
}
}
}
else
{
return
ResponseData
.
error
(
"多媒体账号不能为空"
);
}
if
(
StringUtils
.
isNotBlank
(
orderCustomerPwd
))
{
if
(!
CheckPwd
.
checkPassword
(
orderCustomerPwd
))
{
return
ResponseData
.
error
(
"多媒体账号的密码必须为8~12位的数字加字母组合"
);
}
}
else
{
return
ResponseData
.
error
(
"多媒体账号的密码不能为空"
);
}
String
imgUrl
=
request
.
getParameter
(
"imgUrl"
);
String
filePath
=
""
;
String
orderSeq
=
RandomUtil
.
RandomNumber
(
20
);
...
...
@@ -214,9 +236,10 @@ public class RongHeController {
orderView
.
setOrderUniversityName
(
product
.
getProductUniversity
());
// 学校
orderView
.
setOrderRegion
(
product
.
getProductRegion
());
// 区域
/**
* 广美用来判断校区
*/
/*
广美用来判断校区
*/
if
(
StringUtils
.
isNotBlank
(
productId
)
&&
"84"
.
equals
(
productId
)){
if
(
StringUtils
.
isNotBlank
(
campus
)
&&
"1"
.
equals
(
campus
)){
orderView
.
setOrderRegion
(
"海珠区"
);
...
...
apply-net/src/main/java/com/winsun/utils/CheckPwd.java
0 → 100644
View file @
f5807ce8
package
com
.
winsun
.
utils
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
public
class
CheckPwd
{
/**
* 验证多媒体密码
* @param new_password
* @return
*/
public
static
boolean
checkPassword
(
String
new_password
)
{
if
(
new_password
.
length
()
<
8
||
new_password
.
length
()
>
12
)
{
//密码格式错误
return
false
;
}
else
{
int
passNumber
=
0
;
Pattern
pattern1
=
Pattern
.
compile
(
"(?=.*[-._/!@#$%^*]).{8,12}"
);
Matcher
m1
=
pattern1
.
matcher
(
new_password
);
if
(
m1
.
matches
())
{
return
false
;
}
Pattern
pattern2
=
Pattern
.
compile
(
"(?=.*\\d).{8,12}"
);
Matcher
m2
=
pattern2
.
matcher
(
new_password
);
if
(
m2
.
matches
())
{
passNumber
++;
}
Pattern
pattern3
=
Pattern
.
compile
(
"(?=.*[a-z]).{8,12}"
);
Matcher
m3
=
pattern3
.
matcher
(
new_password
);
if
(
m3
.
matches
())
{
passNumber
++;
}
Pattern
pattern4
=
Pattern
.
compile
(
"(?=.*[A-Z]).{8,12}"
);
Matcher
m4
=
pattern4
.
matcher
(
new_password
);
if
(
m4
.
matches
())
{
passNumber
++;
}
if
(
passNumber
<
2
)
{
//密码格式错误
return
false
;
}
if
(!
new_password
.
matches
(
"^[0-9a-zA-Z]{8,12}$"
))
{
return
false
;
}
if
(
new_password
.
contains
(
"&"
))
{
return
false
;
}
}
return
true
;
}
}
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