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
84e1c846
Commit
84e1c846
authored
Mar 29, 2021
by
孙昱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunyu::update::月享卡2.0虚拟商品加购报错修复以及 随单购场景促销返回月享卡信息回填
parent
f086e908
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
+17
-15
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
84e1c846
...
@@ -164,7 +164,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -164,7 +164,7 @@ public class ShoppingCartMCoffeeServiceImpl {
productIds
.
add
(
Long
.
parseLong
(
goodsId
));
productIds
.
add
(
Long
.
parseLong
(
goodsId
));
List
<
ProductBeanDTO
>
productBeanListSpuClass
=
null
;
List
<
ProductBeanDTO
>
productBeanListSpuClass
=
null
;
// 获取添加商品的详细信息
// 获取添加商品的详细信息
if
(
addShoppingCartGoodsRequestVo
.
getIsMonthCard
()
<
1
)
{
if
(
StringUtils
.
equals
(
"9999"
,
addShoppingCartGoodsRequestVo
.
getSkuId
())
)
{
productBeanListSpuClass
=
assortmentSdkService
.
getProductsInfoSdk
(
partnerId
,
storeId
,
Collections
.
singletonList
(
spuId2
),
menuType
,
this
.
shoppingCartBaseService
);
productBeanListSpuClass
=
assortmentSdkService
.
getProductsInfoSdk
(
partnerId
,
storeId
,
Collections
.
singletonList
(
spuId2
),
menuType
,
this
.
shoppingCartBaseService
);
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
View file @
84e1c846
...
@@ -138,26 +138,28 @@ public class CouponDiscountCalculation {
...
@@ -138,26 +138,28 @@ public class CouponDiscountCalculation {
// 匹配随单购悦享卡
// 匹配随单购悦享卡
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
Discount
discountMon
=
couponDiscounts
.
stream
().
filter
(
t
->
(
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
Discount
discountMon
=
couponDiscounts
.
stream
().
filter
(
t
->
(
(
ActivityTypeEnum
.
TYPE_3
2
.
getCode
().
equals
(
t
.
getType
())
||
ActivityTypeEnum
.
TYPE_3
7
.
getCode
().
equals
(
t
.
getType
())
||
ActivityTypeEnum
.
TYPE_38
.
getCode
().
equals
(
t
.
getType
()))
(
ActivityTypeEnum
.
TYPE_37
.
getCode
().
equals
(
t
.
getType
())
||
ActivityTypeEnum
.
TYPE_38
.
getCode
().
equals
(
t
.
getType
()))
&&
mccafeUniversalCouponCode
.
equals
(
t
.
getActivityCode
()))).
findFirst
().
orElse
(
null
);
&&
mccafeUniversalCouponCode
.
equals
(
t
.
getActivityCode
()))).
findFirst
().
orElse
(
null
);
//月享卡2.0随单购
if
(
null
!=
monthCardDiscount
){
for
(
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
Goods
goods
:
goodsList
)
{
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
card2Discount
=
goods
.
getDiscounts
().
stream
().
filter
(
goodsDiscount
->
ActivityTypeEnum
.
TYPE_38
.
getCode
()
==
goodsDiscount
.
getType
()).
findFirst
().
get
();
if
(
CollectionUtils
.
isNotEmpty
(
goods
.
getDiscounts
())
&&
null
!=
card2Discount
){
for
(
CartGoods
cartGoods
:
cartGoodsList
)
{
if
(
StringUtils
.
equals
(
cartGoods
.
getCartGoodsUid
(),
goods
.
getCartGoodsUid
())){
cartGoods
.
setIsMonthCardGoods
(
1
);
cartGoods
.
setCouponCode
(
card2Discount
.
getActivityCode
());
}
}
}
}
}
for
(
CartGoods
cartGoods
:
cartGoodsList
)
{
for
(
CartGoods
cartGoods
:
cartGoodsList
)
{
//商品券商品
//商品券商品
if
(
StringUtils
.
isNotBlank
(
cartGoods
.
getCouponCode
())
||
discountMon
!=
null
)
{
if
(
StringUtils
.
isNotBlank
(
cartGoods
.
getCouponCode
())
||
discountMon
!=
null
)
{
// String couponCode = cartGoods.getCouponCode();
// // 计算优惠信息时,已将券校验过,放在map中
// Map<String, CheckSpqInfoResponseDto> validCouponMap = calculationDiscountResult.getValidCouponMap();
// if (MapUtils.isNotEmpty(validCouponMap)) {
// CheckSpqInfoResponseDto checkSpqInfoResponseDto = validCouponMap.get(couponCode);
// if (checkSpqInfoResponseDto != null) {
// cartGoods.setOriginalPrice(checkSpqInfoResponseDto.getPrice());
// cartGoods.setSpuId(checkSpqInfoResponseDto.getSpuId());
// cartGoods.setSkuId(StringUtils.isEmpty(checkSpqInfoResponseDto.getSkuId()) ? checkSpqInfoResponseDto.getSpuId() : checkSpqInfoResponseDto.getSkuId());
// cartGoods.setQty(1);
// cartGoods.setCouponCode(checkSpqInfoResponseDto.getCouponCode());
// cartGoods.setSpuName(checkSpqInfoResponseDto.getSpuName());
// }
// }
if
(
goodsMap
.
get
(
cartGoods
.
getCartGoodsUid
())
==
null
)
{
if
(
goodsMap
.
get
(
cartGoods
.
getCartGoodsUid
())
==
null
)
{
continue
;
continue
;
}
}
...
...
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