Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
f0a00d81
Commit
f0a00d81
authored
Oct 27, 2020
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不核销配置的券
parent
57630dab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
order-application-service/src/main/java/cn/freemud/service/mccafe/impl/CouponClientServiceImpl.java
+6
-1
No files found.
order-application-service/src/main/java/cn/freemud/service/mccafe/impl/CouponClientServiceImpl.java
View file @
f0a00d81
...
...
@@ -36,6 +36,7 @@ import com.google.common.base.Throwables;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
...
...
@@ -60,6 +61,9 @@ public class CouponClientServiceImpl implements CouponClientService {
@Autowired
private
EmailAlertService
emailAlertService
;
@Value
(
"${mccafe.universal.coupon.code}"
)
private
String
withOrderBuyCouponCode
;
@Override
public
CouponRedeemResponse
redeem
(
MCCafeCouponRequest
mcCafeCouponRequest
)
{
return
couponOfflineMCCafeClient
.
redeem
(
mcCafeCouponRequest
);
...
...
@@ -75,6 +79,7 @@ public class CouponClientServiceImpl implements CouponClientService {
||
orderAdapter
.
getQueryOrderAccountType
(
OldOrderAccountType
.
getByCode
(
account
.
getType
())).
equals
(
QueryOrderAccountType
.
PRODUCT_COUPON
)
||
orderAdapter
.
getQueryOrderAccountType
(
OldOrderAccountType
.
getByCode
(
account
.
getType
())).
equals
(
QueryOrderAccountType
.
DISCOUNT_COUPON
)
||
orderAdapter
.
getQueryOrderAccountType
(
OldOrderAccountType
.
getByCode
(
account
.
getType
())).
equals
(
QueryOrderAccountType
.
FREIGHT_COUPON
))
&&
!
withOrderBuyCouponCode
.
equals
(
account
.
getAccountId
())
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
accountList
))
{
return
null
;
...
...
@@ -147,7 +152,7 @@ public class CouponClientServiceImpl implements CouponClientService {
||
OldOrderAccountType
.
COUPON
.
equals
(
OldOrderAccountType
.
getByCode
(
account
.
getType
()))
||
OldOrderAccountType
.
DISCOUNT_COUPON
.
equals
(
OldOrderAccountType
.
getByCode
(
account
.
getType
()))
||
OldOrderAccountType
.
FREIGHT_COUPON
.
equals
(
OldOrderAccountType
.
getByCode
(
account
.
getType
()))
)).
collect
(
Collectors
.
toList
());
)
&&
!
withOrderBuyCouponCode
.
equals
(
account
.
getAccountId
())
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
accountList
))
{
return
null
;
}
...
...
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