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
6c4d8407
Commit
6c4d8407
authored
Sep 25, 2020
by
huiyang.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
麦咖啡咖啡月卡开发 优化
parent
cbb38165
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
8 deletions
+29
-8
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+29
-8
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
6c4d8407
...
@@ -303,6 +303,8 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -303,6 +303,8 @@ public class ShoppingCartMCoffeeServiceImpl {
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsList
))
{
// check购物车中所有商品
// check购物车中所有商品
cartGoodsList
=
checkCartGoods
(
partnerId
,
storeId
,
orderType
,
menuType
,
shoppingCartGoodsResponseVo
,
cartGoodsList
);
cartGoodsList
=
checkCartGoods
(
partnerId
,
storeId
,
orderType
,
menuType
,
shoppingCartGoodsResponseVo
,
cartGoodsList
);
// 重新存储最新购物车
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
""
,
shoppingCartBaseService
);
//校验咖啡月卡的商品是否在购物车里面存在
//校验咖啡月卡的商品是否在购物车里面存在
List
<
String
>
goodsId
=
shoppingCartInfoRequestVo
.
getGoodsId
();
List
<
String
>
goodsId
=
shoppingCartInfoRequestVo
.
getGoodsId
();
...
@@ -316,16 +318,35 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -316,16 +318,35 @@ public class ShoppingCartMCoffeeServiceImpl {
return
ResponseUtil
.
error
(
ResponseResult
.
SHOPPING_CART_GOODS_CHECK_ERROR
);
return
ResponseUtil
.
error
(
ResponseResult
.
SHOPPING_CART_GOODS_CHECK_ERROR
);
}
}
CartGoods
cartGoods
=
cartGoodsListNew
.
stream
().
max
(
Comparator
.
comparing
(
CartGoods:
:
getOriginalPrice
)).
get
();
CartGoods
cartGoods
=
cartGoodsListNew
.
stream
().
max
(
Comparator
.
comparing
(
CartGoods:
:
getOriginalPrice
)).
get
();
for
(
CartGoods
cart:
cartGoodsList
)
{
if
(
cartGoods
!=
null
){
if
(
cart
.
getCartGoodsUid
().
equals
(
cartGoods
.
getCartGoodsUid
())){
//修改购物车商品数量
cart
.
setCategoryName
(
shoppingCartInfoRequestVo
.
getCoffeeCouponName
());
UpdateShoppingCartGoodsQtyRequestVo
vo
=
new
UpdateShoppingCartGoodsQtyRequestVo
();
cart
.
setCouponCode
(
shoppingCartInfoRequestVo
.
getCoffeeCouponCode
());
vo
.
setCartGoodsUid
(
cartGoods
.
getCartGoodsUid
());
}
vo
.
setPartnerId
(
partnerId
);
vo
.
setQty
(
cartGoods
.
getQty
()
-
1
);
vo
.
setOrderType
(
orderType
);
vo
.
setShopId
(
storeId
);
vo
.
setMenuType
(
menuType
);
vo
.
setChannelType
(
shoppingCartInfoRequestVo
.
getChannelType
());
vo
.
setAppId
(
appId
);
updateGoodsQty
(
vo
);
//添加商品券到购物车
MCoffeeAddGoodsRequestVo
requestVo
=
new
MCoffeeAddGoodsRequestVo
();
requestVo
.
setAppId
(
appId
);
requestVo
.
setCategoryName
(
"DSPQ"
);
requestVo
.
setCategoryName
(
shoppingCartInfoRequestVo
.
getCoffeeCouponName
());
requestVo
.
setChannelType
(
shoppingCartInfoRequestVo
.
getChannelType
());
requestVo
.
setMenuType
(
menuType
);
requestVo
.
setOrderType
(
orderType
);
requestVo
.
setPartnerId
(
partnerId
);
requestVo
.
setQty
(
1
);
requestVo
.
setShopId
(
storeId
);
requestVo
.
setSkuId
(
cartGoods
.
getSkuId
());
requestVo
.
setSpuId
(
cartGoods
.
getSpuId
());
requestVo
.
setCouponCode
(
shoppingCartInfoRequestVo
.
getCoffeeCouponCode
());
addGoods
(
requestVo
);
}
}
}
}
// 重新存储最新购物车
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
""
,
shoppingCartBaseService
);
}
}
// 当couponCode不为空时,需参与价格计算
// 当couponCode不为空时,需参与价格计算
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
);
...
...
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