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
jenkins
order-group
Commits
3f0df066
Commit
3f0df066
authored
Dec 12, 2019
by
shuhu.hou@freemud.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复满赠空指针
parent
77388c8d
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/BuyAndGiftsPromotionService.java
+4
-4
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/BuyAndGiftsPromotionService.java
View file @
3f0df066
...
@@ -52,7 +52,7 @@ public class BuyAndGiftsPromotionService implements IPromotionService {
...
@@ -52,7 +52,7 @@ public class BuyAndGiftsPromotionService implements IPromotionService {
}
}
List
<
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
>
sendGoodsList
=
new
ArrayList
<>();
List
<
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
>
sendGoodsList
=
new
ArrayList
<>();
sendActivities
.
forEach
(
sendActivity
->
sendGoodsList
.
addAll
(
sendActivity
.
getSendGoods
()));
sendActivities
.
forEach
(
sendActivity
->
sendGoodsList
.
addAll
(
sendActivity
.
getSendGoods
()));
List
<
ProductBeanDTO
>
productBeanDTOS
=
buildActivityProduct
(
shoppingCartInfoRequestV
o
,
sendGoodsList
);
List
<
ProductBeanDTO
>
productBeanDTOS
=
buildActivityProduct
(
activityQueryDt
o
,
sendGoodsList
);
if
(
CollectionUtils
.
isEmpty
(
productBeanDTOS
))
{
if
(
CollectionUtils
.
isEmpty
(
productBeanDTOS
))
{
return
;
return
;
}
}
...
@@ -141,14 +141,14 @@ public class BuyAndGiftsPromotionService implements IPromotionService {
...
@@ -141,14 +141,14 @@ public class BuyAndGiftsPromotionService implements IPromotionService {
}
}
/**
/**
* @param
shoppingCartInfoRequestV
o
* @param
activityQueryDt
o
* @param sendGoodsList
* @param sendGoodsList
* @return
* @return
*/
*/
private
List
<
ProductBeanDTO
>
buildActivityProduct
(
ShoppingCartInfoRequestVo
shoppingCartInfoRequestV
o
,
List
<
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
>
sendGoodsList
)
{
private
List
<
ProductBeanDTO
>
buildActivityProduct
(
ActivityQueryDto
activityQueryDt
o
,
List
<
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
>
sendGoodsList
)
{
//获取
//获取
List
<
String
>
goodsIds
=
sendGoodsList
.
stream
().
map
(
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
::
getGoodsId
).
collect
(
Collectors
.
toList
());
List
<
String
>
goodsIds
=
sendGoodsList
.
stream
().
map
(
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
::
getGoodsId
).
collect
(
Collectors
.
toList
());
List
<
ProductBeanDTO
>
productBeanList
=
assortmentSdkService
.
getProductsInfoSdk
(
shoppingCartInfoRequestVo
.
getPartnerId
(),
shoppingCartInfoRequestVo
.
getShop
Id
(),
goodsIds
,
shoppingCartBaseService
);
List
<
ProductBeanDTO
>
productBeanList
=
assortmentSdkService
.
getProductsInfoSdk
(
activityQueryDto
.
getPartnerId
(),
activityQueryDto
.
getStore
Id
(),
goodsIds
,
shoppingCartBaseService
);
if
(
CollectionUtils
.
isEmpty
(
productBeanList
))
{
if
(
CollectionUtils
.
isEmpty
(
productBeanList
))
{
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_GIFTS_PRODUCT_NOT_EXIST
);
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_GIFTS_PRODUCT_NOT_EXIST
);
}
}
...
...
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