记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
af71d404
Commit
af71d404
authored
Sep 07, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发放券+优先购;
parent
9d4e9746
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
CandyMgtCouponTaskController.java
...m/controller/candy/task/CandyMgtCouponTaskController.java
+3
-0
PlatformCandyCouponService.java
...atform/service/impl/candy/PlatformCandyCouponService.java
+16
-2
No files found.
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/candy/task/CandyMgtCouponTaskController.java
View file @
af71d404
...
@@ -61,6 +61,9 @@ public class CandyMgtCouponTaskController {
...
@@ -61,6 +61,9 @@ public class CandyMgtCouponTaskController {
case
4
:
// 折扣券
case
4
:
// 折扣券
platformCandyCouponService
.
issueDiscountCouponHandler
(
mgtCoupon
,
coupon
);
platformCandyCouponService
.
issueDiscountCouponHandler
(
mgtCoupon
,
coupon
);
break
;
break
;
case
101
:
// 优先券
platformCandyCouponService
.
issuePriorityCouponHandler
(
mgtCoupon
,
coupon
);
break
;
default
:
default
:
log
.
warn
(
"发放券任务总数:{},任务{}无法处理,无效的券类型[mcouponId:{},couType:{}]"
,
taskSize
,
i
,
mgtCoupon
.
getMcouponId
(),
coupon
.
getCouType
());
log
.
warn
(
"发放券任务总数:{},任务{}无法处理,无效的券类型[mcouponId:{},couType:{}]"
,
taskSize
,
i
,
mgtCoupon
.
getMcouponId
(),
coupon
.
getCouType
());
break
;
break
;
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/candy/PlatformCandyCouponService.java
View file @
af71d404
...
@@ -175,6 +175,7 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
...
@@ -175,6 +175,7 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
private
void
processForAllMember
(
CandyMgtCoupon
mgtCoupon
,
CandyCoupon
coupon
,
List
<
CandyCouponRuleDto
>
couponRuleDtoList
)
{
private
void
processForAllMember
(
CandyMgtCoupon
mgtCoupon
,
CandyCoupon
coupon
,
List
<
CandyCouponRuleDto
>
couponRuleDtoList
)
{
List
<
CandyUserCoupon
>
initUserCouponList
=
new
ArrayList
<>();
List
<
CandyUserCoupon
>
initUserCouponList
=
new
ArrayList
<>();
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
duedAt
=
now
.
plusDays
(
coupon
.
getValidity
()).
withHour
(
23
).
withMinute
(
59
).
withSecond
(
59
);
LocalDateTime
nowEndTime
=
now
.
withHour
(
23
).
withMinute
(
59
).
withSecond
(
59
);
LocalDateTime
nowEndTime
=
now
.
withHour
(
23
).
withMinute
(
59
).
withSecond
(
59
);
LambdaQueryWrapper
<
AdamUserMember
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
AdamUserMember
.
class
).
eq
(
AdamUserMember:
:
getState
,
1
)
LambdaQueryWrapper
<
AdamUserMember
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
AdamUserMember
.
class
).
eq
(
AdamUserMember:
:
getState
,
1
)
...
@@ -204,7 +205,7 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
...
@@ -204,7 +205,7 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
userCoupon
.
setCouponId
(
coupon
.
getCouponId
());
userCoupon
.
setCouponId
(
coupon
.
getCouponId
());
userCoupon
.
setState
(
1
);
userCoupon
.
setState
(
1
);
userCoupon
.
setBindAt
(
now
);
userCoupon
.
setBindAt
(
now
);
userCoupon
.
setDuedAt
(
coupon
.
getExpireAt
()
);
userCoupon
.
setDuedAt
(
duedAt
);
userCoupon
.
setCreatedAt
(
now
);
userCoupon
.
setCreatedAt
(
now
);
initUserCouponList
.
add
(
userCoupon
);
initUserCouponList
.
add
(
userCoupon
);
...
@@ -248,6 +249,7 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
...
@@ -248,6 +249,7 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
private
void
processForUserCoupon
(
CandyMgtCoupon
mgtCoupon
,
CandyCoupon
coupon
,
List
<
CandyCouponRuleDto
>
couponRuleDtoList
)
{
private
void
processForUserCoupon
(
CandyMgtCoupon
mgtCoupon
,
CandyCoupon
coupon
,
List
<
CandyCouponRuleDto
>
couponRuleDtoList
)
{
List
<
CandyUserCoupon
>
initUserCouponList
=
new
ArrayList
<>();
List
<
CandyUserCoupon
>
initUserCouponList
=
new
ArrayList
<>();
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
duedAt
=
now
.
plusDays
(
coupon
.
getValidity
()).
withHour
(
23
).
withMinute
(
59
).
withSecond
(
59
);
String
eventLimit
=
mgtCoupon
.
getEventLimit
();
String
eventLimit
=
mgtCoupon
.
getEventLimit
();
String
[]
eventLimitArr
=
eventLimit
.
split
(
","
);
String
[]
eventLimitArr
=
eventLimit
.
split
(
","
);
...
@@ -266,7 +268,7 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
...
@@ -266,7 +268,7 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
userCoupon
.
setCouponId
(
coupon
.
getCouponId
());
userCoupon
.
setCouponId
(
coupon
.
getCouponId
());
userCoupon
.
setState
(
1
);
userCoupon
.
setState
(
1
);
userCoupon
.
setBindAt
(
now
);
userCoupon
.
setBindAt
(
now
);
userCoupon
.
setDuedAt
(
coupon
.
getExpireAt
()
);
userCoupon
.
setDuedAt
(
duedAt
);
userCoupon
.
setCreatedAt
(
now
);
userCoupon
.
setCreatedAt
(
now
);
initUserCouponList
.
add
(
userCoupon
);
initUserCouponList
.
add
(
userCoupon
);
...
@@ -344,4 +346,16 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
...
@@ -344,4 +346,16 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
public
void
issueDiscountCouponHandler
(
final
CandyMgtCoupon
mgtCoupon
,
final
CandyCoupon
coupon
)
{
public
void
issueDiscountCouponHandler
(
final
CandyMgtCoupon
mgtCoupon
,
final
CandyCoupon
coupon
)
{
this
.
issueCouponProcessing
(
mgtCoupon
,
coupon
);
this
.
issueCouponProcessing
(
mgtCoupon
,
coupon
);
}
}
/**
* <p>
* 发放优先券
* </p>
*
* @param mgtCoupon CandyMgtCoupon
* @param coupon CandyCoupon
*/
public
void
issuePriorityCouponHandler
(
final
CandyMgtCoupon
mgtCoupon
,
final
CandyCoupon
coupon
)
{
this
.
issueCouponProcessing
(
mgtCoupon
,
coupon
);
}
}
}
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