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
01ef9e72
Commit
01ef9e72
authored
Mar 30, 2021
by
孙昱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunyu::update::fix bug about createOrder Error
parent
202eaa43
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+5
-8
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CalculationServiceImpl.java
+1
-1
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
01ef9e72
...
@@ -175,7 +175,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -175,7 +175,7 @@ public class ShoppingCartMCoffeeServiceImpl {
}
}
//种子券商品信息校验
//种子券商品信息校验
if
(
addShoppingCartGoodsRequestVo
.
getIsMonthCard
()<
1
&&
addShoppingCartGoodsRequestVo
.
getIsMonthCardGoods
()
>
0
)
{
if
(
1
==
addShoppingCartGoodsRequestVo
.
getIsMonthCard
()
)
{
seedCouponGoodsValidate
(
addShoppingCartGoodsRequestVo
,
oldCartGoodsList
);
seedCouponGoodsValidate
(
addShoppingCartGoodsRequestVo
,
oldCartGoodsList
);
}
}
...
@@ -878,8 +878,6 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -878,8 +878,6 @@ public class ShoppingCartMCoffeeServiceImpl {
// 获取购物车商品
// 获取购物车商品
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
null
,
tableNumber
,
shoppingCartBaseService
);
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
null
,
tableNumber
,
shoppingCartBaseService
);
log
.
info
(
"cartGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartGoodsList
));
log
.
info
(
"cartGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartGoodsList
));
//过滤月享卡2.0虚拟商品
cartGoodsList
=
cartGoodsList
.
stream
().
filter
(
goods
->
!
StringUtils
.
equals
(
"9999"
,
goods
.
getSkuId
())).
collect
(
Collectors
.
toList
());
if
(
cartGoodsList
==
null
||
CollectionUtils
.
isEmpty
(
cartGoodsList
))
{
if
(
cartGoodsList
==
null
||
CollectionUtils
.
isEmpty
(
cartGoodsList
))
{
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_GETINFO_INVAILD
);
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_GETINFO_INVAILD
);
}
}
...
@@ -908,8 +906,6 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -908,8 +906,6 @@ public class ShoppingCartMCoffeeServiceImpl {
if
(
CollectionUtils
.
isNotEmpty
(
reduceGoods
))
{
if
(
CollectionUtils
.
isNotEmpty
(
reduceGoods
))
{
allCartGoodsList
.
addAll
(
reduceGoods
);
allCartGoodsList
.
addAll
(
reduceGoods
);
}
}
//恢复套餐商品空键位
// checkNewCartGoods(allCartGoodsList,2,map);
// 重新存储最新购物车
// 重新存储最新购物车
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
tableNumber
,
shoppingCartBaseService
);
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
tableNumber
,
shoppingCartBaseService
);
...
@@ -931,12 +927,13 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -931,12 +927,13 @@ public class ShoppingCartMCoffeeServiceImpl {
//加价购商品
//加价购商品
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoodsList
=
shoppingCartInfoRequestVo
.
getSendGoods
();
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoodsList
=
shoppingCartInfoRequestVo
.
getSendGoods
();
// //加价购商品组装
// packgeAdditional(shoppingCartInfoRequestVo, premiumExchangeActivity);
// 促销活动的优惠金额计算
// 促销活动的优惠金额计算
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscount
=
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscount
=
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
cartGoodsList
,
coupons
,
sendGoodsList
,
shoppingCartGoodsResponseVo
,
payCardPrice
);
cartGoodsList
,
coupons
,
sendGoodsList
,
shoppingCartGoodsResponseVo
,
payCardPrice
);
//过滤月享卡2.0虚拟商品
cartGoodsList
=
cartGoodsList
.
stream
().
filter
(
goods
->
!
StringUtils
.
equals
(
"9999"
,
goods
.
getSkuId
())).
collect
(
Collectors
.
toList
());
//设置更新响应信息
//设置更新响应信息
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
QUERY_INFO
,
shoppingCartInfoRequestVo
);
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
QUERY_INFO
,
shoppingCartInfoRequestVo
);
...
@@ -1828,7 +1825,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1828,7 +1825,7 @@ public class ShoppingCartMCoffeeServiceImpl {
ShoppingCartGoodsBaseResponseVo
shoppingCartGoodsResponseVo
,
List
<
CartGoods
>
cartGoodsList
)
{
ShoppingCartGoodsBaseResponseVo
shoppingCartGoodsResponseVo
,
List
<
CartGoods
>
cartGoodsList
)
{
//筛选数量不为0商品
//筛选数量不为0商品
cartGoodsList
=
cartGoodsList
.
stream
().
filter
(
cartGoods
->
cartGoods
.
getQty
()
!=
0
).
collect
(
Collectors
.
toList
());
cartGoodsList
=
cartGoodsList
.
stream
().
filter
(
cartGoods
->
cartGoods
.
getQty
()
!=
0
&&
StringUtils
.
equals
(
"9999"
,
cartGoods
.
getSkuId
())
).
collect
(
Collectors
.
toList
());
//筛选非加购商品--加价购商品不校验是否在菜单,不调用validateShopProduct
//筛选非加购商品--加价购商品不校验是否在菜单,不调用validateShopProduct
List
<
CartGoods
>
checkGoods
=
cartGoodsList
.
stream
().
filter
(
cartGoods
->
cartGoods
.
getGoodsType
()
!=
GoodsTypeEnum
.
REDUCE_PRICE_GOODS
.
getGoodsType
()).
collect
(
Collectors
.
toList
());
List
<
CartGoods
>
checkGoods
=
cartGoodsList
.
stream
().
filter
(
cartGoods
->
cartGoods
.
getGoodsType
()
!=
GoodsTypeEnum
.
REDUCE_PRICE_GOODS
.
getGoodsType
()).
collect
(
Collectors
.
toList
());
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CalculationServiceImpl.java
View file @
01ef9e72
...
@@ -247,7 +247,7 @@ public class CalculationServiceImpl {
...
@@ -247,7 +247,7 @@ public class CalculationServiceImpl {
}
}
}
}
List
<
ShoppingCartGoodsDto
.
CartGoodsDetailDto
>
products
=
shoppingCartGoodsDto
.
getProducts
();
List
<
ShoppingCartGoodsDto
.
CartGoodsDetailDto
>
products
=
shoppingCartGoodsDto
.
getProducts
()
.
stream
().
filter
(
p
->
!
StringUtils
.
equals
(
"9999"
,
p
.
getSkuId
())).
collect
(
Collectors
.
toList
())
;
List
<
String
>
productIds
=
products
.
stream
().
map
(
t
->
t
.
getSkuId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
productIds
=
products
.
stream
().
map
(
t
->
t
.
getSkuId
()).
collect
(
Collectors
.
toList
());
//调用商品的接口获取商品键位
//调用商品的接口获取商品键位
...
...
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