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
07b1389e
Commit
07b1389e
authored
Aug 07, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/feature/1.9.32_商品加料' into qa
parents
36029123
21ba2926
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/MaterialPromotionService.java
+4
-4
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/MaterialPromotionService.java
View file @
07b1389e
...
@@ -47,7 +47,7 @@ public class MaterialPromotionService implements IPromotionService {
...
@@ -47,7 +47,7 @@ public class MaterialPromotionService implements IPromotionService {
if
(
map
!=
null
&&
!
map
.
isEmpty
())
{
if
(
map
!=
null
&&
!
map
.
isEmpty
())
{
for
(
CartGoods
cartGoods
:
cartGoodsList
)
{
for
(
CartGoods
cartGoods
:
cartGoodsList
)
{
//非正常商品
//非正常商品
if
(
CollectionUtils
.
isEmpty
(
cartGoods
.
getProductMaterialList
())
||
!
cartGoods
.
getGoodsType
().
equals
(
GoodsTypeEnum
.
COMMON_GOODS
.
getGoodsType
())
)
if
(
CollectionUtils
.
isEmpty
(
cartGoods
.
getProductMaterialList
()))
continue
;
continue
;
for
(
CartGoods
.
MaterialGoods
materialGoods
:
cartGoods
.
getProductMaterialList
())
{
for
(
CartGoods
.
MaterialGoods
materialGoods
:
cartGoods
.
getProductMaterialList
())
{
MaterialApportion
apportion
=
map
.
get
(
materialGoods
.
getSpuId
());
MaterialApportion
apportion
=
map
.
get
(
materialGoods
.
getSpuId
());
...
@@ -60,7 +60,7 @@ public class MaterialPromotionService implements IPromotionService {
...
@@ -60,7 +60,7 @@ public class MaterialPromotionService implements IPromotionService {
long
materialAmount
=
0L
,
materialOriginal
=
0L
;
long
materialAmount
=
0L
,
materialOriginal
=
0L
;
for
(
CartGoods
cartGoods
:
cartGoodsList
)
{
for
(
CartGoods
cartGoods
:
cartGoodsList
)
{
if
(
CollectionUtils
.
isEmpty
(
cartGoods
.
getProductMaterialList
())
||
!
cartGoods
.
getGoodsType
().
equals
(
GoodsTypeEnum
.
COMMON_GOODS
.
getGoodsType
())
)
if
(
CollectionUtils
.
isEmpty
(
cartGoods
.
getProductMaterialList
()))
continue
;
continue
;
materialAmount
=
0L
;
materialAmount
=
0L
;
materialOriginal
=
0L
;
materialOriginal
=
0L
;
...
@@ -86,10 +86,10 @@ public class MaterialPromotionService implements IPromotionService {
...
@@ -86,10 +86,10 @@ public class MaterialPromotionService implements IPromotionService {
@Override
@Override
public
void
updateShoppingCartGoodsApportion
(
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
,
ShoppingCartGoodsDto
shoppingCartGoodsDto
,
CreateOrderVo
.
PremiumExchangeActivity
premiumExchangeActivity
,
ShoppingCartInfoRequestVo
shoppingCartInfoRequestVo
)
{
public
void
updateShoppingCartGoodsApportion
(
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
,
ShoppingCartGoodsDto
shoppingCartGoodsDto
,
CreateOrderVo
.
PremiumExchangeActivity
premiumExchangeActivity
,
ShoppingCartInfoRequestVo
shoppingCartInfoRequestVo
)
{
HashMap
<
String
,
MaterialApportion
>
map
=
getApportionGoodsDetail
(
calculationDiscountResult
);
HashMap
<
String
,
MaterialApportion
>
map
=
getApportionGoodsDetail
(
calculationDiscountResult
);
if
(
map
==
null
&&
map
.
isEmpty
())
return
;
if
(
map
==
null
||
map
.
isEmpty
())
return
;
List
<
ShoppingCartGoodsDto
.
CartGoodsDetailDto
>
products
=
shoppingCartGoodsDto
.
getProducts
();
List
<
ShoppingCartGoodsDto
.
CartGoodsDetailDto
>
products
=
shoppingCartGoodsDto
.
getProducts
();
for
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
product
:
products
)
{
for
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
product
:
products
)
{
if
(
CollectionUtils
.
isEmpty
(
product
.
getMaterialList
())
||
!
product
.
getProductType
().
equals
(
GoodsTypeEnum
.
COMMON_GOODS
.
getGoodsType
())
)
if
(
CollectionUtils
.
isEmpty
(
product
.
getMaterialList
()))
continue
;
continue
;
for
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
.
MaterialGoods
materialGoods
:
product
.
getMaterialList
())
{
for
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
.
MaterialGoods
materialGoods
:
product
.
getMaterialList
())
{
MaterialApportion
material
=
map
.
get
(
materialGoods
.
getSpuId
());
MaterialApportion
material
=
map
.
get
(
materialGoods
.
getSpuId
());
...
...
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