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
53f4d7e5
Commit
53f4d7e5
authored
Oct 09, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/feature/促销算价基于最新master的分支' into qa
parents
95c20c0c
48b9f95b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/FullSharingService.java
+5
-4
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/FullSharingService.java
View file @
53f4d7e5
...
@@ -121,7 +121,7 @@ public class FullSharingService {
...
@@ -121,7 +121,7 @@ public class FullSharingService {
Long
md
=
mDiscount
.
get
(
com
.
getGoodsId
());
Long
md
=
mDiscount
.
get
(
com
.
getGoodsId
());
if
(
md
!=
null
)
{
if
(
md
!=
null
)
{
com
.
setAmount
(
com
.
getAmount
()
+
md
);
com
.
setAmount
(
com
.
getAmount
()
+
md
);
cart
.
setAmount
(
cart
.
getAmount
()
+
md
);
cart
.
setAmount
(
cart
.
getAmount
()
+
com
.
getAmount
()
);
}
}
}
}
}
}
...
@@ -312,14 +312,15 @@ public class FullSharingService {
...
@@ -312,14 +312,15 @@ public class FullSharingService {
* 抽取满减的折扣金额 按货对应
* 抽取满减的折扣金额 按货对应
* 小料和可选搭配
* 小料和可选搭配
*/
*/
public
HashMap
<
String
,
Long
>
drawnFullDiscount
(
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
SmallMaterial
>
materialDiscount
,
List
<
Integer
>
typeEnums
,
int
type
)
{
public
HashMap
<
String
,
Long
>
drawnFullDiscount
(
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
SmallMaterial
>
materialDiscount
,
List
<
Integer
>
typeEnums
,
Integer
type
)
{
HashMap
<
String
,
Long
>
hashMap
=
new
HashMap
<>();
HashMap
<
String
,
Long
>
hashMap
=
new
HashMap
<>();
if
(
CollectionUtils
.
isEmpty
(
materialDiscount
))
return
hashMap
;
if
(
CollectionUtils
.
isEmpty
(
materialDiscount
))
return
hashMap
;
for
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
SmallMaterial
smallMaterial
:
materialDiscount
)
{
for
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
SmallMaterial
smallMaterial
:
materialDiscount
)
{
if
(
CollectionUtils
.
isEmpty
(
smallMaterial
.
getDiscounts
()))
continue
;
if
(
CollectionUtils
.
isEmpty
(
smallMaterial
.
getDiscounts
())
&&
!
type
.
equals
(
smallMaterial
.
getType
()))
continue
;
for
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
discount
:
smallMaterial
.
getDiscounts
())
{
for
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
discount
:
smallMaterial
.
getDiscounts
())
{
if
(
typeEnums
.
contains
(
discount
.
getType
()))
{
if
(
typeEnums
.
contains
(
discount
.
getType
()))
{
hashMap
.
put
(
discount
.
getGoodsId
(),
discount
.
getDiscount
());
hashMap
.
put
(
discount
.
getGoodsId
(),
discount
.
getDiscount
());
}
}
}
}
}
}
...
...
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