Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intel_promotion_api
Project
Project
Details
Activity
Releases
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
liyilin
intel_promotion_api
Commits
0c18ec3b
Commit
0c18ec3b
authored
Aug 16, 2024
by
刘帅阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
f8074456
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
CmsPriceClickServiceImpl.java
.../cmspriceclick/service/impl/CmsPriceClickServiceImpl.java
+8
-1
AdminUserInfoExceptionEnums.java
...t/business/sysuser/emuns/AdminUserInfoExceptionEnums.java
+2
-1
No files found.
src/main/java/org/rcisoft/business/cmspriceclick/service/impl/CmsPriceClickServiceImpl.java
View file @
0c18ec3b
...
@@ -247,6 +247,9 @@ public class CmsPriceClickServiceImpl extends ServiceImpl<CmsPriceClickRepositor
...
@@ -247,6 +247,9 @@ public class CmsPriceClickServiceImpl extends ServiceImpl<CmsPriceClickRepositor
Pattern
pattern
=
Pattern
.
compile
(
"[0-9]*"
);
Pattern
pattern
=
Pattern
.
compile
(
"[0-9]*"
);
//添加前先遍历一下那些数据有问题
//添加前先遍历一下那些数据有问题
for
(
CmsPriceClickDTO
cmsPriceClickDTO
:
cmsPriceClicksDTOList
)
{
for
(
CmsPriceClickDTO
cmsPriceClickDTO
:
cmsPriceClicksDTOList
)
{
//用户名去空格
cmsPriceClickDTO
.
setUserName
(
cmsPriceClickDTO
.
getUserName
().
replaceAll
(
"\\s+"
,
""
).
trim
());
cmsPriceClickDTO
.
setUserName
(
cmsPriceClickDTO
.
getUserName
().
replaceAll
(
"\\p{Zs}"
,
""
).
trim
());
//手机号去空格
//手机号去空格
cmsPriceClickDTO
.
setPhone
(
cmsPriceClickDTO
.
getPhone
().
replaceAll
(
"\\s+"
,
""
).
trim
());
cmsPriceClickDTO
.
setPhone
(
cmsPriceClickDTO
.
getPhone
().
replaceAll
(
"\\s+"
,
""
).
trim
());
cmsPriceClickDTO
.
setPhone
(
cmsPriceClickDTO
.
getPhone
().
replaceAll
(
"\\p{Zs}"
,
""
).
trim
());
cmsPriceClickDTO
.
setPhone
(
cmsPriceClickDTO
.
getPhone
().
replaceAll
(
"\\p{Zs}"
,
""
).
trim
());
...
@@ -269,7 +272,7 @@ public class CmsPriceClickServiceImpl extends ServiceImpl<CmsPriceClickRepositor
...
@@ -269,7 +272,7 @@ public class CmsPriceClickServiceImpl extends ServiceImpl<CmsPriceClickRepositor
throw
new
CyServiceException
(
AdminUserInfoExceptionEnums
.
ID_LENGTH_ERROR
.
getCode
(),
AdminUserInfoExceptionEnums
.
PHONE_LENGTH_ERROR
.
getMessage
());
throw
new
CyServiceException
(
AdminUserInfoExceptionEnums
.
ID_LENGTH_ERROR
.
getCode
(),
AdminUserInfoExceptionEnums
.
PHONE_LENGTH_ERROR
.
getMessage
());
}
}
//3.银行卡号不能为空 19位
//3.银行卡号不能为空 19位
if
(
cmsPriceClickDTO
.
getBankCard
()
==
null
)
{
if
(
cmsPriceClickDTO
.
getBankCard
()
==
null
||
cmsPriceClickDTO
.
getBankCard
().
length
()
>
30
)
{
// throw new CyServiceException(AdminUserInfoExceptionEnums.ID_LENGTH_ERROR.getCode(), AdminUserInfoExceptionEnums.BANK_LENGTH_ERROR.getMessage() + ":" + cmsPriceClickDTO.getBankCard());
// throw new CyServiceException(AdminUserInfoExceptionEnums.ID_LENGTH_ERROR.getCode(), AdminUserInfoExceptionEnums.BANK_LENGTH_ERROR.getMessage() + ":" + cmsPriceClickDTO.getBankCard());
throw
new
CyServiceException
(
AdminUserInfoExceptionEnums
.
BANK_LENGTH_ERROR
.
getCode
(),
cmsPriceClickDTO
.
getIdCard
()
+
AdminUserInfoExceptionEnums
.
BANK_LENGTH_ERROR
.
getMessage
());
throw
new
CyServiceException
(
AdminUserInfoExceptionEnums
.
BANK_LENGTH_ERROR
.
getCode
(),
cmsPriceClickDTO
.
getIdCard
()
+
AdminUserInfoExceptionEnums
.
BANK_LENGTH_ERROR
.
getMessage
());
}
}
...
@@ -290,6 +293,10 @@ public class CmsPriceClickServiceImpl extends ServiceImpl<CmsPriceClickRepositor
...
@@ -290,6 +293,10 @@ public class CmsPriceClickServiceImpl extends ServiceImpl<CmsPriceClickRepositor
// System.out.println("++" + cmsPriceClickDTO.getBankCard() + "+++");
// System.out.println("++" + cmsPriceClickDTO.getBankCard() + "+++");
throw
new
CyServiceException
(
AdminUserInfoExceptionEnums
.
BANK_LENGTH_ERROR
.
getCode
(),
AdminUserInfoExceptionEnums
.
BANK_LENGTH_ERROR
.
getMessage
());
throw
new
CyServiceException
(
AdminUserInfoExceptionEnums
.
BANK_LENGTH_ERROR
.
getCode
(),
AdminUserInfoExceptionEnums
.
BANK_LENGTH_ERROR
.
getMessage
());
}
}
//用户名称不能为空且 不能大于30
if
(
cmsPriceClickDTO
.
getUserName
()
==
null
||
cmsPriceClickDTO
.
getUserName
().
length
()
>
30
)
{
throw
new
CyServiceException
(
AdminUserInfoExceptionEnums
.
USER_NAME_LENGTH_ERROR
.
getCode
(),
AdminUserInfoExceptionEnums
.
USER_NAME_LENGTH_ERROR
.
getMessage
());
}
}
}
...
...
src/main/java/org/rcisoft/business/sysuser/emuns/AdminUserInfoExceptionEnums.java
View file @
0c18ec3b
...
@@ -44,7 +44,8 @@ public enum AdminUserInfoExceptionEnums implements CyResExcEnum {
...
@@ -44,7 +44,8 @@ public enum AdminUserInfoExceptionEnums implements CyResExcEnum {
ID_LENGTH_ERROR
(
4007
,
"当前身份证号错误或不能为空"
),
ID_LENGTH_ERROR
(
4007
,
"当前身份证号错误或不能为空"
),
BANK_LENGTH_ERROR
(
4007
,
"当前银行卡号错误或不能为空"
),
BANK_LENGTH_ERROR
(
4007
,
"当前银行卡号错误或不能为空"
),
CLICK_THROUGH_RATE_ERROR
(
4007
,
"当前推广次数错误或不能为空"
),
CLICK_THROUGH_RATE_ERROR
(
4007
,
"当前推广次数错误或不能为空"
),
PRICE_ERROR
(
4007
,
"当前价格错误或不能为空"
);
PRICE_ERROR
(
4007
,
"当前价格错误或不能为空"
),
USER_NAME_LENGTH_ERROR
(
4007
,
"当前用户名称错误"
);
private
Integer
code
;
private
Integer
code
;
private
String
message
;
private
String
message
;
...
...
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