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
2d01bd54
Commit
2d01bd54
authored
Sep 27, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接促销算价Alpha->fix
parent
128c0cd3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationCommonService.java
+1
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/FullSharingService.java
+14
-13
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationCommonService.java
View file @
2d01bd54
...
...
@@ -102,6 +102,7 @@ public class CalculationCommonService {
long
original
=
0L
;
//
for
(
CartGoods
.
ComboxGoods
choice
:
cartGoods
.
getProductGroupList
())
{
//可选搭配
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
SmallMaterial
mt
=
choices
.
get
(
choice
.
getGoodsId
());
if
(
mt
==
null
)
{
amount
+=
choice
.
getAmount
()
*
cartGoods
.
getQty
();
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/FullSharingService.java
View file @
2d01bd54
...
...
@@ -118,23 +118,24 @@ public class FullSharingService {
if
(!
mDiscount
.
isEmpty
())
continue
;
for
(
CartGoods
.
ComboxGoods
com
:
cart
.
getProductGroupList
())
{
Long
md
=
mDiscount
.
get
(
com
.
getGoodsId
());
if
(
md
!=
null
)
{
com
.
setAmount
(
com
.
getAmount
()+
md
);
if
(
md
!=
null
)
{
com
.
setAmount
(
com
.
getAmount
()
+
md
);
cart
.
setAmount
(
cart
.
getAmount
()
+
md
);
}
}
}
//固定搭配
if
(
CollectionUtils
.
isNotEmpty
(
cart
.
getProductComboList
()))
{
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GroupCombox
>
groupCom
=
discountMap
.
getGroupCombox
();
HashMap
<
String
,
Long
>
gDiscount
=
drawnFullDiscount
(
groupCom
,
typeEnums
);
if
(!
gDiscount
.
isEmpty
())
continue
;
for
(
CartGoods
.
ComboxGoods
com
:
cart
.
getProductComboList
())
{
Long
md
=
gDiscount
.
get
(
com
.
getGoodsId
());
if
(
md
!=
null
)
{
com
.
setAmount
(
com
.
getAmount
()+
md
);
}
}
}
//
if (CollectionUtils.isNotEmpty(cart.getProductComboList())) {
//
List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GroupCombox> groupCom = discountMap.getGroupCombox();
//
HashMap<String, Long> gDiscount = drawnFullDiscount(groupCom, typeEnums);
//
if (!gDiscount.isEmpty()) continue;
//
for (CartGoods.ComboxGoods com : cart.getProductComboList()) {
//
Long md = gDiscount.get(com.getGoodsId());
//
if (md!=null) {
//
com.setAmount(com.getAmount()+md);
//
}
//
}
//
}
}
/**
...
...
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