记得上下班打卡 | 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
7e0af894
Commit
7e0af894
authored
Aug 24, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+调整发放券任务;
parent
cfe4ead8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
283 additions
and
94 deletions
+283
-94
CandyMgtCouponTaskController.java
...m/controller/candy/task/CandyMgtCouponTaskController.java
+35
-94
PlatformAdamUserMemberService.java
...form/service/impl/adam/PlatformAdamUserMemberService.java
+10
-0
PlatformCandyCouponService.java
...atform/service/impl/candy/PlatformCandyCouponService.java
+238
-0
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 @
7e0af894
...
@@ -35,16 +35,6 @@ public class CandyMgtCouponTaskController {
...
@@ -35,16 +35,6 @@ public class CandyMgtCouponTaskController {
private
PlatformCandyMgtCouponService
platformCandyMgtCouponService
;
private
PlatformCandyMgtCouponService
platformCandyMgtCouponService
;
@Autowired
@Autowired
private
PlatformCandyCouponService
platformCandyCouponService
;
private
PlatformCandyCouponService
platformCandyCouponService
;
@Autowired
private
PlatformCandyCouponRuleService
platformCandyCouponRuleService
;
@Autowired
private
PlatformCandyCouponCodeService
platformCandyCouponCodeService
;
@Autowired
private
PlatformCandyUserCouponService
platformCandyUserCouponService
;
@Autowired
private
DMRdmService
dmRdmService
;
@Autowired
private
RedisUtil
redisUtil
;
@PostMapping
(
"issue/coupons"
)
@PostMapping
(
"issue/coupons"
)
public
void
issueCoupons
()
{
public
void
issueCoupons
()
{
...
@@ -52,98 +42,49 @@ public class CandyMgtCouponTaskController {
...
@@ -52,98 +42,49 @@ public class CandyMgtCouponTaskController {
.
eq
(
CandyMgtCoupon:
:
getState
,
0
)
.
eq
(
CandyMgtCoupon:
:
getState
,
0
)
.
orderByAsc
(
CandyMgtCoupon:
:
getEventAt
);
.
orderByAsc
(
CandyMgtCoupon:
:
getEventAt
);
List
<
CandyMgtCoupon
>
list
=
platformCandyMgtCouponService
.
list
(
queryWrapper
);
List
<
CandyMgtCoupon
>
list
=
platformCandyMgtCouponService
.
list
(
queryWrapper
);
int
taskSize
=
CollectionUtils
.
isEmpty
(
list
)
?
0
:
list
.
size
();
int
taskSize
=
CollectionUtils
.
isEmpty
(
list
)
?
-
1
:
list
.
size
();
log
.
info
(
"
issue coupons taskSize:{}
"
,
taskSize
);
log
.
info
(
"
发放券任务总数:{} >>> BEGIN BEGIN BEGIN
"
,
taskSize
);
LambdaQueryWrapper
<
CandyCoupon
>
couponQueryWrapper
=
Wrappers
.
lambdaQuery
(
CandyCoupon
.
class
).
eq
(
CandyCoupon:
:
getState
,
1
);
LambdaQueryWrapper
<
CandyCoupon
>
couponQueryWrapper
=
Wrappers
.
lambdaQuery
(
CandyCoupon
.
class
).
eq
(
CandyCoupon:
:
getState
,
1
);
LambdaQueryWrapper
<
CandyCouponRule
>
couponRuleQueryWrapper
=
Wrappers
.
lambdaQuery
(
CandyCouponRule
.
class
).
eq
(
CandyCouponRule:
:
getState
,
1
);
for
(
int
i
=
0
;
i
<
taskSize
;
i
++)
{
for
(
int
i
=
0
;
i
<
taskSize
;
i
++)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
CandyMgtCoupon
mgtCoupon
=
list
.
get
(
i
);
CandyMgtCoupon
mgtCoupon
=
list
.
get
(
i
);
CandyCoupon
coupon
=
platformCandyCouponService
.
getOne
(
couponQueryWrapper
.
eq
(
CandyCoupon:
:
getCouponId
,
mgtCoupon
.
getCouponId
())
);
mgtCoupon
.
setState
(
9
);
List
<
CandyCouponRuleDto
>
couponRuleDtoList
=
platformCandyCouponRuleService
.
listForCouponRuleDto
(
coupon
.
getCouponId
());
try
{
if
(
platformCandyMgtCouponService
.
updateById
(
mgtCoupon
))
{
CandyCoupon
coupon
=
platformCandyCouponService
.
getOne
(
couponQueryWrapper
.
eq
(
CandyCoupon:
:
getCouponId
,
mgtCoupon
.
getCouponId
()));
log
.
info
(
"发放券任务总数:{},任务{}开始处理[mcouponId:{},couType:{},bindType:{},eventAmt:{},eventType:{}]"
,
taskSize
,
i
,
mgtCoupon
.
getMcouponId
(),
coupon
.
getCouType
(),
coupon
.
getBindType
(),
mgtCoupon
.
getEventAmt
(),
mgtCoupon
.
getEventType
());
List
<
CandyCouponCode
>
initCouponCodeList
=
new
ArrayList
<>();
List
<
CandyUserCoupon
>
initUserCouponList
=
new
ArrayList
<>();
Integer
eventAmt
=
mgtCoupon
.
getEventAmt
();
for
(
int
j
=
0
;
j
<
eventAmt
;
j
++)
{
switch
(
coupon
.
getCouType
())
{
switch
(
coupon
.
getCouType
())
{
case
1
:
case
1
:
// 代金券
String
uid
=
dmRdmService
.
getUidByMobile
(
"17701223310"
);
platformCandyCouponService
.
issueCashCouponHandler
(
mgtCoupon
,
coupon
);
if
(
StringUtils
.
isNotEmpty
(
uid
))
{
CandyUserCoupon
userCoupon
=
new
CandyUserCoupon
();
userCoupon
.
setUcouponId
(
IDGenerator
.
get32UUID
());
userCoupon
.
setMcouponId
(
mgtCoupon
.
getMcouponId
());
userCoupon
.
setUid
(
uid
);
userCoupon
.
setCouponId
(
coupon
.
getCouponId
());
userCoupon
.
setState
(
1
);
userCoupon
.
setBindAt
(
now
);
initUserCouponList
.
add
(
userCoupon
);
}
break
;
break
;
case
2
:
case
2
:
// 满减券
platformCandyCouponService
.
issueOverMinusCouponHandler
(
mgtCoupon
,
coupon
);
break
;
break
;
case
3
:
// 兑换券
case
3
:
// 兑换券
CandyCouponCode
couponCode
=
new
CandyCouponCode
();
platformCandyCouponService
.
issueExchangeCouponHandler
(
mgtCoupon
,
coupon
);
couponCode
.
setCcode
(
RandomStringUtils
.
randomAlphanumeric
(
16
));
couponCode
.
setCouponId
(
coupon
.
getCouponId
());
couponCode
.
setState
(
0
);
couponCode
.
setCreatedAt
(
now
);
initCouponCodeList
.
add
(
couponCode
);
break
;
break
;
case
4
:
case
4
:
// 折扣券
platformCandyCouponService
.
issueDiscountCouponHandler
(
mgtCoupon
,
coupon
);
break
;
break
;
default
:
default
:
log
.
warn
(
"Invalid operation[mcouponId:{},couType:{}]"
,
mgtCoupon
.
getMcouponId
(),
coupon
.
getCouType
());
log
.
warn
(
"发放券任务总数:{},任务{}无法处理,无效的券类型[mcouponId:{},couType:{}]"
,
taskSize
,
i
,
mgtCoupon
.
getMcouponId
(),
coupon
.
getCouType
());
break
;
break
;
}
}
}
mgtCoupon
.
setState
(
1
);
boolean
update
=
platformCandyMgtCouponService
.
updateById
(
mgtCoupon
);
if
(!
initUserCouponList
.
isEmpty
()
&&
platformCandyUserCouponService
.
saveBatch
(
initUserCouponList
))
{
log
.
info
(
"发放券任务总数:{},任务{}处理{}[mcouponId:{},couType:{},bindType:{},eventAmt:{},eventType:{}]"
,
taskSize
,
i
,
(
update
?
"成功"
:
"失败"
),
CandyCouponInfoDto
couponInfoDto
=
new
CandyCouponInfoDto
();
mgtCoupon
.
getMcouponId
(),
coupon
.
getCouType
(),
coupon
.
getBindType
(),
mgtCoupon
.
getEventAmt
(),
mgtCoupon
.
getEventType
());
BeanUtils
.
copyProperties
(
coupon
,
couponInfoDto
);
couponInfoDto
.
setUseRules
(
couponRuleDtoList
);
String
key
=
CandyRedisConst
.
BASIC_COUPON_INFO
.
concat
(
couponInfoDto
.
getCouponId
());
redisUtil
.
set
(
key
,
couponInfoDto
);
initUserCouponList
.
forEach
(
r
->
{
String
uckey
=
CandyRedisConst
.
BASIC_USER_COUPON
.
concat
(
r
.
getUid
());
List
<
CandyUserCouponBasicDto
>
vos
=
(
List
<
CandyUserCouponBasicDto
>)
redisUtil
.
get
(
uckey
);
if
(
CollectionUtils
.
isEmpty
(
vos
))
{
vos
=
new
ArrayList
<>();
}
vos
.
add
(
CandyUserCouponBasicDto
.
getNew
().
copy
(
r
,
coupon
,
couponRuleDtoList
));
redisUtil
.
set
(
uckey
,
vos
);
});
}
}
}
catch
(
Exception
e
)
{
if
(!
initCouponCodeList
.
isEmpty
()
&&
platformCandyCouponCodeService
.
saveBatch
(
initCouponCodeList
))
{
log
.
error
(
"发放券任务总数:{},任务{}处理异常[mcouponId:{}]"
,
taskSize
,
i
,
mgtCoupon
.
getMcouponId
(),
e
);
CandyCouponInfoDto
couponInfoDto
=
new
CandyCouponInfoDto
();
BeanUtils
.
copyProperties
(
coupon
,
couponInfoDto
);
couponInfoDto
.
setUseRules
(
couponRuleDtoList
);
String
key
=
CandyRedisConst
.
BASIC_COUPON_INFO
.
concat
(
couponInfoDto
.
getCouponId
());
redisUtil
.
set
(
key
,
couponInfoDto
);
initCouponCodeList
.
forEach
(
r
->
{
redisUtil
.
set
(
CandyRedisConst
.
BASIC_COUPON_CODE
.
concat
(
r
.
getCcode
()),
CandyCouponCodeDto
.
getNew
().
copy
(
r
));
});
}
}
mgtCoupon
.
setState
(
1
);
LambdaUpdateWrapper
<
CandyMgtCoupon
>
mgtCouponUpdateWrapper
=
Wrappers
.
lambdaUpdate
(
CandyMgtCoupon
.
class
).
eq
(
CandyMgtCoupon:
:
getMcouponId
,
mgtCoupon
.
getMcouponId
());
boolean
update
=
platformCandyMgtCouponService
.
update
(
mgtCoupon
,
mgtCouponUpdateWrapper
);
log
.
info
(
"issue coupons mcouponId:{} ~ {}"
,
mgtCoupon
.
getMcouponId
(),
update
);
}
}
log
.
info
(
"发放券任务总数:{} >>> END END END"
,
taskSize
);
}
}
}
}
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/adam/PlatformAdamUserMemberService.java
0 → 100644
View file @
7e0af894
package
com
.
liquidnet
.
service
.
platform
.
service
.
impl
.
adam
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.service.adam.entity.AdamUserMember
;
import
com.liquidnet.service.adam.mapper.AdamUserMemberMapper
;
import
org.springframework.stereotype.Service
;
@Service
public
class
PlatformAdamUserMemberService
extends
ServiceImpl
<
AdamUserMemberMapper
,
AdamUserMember
>
{
}
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/candy/PlatformCandyCouponService.java
View file @
7e0af894
package
com
.
liquidnet
.
service
.
platform
.
service
.
impl
.
candy
;
package
com
.
liquidnet
.
service
.
platform
.
service
.
impl
.
candy
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.adam.entity.AdamUserMember
;
import
com.liquidnet.service.candy.constant.CandyRedisConst
;
import
com.liquidnet.service.candy.dto.CandyCouponCodeDto
;
import
com.liquidnet.service.candy.dto.CandyCouponInfoDto
;
import
com.liquidnet.service.candy.dto.CandyCouponRuleDto
;
import
com.liquidnet.service.candy.dto.CandyUserCouponBasicDto
;
import
com.liquidnet.service.candy.entity.CandyCoupon
;
import
com.liquidnet.service.candy.entity.CandyCoupon
;
import
com.liquidnet.service.candy.entity.CandyCouponCode
;
import
com.liquidnet.service.candy.entity.CandyMgtCoupon
;
import
com.liquidnet.service.candy.entity.CandyUserCoupon
;
import
com.liquidnet.service.candy.mapper.CandyCouponMapper
;
import
com.liquidnet.service.candy.mapper.CandyCouponMapper
;
import
com.liquidnet.service.platform.service.impl.adam.PlatformAdamUserMemberService
;
import
com.liquidnet.service.platform.service.impl.adam.dm.DMRdmService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.time.LocalDateTime
;
import
java.time.LocalTime
;
import
java.util.ArrayList
;
import
java.util.List
;
@Slf4j
@Service
@Service
public
class
PlatformCandyCouponService
extends
ServiceImpl
<
CandyCouponMapper
,
CandyCoupon
>
{
public
class
PlatformCandyCouponService
extends
ServiceImpl
<
CandyCouponMapper
,
CandyCoupon
>
{
@Autowired
private
PlatformCandyCouponRuleService
platformCandyCouponRuleService
;
@Autowired
private
PlatformCandyCouponCodeService
platformCandyCouponCodeService
;
@Autowired
private
PlatformCandyUserCouponService
platformCandyUserCouponService
;
@Autowired
private
PlatformAdamUserMemberService
platformAdamUserMemberService
;
@Autowired
private
DMRdmService
dmRdmService
;
@Autowired
private
RedisUtil
redisUtil
;
private
void
issueCouponProcessing
(
final
CandyMgtCoupon
mgtCoupon
,
final
CandyCoupon
coupon
)
{
List
<
CandyCouponRuleDto
>
couponRuleDtoList
=
platformCandyCouponRuleService
.
listForCouponRuleDto
(
coupon
.
getCouponId
());
CandyCouponInfoDto
couponInfoDto
=
new
CandyCouponInfoDto
();
BeanUtils
.
copyProperties
(
coupon
,
couponInfoDto
);
couponInfoDto
.
setUseRules
(
couponRuleDtoList
);
String
couponInfoDtoKey
=
CandyRedisConst
.
BASIC_COUPON_INFO
.
concat
(
couponInfoDto
.
getCouponId
());
redisUtil
.
set
(
couponInfoDtoKey
,
couponInfoDto
);
LocalDateTime
now
=
LocalDateTime
.
now
();
switch
(
coupon
.
getBindType
())
{
// 领取方式[0-用户输入兑换|1-发放至用户]
case
0
:
List
<
CandyCouponCode
>
initCouponCodeList
=
new
ArrayList
<>();
Integer
eventAmt
=
mgtCoupon
.
getEventAmt
();
boolean
batchFlag
=
eventAmt
>
1000
;
for
(
int
i
=
0
;
i
<
eventAmt
;
i
++)
{
CandyCouponCode
couponCode
=
new
CandyCouponCode
();
couponCode
.
setCcode
(
RandomStringUtils
.
randomAlphanumeric
(
16
));
couponCode
.
setCouponId
(
coupon
.
getCouponId
());
couponCode
.
setState
(
0
);
couponCode
.
setCreatedAt
(
now
);
initCouponCodeList
.
add
(
couponCode
);
if
(
batchFlag
&&
initCouponCodeList
.
size
()
>=
1000
)
{
if
(
platformCandyCouponCodeService
.
saveBatch
(
initCouponCodeList
))
{
initCouponCodeList
.
forEach
(
r
->
{
redisUtil
.
set
(
CandyRedisConst
.
BASIC_COUPON_CODE
.
concat
(
r
.
getCcode
()),
CandyCouponCodeDto
.
getNew
().
copy
(
r
));
});
initCouponCodeList
.
clear
();
}
else
{
throw
new
LiquidnetServiceException
(
"-1"
,
"券发放失败"
);
}
}
}
if
(
initCouponCodeList
.
size
()
>
0
&&
platformCandyCouponCodeService
.
saveBatch
(
initCouponCodeList
))
{
initCouponCodeList
.
forEach
(
r
->
{
redisUtil
.
set
(
CandyRedisConst
.
BASIC_COUPON_CODE
.
concat
(
r
.
getCcode
()),
CandyCouponCodeDto
.
getNew
().
copy
(
r
));
});
initCouponCodeList
.
clear
();
}
else
{
throw
new
LiquidnetServiceException
(
"-1"
,
"券发放失败"
);
}
break
;
case
1
:
List
<
CandyUserCoupon
>
initUserCouponList
=
new
ArrayList
<>();
switch
(
mgtCoupon
.
getEventType
())
{
// 发放类型[1-会员|2-手机号|10-全体用户]
case
1
:
LocalDateTime
nowEndTime
=
now
.
withHour
(
23
).
withMinute
(
59
).
withSecond
(
59
);
LambdaQueryWrapper
<
AdamUserMember
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
AdamUserMember
.
class
).
eq
(
AdamUserMember:
:
getState
,
1
)
.
gt
(
AdamUserMember:
:
getExpiryAt
,
nowEndTime
);
int
userMemberCount
=
platformAdamUserMemberService
.
count
(
queryWrapper
),
num
=
0
,
pSize
=
1000
;
log
.
info
(
"发放券任务:userMemberCount:{}"
,
userMemberCount
);
while
(
userMemberCount
>
0
)
{
initUserCouponList
.
clear
();
String
lastLimitSql
=
"LIMIT "
+
(
num
*
pSize
)
+
","
+
pSize
;
queryWrapper
.
orderByAsc
(
AdamUserMember:
:
getMid
).
last
(
lastLimitSql
);
queryWrapper
.
select
(
AdamUserMember:
:
getUid
);
List
<
AdamUserMember
>
userMemberList
=
platformAdamUserMemberService
.
list
(
queryWrapper
);
int
userMemberListSize
=
CollectionUtils
.
isEmpty
(
userMemberList
)
?
-
1
:
userMemberList
.
size
();
for
(
int
i
=
0
;
i
<
userMemberListSize
;
i
++)
{
AdamUserMember
userMember
=
userMemberList
.
get
(
i
);
CandyUserCoupon
userCoupon
=
new
CandyUserCoupon
();
userCoupon
.
setUcouponId
(
IDGenerator
.
get32UUID
());
userCoupon
.
setMcouponId
(
mgtCoupon
.
getMcouponId
());
userCoupon
.
setUid
(
userMember
.
getUid
());
userCoupon
.
setCouponId
(
coupon
.
getCouponId
());
userCoupon
.
setState
(
1
);
userCoupon
.
setBindAt
(
now
);
initUserCouponList
.
add
(
userCoupon
);
}
if
(!
initUserCouponList
.
isEmpty
())
{
if
(
platformCandyUserCouponService
.
saveBatch
(
initUserCouponList
))
{
initUserCouponList
.
forEach
(
r
->
{
String
uckey
=
CandyRedisConst
.
BASIC_USER_COUPON
.
concat
(
r
.
getUid
());
List
<
CandyUserCouponBasicDto
>
vos
=
(
List
<
CandyUserCouponBasicDto
>)
redisUtil
.
get
(
uckey
);
if
(
CollectionUtils
.
isEmpty
(
vos
))
{
vos
=
new
ArrayList
<>();
}
vos
.
add
(
CandyUserCouponBasicDto
.
getNew
().
copy
(
r
,
coupon
,
couponRuleDtoList
));
redisUtil
.
set
(
uckey
,
vos
);
});
}
else
{
throw
new
LiquidnetServiceException
(
"-1"
,
"券发放失败"
);
}
}
num
++;
userMemberCount
-=
pSize
;
log
.
info
(
"发放券任务:userMemberCount:{},"
+
lastLimitSql
,
userMemberCount
);
}
break
;
case
2
:
String
eventLimit
=
mgtCoupon
.
getEventLimit
();
String
[]
eventLimitArr
=
eventLimit
.
split
(
","
);
log
.
info
(
"发放券任务:eventLimitArrLength:{}"
,
eventLimitArr
.
length
);
for
(
String
r
:
eventLimitArr
)
{
String
uid
=
dmRdmService
.
getUidByMobile
(
r
);
if
(
StringUtils
.
isNotEmpty
(
uid
))
{
CandyUserCoupon
userCoupon
=
new
CandyUserCoupon
();
userCoupon
.
setUcouponId
(
IDGenerator
.
get32UUID
());
userCoupon
.
setMcouponId
(
mgtCoupon
.
getMcouponId
());
userCoupon
.
setUid
(
uid
);
userCoupon
.
setCouponId
(
coupon
.
getCouponId
());
userCoupon
.
setState
(
1
);
userCoupon
.
setBindAt
(
now
);
initUserCouponList
.
add
(
userCoupon
);
}
}
if
(!
initUserCouponList
.
isEmpty
()
&&
platformCandyUserCouponService
.
saveBatch
(
initUserCouponList
))
{
initUserCouponList
.
forEach
(
r
->
{
String
uckey
=
CandyRedisConst
.
BASIC_USER_COUPON
.
concat
(
r
.
getUid
());
List
<
CandyUserCouponBasicDto
>
vos
=
(
List
<
CandyUserCouponBasicDto
>)
redisUtil
.
get
(
uckey
);
if
(
CollectionUtils
.
isEmpty
(
vos
))
{
vos
=
new
ArrayList
<>();
}
vos
.
add
(
CandyUserCouponBasicDto
.
getNew
().
copy
(
r
,
coupon
,
couponRuleDtoList
));
redisUtil
.
set
(
uckey
,
vos
);
});
}
break
;
case
10
:
// TODO: 2021/8/24 具体发放方式待定
break
;
default
:
log
.
warn
(
"发放券任务:无法处理,无效的发放类型[mcouponId:{},eventType:{}]"
,
mgtCoupon
.
getMcouponId
(),
mgtCoupon
.
getEventType
());
break
;
}
break
;
default
:
log
.
warn
(
"发放券任务:无法处理,无效的领取方式[mcouponId:{},bindType:{}]"
,
mgtCoupon
.
getMcouponId
(),
coupon
.
getBindType
());
break
;
}
}
/**
* <p>
* 发放代金券
* </p>
*
* @param mgtCoupon CandyMgtCoupon
* @param coupon CandyCoupon
*/
public
void
issueCashCouponHandler
(
final
CandyMgtCoupon
mgtCoupon
,
final
CandyCoupon
coupon
)
{
this
.
issueCouponProcessing
(
mgtCoupon
,
coupon
);
}
/**
* <p>
* 发放满减券
* </p>
*
* @param mgtCoupon CandyMgtCoupon
* @param coupon CandyCoupon
*/
public
void
issueOverMinusCouponHandler
(
CandyMgtCoupon
mgtCoupon
,
CandyCoupon
coupon
)
{
this
.
issueCouponProcessing
(
mgtCoupon
,
coupon
);
}
/**
* <p>
* 发放兑换券
* </p>
*
* @param mgtCoupon CandyMgtCoupon
* @param coupon CandyCoupon
*/
public
void
issueExchangeCouponHandler
(
final
CandyMgtCoupon
mgtCoupon
,
final
CandyCoupon
coupon
)
{
this
.
issueCouponProcessing
(
mgtCoupon
,
coupon
);
}
/**
* <p>
* 发放折扣券
* </p>
*
* @param mgtCoupon CandyMgtCoupon
* @param coupon CandyCoupon
*/
public
void
issueDiscountCouponHandler
(
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