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
17f4e00d
Commit
17f4e00d
authored
Nov 09, 2020
by
huiyang.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 买三赠一更新商品数量
parent
e44d0ca0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletions
+12
-1
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/UpdateShoppingCartGoodsQtyRequestVo.java
+5
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+6
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
+1
-0
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/UpdateShoppingCartGoodsQtyRequestVo.java
View file @
17f4e00d
...
...
@@ -37,6 +37,11 @@ public class UpdateShoppingCartGoodsQtyRequestVo extends BaseRequestVo {
@NotNull
(
message
=
"qty不能为空"
)
private
Integer
qty
;
/**
* 更新前商品数量
*/
private
Integer
oldQty
;
private
String
version
;
/**
* 购物车版本号(围餐)
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
17f4e00d
...
...
@@ -284,6 +284,7 @@ public class ShoppingCartMCoffeeServiceImpl {
String
menuType
=
updateShoppingCartGoodsQtyRequestVo
.
getMenuType
();
Integer
orderType
=
updateShoppingCartGoodsQtyRequestVo
.
getOrderType
();
String
receiveId
=
updateShoppingCartGoodsQtyRequestVo
.
getReceiveId
();
Integer
oldQty
=
updateShoppingCartGoodsQtyRequestVo
.
getOldQty
();
// 先验证商品是否存在
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
null
,
null
,
shoppingCartBaseService
);
...
...
@@ -291,7 +292,11 @@ public class ShoppingCartMCoffeeServiceImpl {
for
(
CartGoods
cartGoods_
:
cartGoodsList
)
{
if
(
cartGoodsUid
.
equals
(
cartGoods_
.
getCartGoodsUid
()))
{
cartGoods
=
cartGoods_
;
cartGoods_
.
setQty
(
qty
);
if
(
oldQty
==
null
)
{
cartGoods_
.
setQty
(
qty
);
}
else
{
cartGoods_
.
setQty
(
cartGoods_
.
getQty
()
-
(
oldQty
-
qty
));
}
break
;
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
View file @
17f4e00d
...
...
@@ -647,6 +647,7 @@ public class CouponDiscountCalculation {
cartGoods1
.
setAmount
(
count
-
goodsDiscount
.
getDiscount
());
cartGoods1
.
setCouponName
(
goodsDiscount
.
getActivityName
());
cartGoods1
.
setOriginalAmount
(
count
);
cartGoods1
.
setCartGoodsUid
(
cartGoods
.
getCartGoodsUid
());
cartGoodsListNew
.
add
(
cartGoods1
);
qty
=
qty
-
goodsDiscount
.
getActualGoodsNumber
();
}
...
...
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