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
3c38e15f
Commit
3c38e15f
authored
Oct 10, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接促销算价Alpha->fix
parent
5801b83d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
12 deletions
+1
-12
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/AdditionSharingService.java
+1
-12
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/AdditionSharingService.java
View file @
3c38e15f
...
@@ -246,17 +246,6 @@ public class AdditionSharingService {
...
@@ -246,17 +246,6 @@ public class AdditionSharingService {
throw
new
ServiceException
(
ResponseResult
.
PREMIUM_EXCHANGE_ACTIVITY_NOT_EXIST
);
throw
new
ServiceException
(
ResponseResult
.
PREMIUM_EXCHANGE_ACTIVITY_NOT_EXIST
);
}
}
//检查是否有加价购商品
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
sendActivity
=
discountResult
.
getSendGoods
()
.
stream
()
.
filter
(
s
->
ActivityTypeEnum
.
TYPE_81
.
getCode
().
equals
(
s
.
getActivityType
()))
.
collect
(
Collectors
.
toList
()).
get
(
0
);
Map
<
String
,
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
>
sendGoodsMap
=
sendActivity
.
getSendGoods
()
.
stream
()
.
collect
(
Collectors
.
toMap
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
::
getGoodsId
,
Function
.
identity
(),
(
k1
,
k2
)
->
k1
));
//添加商品行
//添加商品行
List
<
String
>
productIds
=
premiumExchangeActivity
.
getProducts
().
stream
().
map
(
p
->
StringUtils
.
isEmpty
(
p
.
getSkuId
())
?
p
.
getSpuId
()
:
p
.
getSkuId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
productIds
=
premiumExchangeActivity
.
getProducts
().
stream
().
map
(
p
->
StringUtils
.
isEmpty
(
p
.
getSkuId
())
?
p
.
getSpuId
()
:
p
.
getSkuId
()).
collect
(
Collectors
.
toList
());
Map
<
String
,
GetProductsVo
>
getProductsVoMap
=
itemService
.
getProducts
(
productIds
,
shoppingCartInfoRequestVo
.
getPartnerId
(),
shoppingCartInfoRequestVo
.
getShopId
(),
BusinessTypeEnum
.
getByType
(
shoppingCartInfoRequestVo
.
getMenuType
()).
getCode
());
Map
<
String
,
GetProductsVo
>
getProductsVoMap
=
itemService
.
getProducts
(
productIds
,
shoppingCartInfoRequestVo
.
getPartnerId
(),
shoppingCartInfoRequestVo
.
getShopId
(),
BusinessTypeEnum
.
getByType
(
shoppingCartInfoRequestVo
.
getMenuType
()).
getCode
());
...
@@ -276,7 +265,6 @@ public class AdditionSharingService {
...
@@ -276,7 +265,6 @@ public class AdditionSharingService {
if
(
null
==
getProductsVo
)
{
if
(
null
==
getProductsVo
)
{
continue
;
continue
;
}
}
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
send
=
sendGoodsMap
.
get
(
goodsId
);
ShoppingCartGoodsDto
.
CartGoodsDetailDto
cartGoodsDetailDto
=
this
.
getCartGoodsDetailDto
(
product
,
getProductsVo
,
goodsId
,
hgGood
);
ShoppingCartGoodsDto
.
CartGoodsDetailDto
cartGoodsDetailDto
=
this
.
getCartGoodsDetailDto
(
product
,
getProductsVo
,
goodsId
,
hgGood
);
shoppingCartGoodsDto
.
getProducts
().
add
(
cartGoodsDetailDto
);
shoppingCartGoodsDto
.
getProducts
().
add
(
cartGoodsDetailDto
);
//2.计算优惠价格
//2.计算优惠价格
...
@@ -284,6 +272,7 @@ public class AdditionSharingService {
...
@@ -284,6 +272,7 @@ public class AdditionSharingService {
totalDiscountAmount
+=
cartGoodsDetailDto
.
getTotalDiscountAmount
();
totalDiscountAmount
+=
cartGoodsDetailDto
.
getTotalDiscountAmount
();
currenttotalDiscountAmount
+=
cartGoodsDetailDto
.
getTotalDiscountAmount
();
currenttotalDiscountAmount
+=
cartGoodsDetailDto
.
getTotalDiscountAmount
();
// 3.设置商品行优惠明细
// 3.设置商品行优惠明细
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
sendActivity
=
hgGood
.
getDiscounts
().
get
(
0
);
ActivityDiscountsDto
activityDiscountsDto
=
new
ActivityDiscountsDto
();
ActivityDiscountsDto
activityDiscountsDto
=
new
ActivityDiscountsDto
();
activityDiscountsDto
.
setActivityCode
(
sendActivity
.
getActivityCode
());
activityDiscountsDto
.
setActivityCode
(
sendActivity
.
getActivityCode
());
activityDiscountsDto
.
setActivityName
(
sendActivity
.
getActivityName
());
activityDiscountsDto
.
setActivityName
(
sendActivity
.
getActivityName
());
...
...
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