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
b82cc67e
Commit
b82cc67e
authored
Oct 20, 2021
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品券支持套餐
parent
fe4aa3c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
23 deletions
+25
-23
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationCommonService.java
+25
-23
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationCommonService.java
View file @
b82cc67e
...
...
@@ -625,31 +625,33 @@ public class CalculationCommonService {
HashMap
<
String
,
BlockRow
>
map
=
new
HashMap
<>();
if
(
goods
==
null
)
return
map
;
//固定搭配
if
(
isFixed
)
{
for
(
GroupCombox
gx
:
goods
.
getGroupCombox
())
{
BlockRow
blockRow
=
new
BlockRow
();
blockRow
.
setDiscountAmount
(
gx
.
getDiscountAmount
());
blockRow
.
setGoodsId
(
gx
.
getGoodsId
());
blockRow
.
setGoodsId
(
gx
.
getGoodsId
());
blockRow
.
setGoodsQuantity
(
gx
.
getGoodsQuantity
());
blockRow
.
setOriginalPrice
(
gx
.
getOriginalPrice
());
blockRow
.
setRealAmount
(
gx
.
getRealAmount
());
List
<
Discounts
>
discounts
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
gx
.
getDiscounts
()))
{
for
(
GoodsDiscount
ds
:
gx
.
getDiscounts
())
{
Discounts
discount
=
new
Discounts
();
discount
.
setActivityCode
(
ds
.
getActivityCode
());
discount
.
setActivityDesc
(
ds
.
getActivityDesc
());
discount
.
setActivityName
(
ds
.
getActivityName
());
discount
.
setActualGoodsNumber
(
ds
.
getActualGoodsNumber
());
discount
.
setDiscount
(
ds
.
getDiscount
());
discount
.
setGoodsId
(
ds
.
getGoodsId
());
discount
.
setType
(
ds
.
getType
());
discounts
.
add
(
discount
);
if
(
isFixed
)
{
if
(
CollectionUtils
.
isNotEmpty
(
goods
.
getGroupCombox
())){
for
(
GroupCombox
gx
:
goods
.
getGroupCombox
())
{
BlockRow
blockRow
=
new
BlockRow
();
blockRow
.
setDiscountAmount
(
gx
.
getDiscountAmount
());
blockRow
.
setGoodsId
(
gx
.
getGoodsId
());
blockRow
.
setGoodsId
(
gx
.
getGoodsId
());
blockRow
.
setGoodsQuantity
(
gx
.
getGoodsQuantity
());
blockRow
.
setOriginalPrice
(
gx
.
getOriginalPrice
());
blockRow
.
setRealAmount
(
gx
.
getRealAmount
());
List
<
Discounts
>
discounts
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
gx
.
getDiscounts
()))
{
for
(
GoodsDiscount
ds
:
gx
.
getDiscounts
())
{
Discounts
discount
=
new
Discounts
();
discount
.
setActivityCode
(
ds
.
getActivityCode
());
discount
.
setActivityDesc
(
ds
.
getActivityDesc
());
discount
.
setActivityName
(
ds
.
getActivityName
());
discount
.
setActualGoodsNumber
(
ds
.
getActualGoodsNumber
());
discount
.
setDiscount
(
ds
.
getDiscount
());
discount
.
setGoodsId
(
ds
.
getGoodsId
());
discount
.
setType
(
ds
.
getType
());
discounts
.
add
(
discount
);
}
}
blockRow
.
setDiscounts
(
discounts
);
map
.
put
(
gx
.
getGoodsId
(),
blockRow
);
}
blockRow
.
setDiscounts
(
discounts
);
map
.
put
(
gx
.
getGoodsId
(),
blockRow
);
}
}
//可选搭配及小料
...
...
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