Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lingxi-lxy-yanshou
Project
Project
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
后端-黄柯铭
lingxi-lxy-yanshou
Commits
c12a27a6
Commit
c12a27a6
authored
Aug 06, 2021
by
liao_ds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
营销-平台活动-报名
parent
95107b54
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
PlatformActivitySignUpServiceImpl.java
...keting/serviceimpl/PlatformActivitySignUpServiceImpl.java
+13
-2
No files found.
marketing-service/src/main/java/com/ssy/lingxi/marketing/serviceimpl/PlatformActivitySignUpServiceImpl.java
View file @
c12a27a6
...
@@ -240,11 +240,17 @@ public class PlatformActivitySignUpServiceImpl implements IPlatformActivitySignU
...
@@ -240,11 +240,17 @@ public class PlatformActivitySignUpServiceImpl implements IPlatformActivitySignU
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
private
List
<
PlatformActivityGoodsDO
>
convertPlatformActivityGoodsDOList
(
PfActivitySignUpAddReq
addReq
,
PlatformActivityDO
activityDO
){
private
List
<
PlatformActivityGoodsDO
>
convertPlatformActivityGoodsDOList
(
PfActivitySignUpAddReq
addReq
,
PlatformActivityDO
activityDO
,
UserLoginCacheDTO
sysUser
,
Long
signUpId
){
List
<
PlatformActivityGoodsDO
>
goodsDOS
=
new
ArrayList
<>();
List
<
PlatformActivityGoodsDO
>
goodsDOS
=
new
ArrayList
<>();
addReq
.
getProductList
().
forEach
(
vo
->{
addReq
.
getProductList
().
forEach
(
vo
->{
PlatformActivityGoodsDO
goodsDO
=
new
PlatformActivityGoodsDO
();
PlatformActivityGoodsDO
goodsDO
=
new
PlatformActivityGoodsDO
();
BeanUtils
.
copyProperties
(
vo
,
goodsDO
);
BeanUtils
.
copyProperties
(
vo
,
goodsDO
);
goodsDO
.
setActivityId
(
activityDO
.
getId
());
goodsDO
.
setMemberId
(
sysUser
.
getMemberId
());
goodsDO
.
setRoleId
(
sysUser
.
getMemberRoleId
());
goodsDO
.
setMemberName
(
sysUser
.
getCompany
());
goodsDO
.
setRoleName
(
sysUser
.
getUserRoleName
());
goodsDO
.
setSignUpId
(
signUpId
);
//判断是否含附属信息
//判断是否含附属信息
if
(
ActivityTypeEnum
.
containSubsidiary
(
activityDO
.
getActivityType
())){
if
(
ActivityTypeEnum
.
containSubsidiary
(
activityDO
.
getActivityType
())){
//赠送促销
//赠送促销
...
@@ -287,6 +293,11 @@ public class PlatformActivitySignUpServiceImpl implements IPlatformActivitySignU
...
@@ -287,6 +293,11 @@ public class PlatformActivitySignUpServiceImpl implements IPlatformActivitySignU
long
now
=
System
.
currentTimeMillis
();
long
now
=
System
.
currentTimeMillis
();
if
(
isSave
){
if
(
isSave
){
signUpDO
=
convertSignUpDO
(
sysUser
,
addReq
);
signUpDO
=
convertSignUpDO
(
sysUser
,
addReq
);
//校验重复报名
PlatformActivitySignUpDO
dbSignUpDO
=
signUpRepository
.
findByActivityIdAndMemberIdAndRoleId
(
addReq
.
getActivityId
(),
sysUser
.
getMemberId
(),
sysUser
.
getMemberRoleId
());
if
(
dbSignUpDO
!=
null
){
throw
new
BusinessException
(
ResponseCode
.
MARKETING_PLATFORM_ACTIVITY_SIGN_UP_IS_REPEAT
);
}
signUpRepository
.
saveAndFlush
(
signUpDO
);
signUpRepository
.
saveAndFlush
(
signUpDO
);
}
else
{
}
else
{
signUpDO
=
signUpRepository
.
findByIdAndMemberIdAndRoleId
(
addReq
.
getId
(),
sysUser
.
getMemberId
(),
sysUser
.
getMemberRoleId
());
signUpDO
=
signUpRepository
.
findByIdAndMemberIdAndRoleId
(
addReq
.
getId
(),
sysUser
.
getMemberId
(),
sysUser
.
getMemberRoleId
());
...
@@ -311,7 +322,7 @@ public class PlatformActivitySignUpServiceImpl implements IPlatformActivitySignU
...
@@ -311,7 +322,7 @@ public class PlatformActivitySignUpServiceImpl implements IPlatformActivitySignU
//校验15种类型特定参数
//校验15种类型特定参数
checkByActivityType
(
addReq
,
activityDO
);
checkByActivityType
(
addReq
,
activityDO
);
//保存报名资料
//保存报名资料
List
<
PlatformActivityGoodsDO
>
goodsDOS
=
convertPlatformActivityGoodsDOList
(
addReq
,
activityDO
);
List
<
PlatformActivityGoodsDO
>
goodsDOS
=
convertPlatformActivityGoodsDOList
(
addReq
,
activityDO
,
sysUser
,
signUpDO
.
getId
()
);
goodsRepository
.
saveAll
(
goodsDOS
);
goodsRepository
.
saveAll
(
goodsDOS
);
//附属商品
//附属商品
List
<
PlatformActivityGoodsSubsidiaryDO
>
goodsSubsidiaryDOS
=
new
ArrayList
<>();
List
<
PlatformActivityGoodsSubsidiaryDO
>
goodsSubsidiaryDOS
=
new
ArrayList
<>();
...
...
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