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
51e3855c
Commit
51e3855c
authored
Sep 27, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接促销算价Alpha->fix
parent
2d01bd54
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/FullSharingService.java
+7
-5
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/FullSharingService.java
View file @
51e3855c
...
@@ -102,12 +102,13 @@ public class FullSharingService {
...
@@ -102,12 +102,13 @@ public class FullSharingService {
//小料
//小料
if
(
CollectionUtils
.
isNotEmpty
(
cart
.
getProductMaterialList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
cart
.
getProductMaterialList
()))
{
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
SmallMaterial
>
materialDiscount
=
discountMap
.
getSmallMaterial
();
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
SmallMaterial
>
materialDiscount
=
discountMap
.
getSmallMaterial
();
HashMap
<
String
,
Long
>
mDiscount
=
drawnFullDiscount
(
materialDiscount
,
typeEnums
,
1
);
HashMap
<
String
,
Long
>
mDiscount
=
drawnFullDiscount
(
materialDiscount
,
typeEnums
,
1
);
if
(!
mDiscount
.
isEmpty
())
continue
;
if
(!
mDiscount
.
isEmpty
())
{
for
(
CartGoods
.
MaterialGoods
mt
:
cart
.
getProductMaterialList
())
{
for
(
CartGoods
.
MaterialGoods
mt
:
cart
.
getProductMaterialList
())
{
Long
md
=
mDiscount
.
get
(
mt
.
getSpuId
());
Long
md
=
mDiscount
.
get
(
mt
.
getSpuId
());
if
(
md
!=
null
)
{
if
(
md
!=
null
)
{
mt
.
setAmount
(
mt
.
getAmount
()+
md
);
mt
.
setAmount
(
mt
.
getAmount
()
+
md
);
}
}
}
}
}
}
}
...
@@ -115,7 +116,7 @@ public class FullSharingService {
...
@@ -115,7 +116,7 @@ public class FullSharingService {
if
(
CollectionUtils
.
isNotEmpty
(
cart
.
getProductGroupList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
cart
.
getProductGroupList
()))
{
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
SmallMaterial
>
materialDiscount
=
discountMap
.
getSmallMaterial
();
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
SmallMaterial
>
materialDiscount
=
discountMap
.
getSmallMaterial
();
HashMap
<
String
,
Long
>
mDiscount
=
drawnFullDiscount
(
materialDiscount
,
typeEnums
,
2
);
HashMap
<
String
,
Long
>
mDiscount
=
drawnFullDiscount
(
materialDiscount
,
typeEnums
,
2
);
if
(!
mDiscount
.
isEmpty
())
continue
;
if
(!
mDiscount
.
isEmpty
())
{
for
(
CartGoods
.
ComboxGoods
com
:
cart
.
getProductGroupList
())
{
for
(
CartGoods
.
ComboxGoods
com
:
cart
.
getProductGroupList
())
{
Long
md
=
mDiscount
.
get
(
com
.
getGoodsId
());
Long
md
=
mDiscount
.
get
(
com
.
getGoodsId
());
if
(
md
!=
null
)
{
if
(
md
!=
null
)
{
...
@@ -124,6 +125,7 @@ public class FullSharingService {
...
@@ -124,6 +125,7 @@ public class FullSharingService {
}
}
}
}
}
}
}
//固定搭配
//固定搭配
//if (CollectionUtils.isNotEmpty(cart.getProductComboList())) {
//if (CollectionUtils.isNotEmpty(cart.getProductComboList())) {
// List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GroupCombox> groupCom = discountMap.getGroupCombox();
// List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GroupCombox> groupCom = discountMap.getGroupCombox();
...
...
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