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
db611497
Commit
db611497
authored
Jul 16, 2024
by
刘帅阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
776e8672
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
15 deletions
+22
-15
CmsPriceClickServiceImpl.java
.../cmspriceclick/service/impl/CmsPriceClickServiceImpl.java
+19
-14
AdminUserInfoExceptionEnums.java
...t/business/sysuser/emuns/AdminUserInfoExceptionEnums.java
+3
-1
PromotionalTemplates.xlsx
src/main/resources/excel-template/PromotionalTemplates.xlsx
+0
-0
No files found.
src/main/java/org/rcisoft/business/cmspriceclick/service/impl/CmsPriceClickServiceImpl.java
View file @
db611497
...
@@ -243,23 +243,28 @@ public class CmsPriceClickServiceImpl extends ServiceImpl<CmsPriceClickRepositor
...
@@ -243,23 +243,28 @@ public class CmsPriceClickServiceImpl extends ServiceImpl<CmsPriceClickRepositor
cmsPriceClicksDTOList
.
stream
().
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
());
cmsPriceClicksDTOList
.
stream
().
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
());
//添加前先遍历一下那些数据有问题
//添加前先遍历一下那些数据有问题
for
(
CmsPriceClickDTO
cmsPriceClickDTO
:
cmsPriceClicksDTOList
)
{
for
(
CmsPriceClickDTO
cmsPriceClickDTO
:
cmsPriceClicksDTOList
)
{
//身份证号,手机号,银行卡号不为空时
//1.用户身份证号不能为空 18位 且必须为数字类型
if
(
cmsPriceClickDTO
.
getIdCard
()
!=
null
||
cmsPriceClickDTO
.
getPhone
()
!=
null
||
cmsPriceClickDTO
.
getBankCard
()
!=
null
)
{
if
(
cmsPriceClickDTO
.
getIdCard
()
==
null
||
cmsPriceClickDTO
.
getIdCard
().
length
()
!=
18
)
{
//1.用户身份证号不能为空 18位 且必须为数字类型
if
(
cmsPriceClickDTO
.
getIdCard
()
==
null
||
cmsPriceClickDTO
.
getIdCard
().
length
()
!=
18
)
{
// throw new CyServiceException(AdminUserInfoExceptionEnums.ID_LENGTH_ERROR.getCode(), AdminUserInfoExceptionEnums.ID_LENGTH_ERROR.getMessage() + ":" + cmsPriceClickDTO.getIdCard());
// throw new CyServiceException(AdminUserInfoExceptionEnums.ID_LENGTH_ERROR.getCode(), AdminUserInfoExceptionEnums.ID_LENGTH_ERROR.getMessage() + ":" + cmsPriceClickDTO.getIdCard());
throw
new
CyServiceException
(
AdminUserInfoExceptionEnums
.
ID_LENGTH_ERROR
.
getCode
(),
AdminUserInfoExceptionEnums
.
ID_LENGTH_ERROR
.
getMessage
());
throw
new
CyServiceException
(
AdminUserInfoExceptionEnums
.
ID_LENGTH_ERROR
.
getCode
(),
AdminUserInfoExceptionEnums
.
ID_LENGTH_ERROR
.
getMessage
());
}
}
//2.用户手机号 11位
//2.用户手机号 11位
if
(
cmsPriceClickDTO
.
getPhone
()
==
null
||
cmsPriceClickDTO
.
getPhone
().
length
()
!=
11
)
{
if
(
cmsPriceClickDTO
.
getPhone
()
==
null
||
cmsPriceClickDTO
.
getPhone
().
length
()
!=
11
)
{
// throw new CyServiceException(AdminUserInfoExceptionEnums.ID_LENGTH_ERROR.getCode(), AdminUserInfoExceptionEnums.PHONE_LENGTH_ERROR.getMessage() + ":" + cmsPriceClickDTO.getPhone());
// throw new CyServiceException(AdminUserInfoExceptionEnums.ID_LENGTH_ERROR.getCode(), AdminUserInfoExceptionEnums.PHONE_LENGTH_ERROR.getMessage() + ":" + cmsPriceClickDTO.getPhone());
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
||
cmsPriceClickDTO
.
getBankCard
().
length
()
>
19
)
{
if
(
cmsPriceClickDTO
.
getBankCard
()
==
null
||
cmsPriceClickDTO
.
getBankCard
().
length
()
>
19
)
{
// 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
.
ID_LENGTH_ERROR
.
getCode
(),
AdminUserInfoExceptionEnums
.
BANK_LENGTH_ERROR
.
getMessage
());
throw
new
CyServiceException
(
AdminUserInfoExceptionEnums
.
ID_LENGTH_ERROR
.
getCode
(),
AdminUserInfoExceptionEnums
.
BANK_LENGTH_ERROR
.
getMessage
());
}
}
//4.推广次数不能为空
if
(
cmsPriceClickDTO
.
getClickThroughRate
()
==
null
)
{
throw
new
CyServiceException
(
AdminUserInfoExceptionEnums
.
CLICK_THROUGH_RATE_ERROR
.
getCode
(),
AdminUserInfoExceptionEnums
.
CLICK_THROUGH_RATE_ERROR
.
getMessage
());
}
//5.价格不能为空
if
(
cmsPriceClickDTO
.
getPrice
()
==
null
)
{
throw
new
CyServiceException
(
AdminUserInfoExceptionEnums
.
PRICE_ERROR
.
getCode
(),
AdminUserInfoExceptionEnums
.
PRICE_ERROR
.
getMessage
());
}
}
}
}
...
...
src/main/java/org/rcisoft/business/sysuser/emuns/AdminUserInfoExceptionEnums.java
View file @
db611497
...
@@ -42,7 +42,9 @@ public enum AdminUserInfoExceptionEnums implements CyResExcEnum {
...
@@ -42,7 +42,9 @@ public enum AdminUserInfoExceptionEnums implements CyResExcEnum {
USERNAME_NOT_EXISTS
(
4007
,
"当前用户不存在"
),
USERNAME_NOT_EXISTS
(
4007
,
"当前用户不存在"
),
PHONE_LENGTH_ERROR
(
4007
,
"当前手机号长度错误"
),
PHONE_LENGTH_ERROR
(
4007
,
"当前手机号长度错误"
),
ID_LENGTH_ERROR
(
4007
,
"当前身份证号长度错误或不能为空"
),
ID_LENGTH_ERROR
(
4007
,
"当前身份证号长度错误或不能为空"
),
BANK_LENGTH_ERROR
(
4007
,
"当前银行卡号长度错误或不能为空"
);
BANK_LENGTH_ERROR
(
4007
,
"当前银行卡号长度错误或不能为空"
),
CLICK_THROUGH_RATE_ERROR
(
4007
,
"当前点击率错误"
),
PRICE_ERROR
(
4007
,
"当前单价错误"
);
private
Integer
code
;
private
Integer
code
;
private
String
message
;
private
String
message
;
...
...
src/main/resources/excel-template/PromotionalTemplates.xlsx
View file @
db611497
No preview for this file type
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