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
266abba2
Commit
266abba2
authored
Jan 06, 2020
by
shuhu.hou@freemud.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复addGoods接口,校验bug
parent
140c901d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/ShoppingCartNewService.java
+2
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+2
-0
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/ShoppingCartNewService.java
View file @
266abba2
...
@@ -164,7 +164,7 @@ public interface ShoppingCartNewService {
...
@@ -164,7 +164,7 @@ public interface ShoppingCartNewService {
setToastMsgIfNotExist
(
shoppingCartGoodsResponseVo
,
ShoppingCartConstant
.
HAS_OTHER_ACTIVITY_WHEN_ADD_GOODS_COUPON
);
setToastMsgIfNotExist
(
shoppingCartGoodsResponseVo
,
ShoppingCartConstant
.
HAS_OTHER_ACTIVITY_WHEN_ADD_GOODS_COUPON
);
}
}
//校验合法性,更新缓存中购物车信息
//校验合法性,更新缓存中购物车信息
allCartGoodsList
=
updateCartGoodsLegal
(
cartGoods
,
userId
,
shoppingCartGoodsResponseVo
,
addShoppingCartGoodsRequestVo
,
allCartGoodsList
);
updateCartGoodsLegal
(
cartGoods
,
userId
,
shoppingCartGoodsResponseVo
,
addShoppingCartGoodsRequestVo
,
allCartGoodsList
);
}
}
}
}
...
@@ -253,7 +253,7 @@ public interface ShoppingCartNewService {
...
@@ -253,7 +253,7 @@ public interface ShoppingCartNewService {
,
String
goodsId
,
String
userId
,
ShoppingCartGoodsBaseResponseVo
shoppingCartGoodsResponseVo
,
List
<
CartGoods
>
allCartGoodsList
)
{
,
String
goodsId
,
String
userId
,
ShoppingCartGoodsBaseResponseVo
shoppingCartGoodsResponseVo
,
List
<
CartGoods
>
allCartGoodsList
)
{
// 校验合法性,更新缓存中购物车信息
// 校验合法性,更新缓存中购物车信息
allCartGoodsList
=
updateCartGoodsLegal
(
cartGoods
,
userId
,
shoppingCartGoodsResponseVo
,
addShoppingCartGoodsRequestVo
,
allCartGoodsList
);
updateCartGoodsLegal
(
cartGoods
,
userId
,
shoppingCartGoodsResponseVo
,
addShoppingCartGoodsRequestVo
,
allCartGoodsList
);
// 如果购物车中有商品券,则当前添加的商品是特价商品时,需要提示“已选商品券,与其他优惠商品不同享,商品将恢复原价”
// 如果购物车中有商品券,则当前添加的商品是特价商品时,需要提示“已选商品券,与其他优惠商品不同享,商品将恢复原价”
boolean
haveCouponProduct
=
allCartGoodsList
.
parallelStream
().
anyMatch
(
k
->
k
.
getCartGoodsUid
().
startsWith
(
CommonsConstant
.
COUPON_PREFIX
));
boolean
haveCouponProduct
=
allCartGoodsList
.
parallelStream
().
anyMatch
(
k
->
k
.
getCartGoodsUid
().
startsWith
(
CommonsConstant
.
COUPON_PREFIX
));
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
266abba2
...
@@ -1022,6 +1022,8 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -1022,6 +1022,8 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
// 重新set购物车信息到缓存中
// 重新set购物车信息到缓存中
assortmentSdkService
.
setShoppingCart
(
addShoppingCartGoodsRequestVo
.
getPartnerId
(),
addShoppingCartGoodsRequestVo
.
getShopId
(),
assortmentSdkService
.
setShoppingCart
(
addShoppingCartGoodsRequestVo
.
getPartnerId
(),
addShoppingCartGoodsRequestVo
.
getShopId
(),
userId
,
nowCartGoodsList
,
addShoppingCartGoodsRequestVo
.
getSessionId
(),
addShoppingCartGoodsRequestVo
.
getTableNumber
(),
this
.
shoppingCartBaseService
);
userId
,
nowCartGoodsList
,
addShoppingCartGoodsRequestVo
.
getSessionId
(),
addShoppingCartGoodsRequestVo
.
getTableNumber
(),
this
.
shoppingCartBaseService
);
oldAllCartGoodsList
.
clear
();
oldAllCartGoodsList
.
addAll
(
nowCartGoodsList
);
return
nowCartGoodsList
;
return
nowCartGoodsList
;
}
}
...
...
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