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
7f62d4df
Commit
7f62d4df
authored
Dec 23, 2020
by
刘鹏飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加些日志
parent
3e977a00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
order-application-service/src/main/java/cn/freemud/service/coupon/impl/CocoCouponRelationServiceImpl.java
+3
-2
No files found.
order-application-service/src/main/java/cn/freemud/service/coupon/impl/CocoCouponRelationServiceImpl.java
View file @
7f62d4df
...
...
@@ -96,7 +96,7 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService {
}
}
log
.
info
(
"coco订单核销优惠券,
productMap:{}"
,
JSONObject
.
toJSONString
(
productMap
));
log
.
info
(
"coco订单核销优惠券,
orderCode:{},productMap:{}"
,
orderBean
.
getOid
()
,
JSONObject
.
toJSONString
(
productMap
));
// 根据活动号分组,没有活动号的直接筛选掉
Map
<
String
,
List
<
OrderSettlementResp
>>
orderSettlementMap
=
orderSettlementList
.
stream
().
filter
(
os
->
StringUtils
.
isNotEmpty
(
os
.
getExternalObjectId
()))
...
...
@@ -131,7 +131,7 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService {
List
<
OrderSettlementResp
>
orderSettlementRemain
=
new
ArrayList
<>();
// 已经计算过的促销商品优惠信息
List
<
OrderSettlementResp
>
orderSettlementAlready
=
new
ArrayList
<>();
log
.
info
(
"coco订单核销优惠券,orderCode:{},orderSettlementMap:{}"
,
orderBean
.
getOid
(),
JSONObject
.
toJSONString
(
orderSettlementMap
));
for
(
Map
.
Entry
<
String
,
List
<
OrderSettlementResp
>>
m
:
orderSettlementMap
.
entrySet
())
{
// 活动相应的促销明细
...
...
@@ -223,6 +223,7 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService {
// 带有商品的券,计算完之后,要计算整单的优惠券,
// 整单的商品减掉单品优惠后的剩下的就都是整单券的商品
log
.
info
(
"coco订单核销优惠券,orderCode:{},orderSettlementRemain:{}"
,
orderBean
.
getOid
(),
JSONObject
.
toJSONString
(
orderSettlementRemain
));
if
(!
orderSettlementRemain
.
isEmpty
()){
Map
<
String
,
IntSummaryStatistics
>
collect
=
orderSettlementAlready
.
stream
().
collect
(
Collectors
.
groupingBy
(
OrderSettlementResp:
:
getProductId
,
Collectors
.
summarizingInt
(
OrderSettlementResp:
:
getNumber
)));
...
...
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