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
6f54fa80
Commit
6f54fa80
authored
Aug 18, 2020
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品券调整
parent
530d1fe6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+7
-8
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
6f54fa80
...
...
@@ -115,13 +115,13 @@ public class ShoppingCartMCoffeeServiceImpl {
String
spuId2
=
spuId
;
List
<
Long
>
productIds
=
new
ArrayList
<>();
productIds
.
add
(
Long
.
parseLong
(
goodsId
));
CartGoods
addCartGoods
=
convent2CartGoods
(
addShoppingCartGoodsRequestVo
);
if
(
StringUtils
.
isNotBlank
(
couponCode
)){
String
couponCodespq
=
CommonsConstant
.
COUPON_PREFIX
+
couponCode
;
spuId2
=
validCoupon
(
partnerId
,
storeId
,
couponCodespq
,
productIds
,
BusinessTypeEnum
.
getByType
(
addShoppingCartGoodsRequestVo
.
getMenuType
()).
getCode
());
//商品券校验
if
(
spuId
.
startsWith
(
CommonsConstant
.
COUPON_PREFIX
)){
couponCode
=
spuId
.
substring
(
CommonsConstant
.
COUPON_PREFIX
.
length
());
spuId2
=
validCoupon
(
partnerId
,
storeId
,
spuId
,
productIds
,
BusinessTypeEnum
.
getByType
(
addShoppingCartGoodsRequestVo
.
getMenuType
()).
getCode
());
goodsId
=
spuId2
;
}
productIds
.
add
(
Long
.
parseLong
(
goodsId
));
// 获取添加商品的详细信息
List
<
ProductBeanDTO
>
productBeanListSpuClass
=
assortmentSdkService
.
getProductsInfoSdk
(
partnerId
,
storeId
,
Collections
.
singletonList
(
spuId2
),
menuType
,
this
.
shoppingCartBaseService
);
...
...
@@ -131,10 +131,9 @@ public class ShoppingCartMCoffeeServiceImpl {
oldCartGoodsList
=
new
ArrayList
<>();
}
//商品券已添加情况校验
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
checkGoodsCoupon
(
oldCartGoodsList
,
operationType
,
couponCode
);
CartGoods
addCartGoods
=
convent2CartGoods
(
addShoppingCartGoodsRequestVo
);
setClassificationAndPrice
(
addCartGoods
,
productBeanListSpuClass
);
//查询多个商品库存信息
// Integer checkQty = this.checkSkuQty(oldCartGoodsList, addCartGoods);
...
...
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