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
d7e2d2d2
Commit
d7e2d2d2
authored
Oct 06, 2020
by
huiyang.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 随单购go
parent
7eadc4c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartInfoRequestVo.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+23
-4
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartInfoRequestVo.java
View file @
d7e2d2d2
...
@@ -89,7 +89,7 @@ public class ShoppingCartInfoRequestVo extends BaseRequestVo {
...
@@ -89,7 +89,7 @@ public class ShoppingCartInfoRequestVo extends BaseRequestVo {
/**
/**
* 随单购是否购买月享卡
* 随单购是否购买月享卡
* 1:
购买,2:不购买
* 1:
不购买,2:月卡续费,3:新购月卡
*/
*/
private
String
buyMonthlyCard
;
private
String
buyMonthlyCard
;
/**
/**
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
d7e2d2d2
...
@@ -307,6 +307,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -307,6 +307,7 @@ public class ShoppingCartMCoffeeServiceImpl {
Integer
orderType
=
shoppingCartInfoRequestVo
.
getOrderType
();
Integer
orderType
=
shoppingCartInfoRequestVo
.
getOrderType
();
String
receiveId
=
shoppingCartInfoRequestVo
.
getReceiveId
();
String
receiveId
=
shoppingCartInfoRequestVo
.
getReceiveId
();
Long
payCardFee
=
shoppingCartInfoRequestVo
.
getPayCardFee
();
Long
payCardFee
=
shoppingCartInfoRequestVo
.
getPayCardFee
();
String
buyMonthlyCard
=
shoppingCartInfoRequestVo
.
getBuyMonthlyCard
();
// 获取购物车商品
// 获取购物车商品
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
sessionId
,
""
,
shoppingCartBaseService
);
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
sessionId
,
""
,
shoppingCartBaseService
);
...
@@ -318,8 +319,16 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -318,8 +319,16 @@ public class ShoppingCartMCoffeeServiceImpl {
// 重新存储最新购物车
// 重新存储最新购物车
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
""
,
shoppingCartBaseService
);
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
""
,
shoppingCartBaseService
);
}
}
String
code
=
""
;
if
(
StringUtils
.
isNotEmpty
(
buyMonthlyCard
)
)
{
if
(
Objects
.
equals
(
buyMonthlyCard
,
"2"
))
{
code
=
mcCafeUniversalCouponCode
;
}
else
if
(
Objects
.
equals
(
buyMonthlyCard
,
"3"
)){
code
=
shoppingCartInfoRequestVo
.
getMonthlyCardCode
();
}
}
// 当couponCode不为空时,需参与价格计算
// 当couponCode不为空时,需参与价格计算
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
shoppingCartInfoRequestVo
.
getBuyMonthlyCard
()
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
code
);
// 促销活动的优惠金额计算
// 促销活动的优惠金额计算
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
...
@@ -447,6 +456,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -447,6 +456,7 @@ public class ShoppingCartMCoffeeServiceImpl {
String
menuType
=
shoppingCartInfoRequestVo
.
getMenuType
();
String
menuType
=
shoppingCartInfoRequestVo
.
getMenuType
();
Integer
orderType
=
shoppingCartInfoRequestVo
.
getOrderType
();
Integer
orderType
=
shoppingCartInfoRequestVo
.
getOrderType
();
String
receiveId
=
shoppingCartInfoRequestVo
.
getReceiveId
();
String
receiveId
=
shoppingCartInfoRequestVo
.
getReceiveId
();
String
buyMonthlyCard
=
shoppingCartInfoRequestVo
.
getBuyMonthlyCard
();
// 获取购物车商品
// 获取购物车商品
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
null
,
tableNumber
,
shoppingCartBaseService
);
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
null
,
tableNumber
,
shoppingCartBaseService
);
...
@@ -484,8 +494,17 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -484,8 +494,17 @@ public class ShoppingCartMCoffeeServiceImpl {
// 重新存储最新购物车
// 重新存储最新购物车
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
tableNumber
,
shoppingCartBaseService
);
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
tableNumber
,
shoppingCartBaseService
);
String
code
=
""
;
if
(
StringUtils
.
isNotEmpty
(
buyMonthlyCard
)
)
{
if
(
Objects
.
equals
(
buyMonthlyCard
,
"2"
))
{
code
=
mcCafeUniversalCouponCode
;
}
else
if
(
Objects
.
equals
(
buyMonthlyCard
,
"3"
)){
code
=
shoppingCartInfoRequestVo
.
getMonthlyCardCode
();
}
}
// 当couponCode不为空时,需参与价格计算
// 当couponCode不为空时,需参与价格计算
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
shoppingCartInfoRequestVo
.
getBuyMonthlyCard
()
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
code
);
//加价购商品
//加价购商品
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoodsList
=
shoppingCartInfoRequestVo
.
getSendGoods
();
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoodsList
=
shoppingCartInfoRequestVo
.
getSendGoods
();
...
@@ -1111,9 +1130,9 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1111,9 +1130,9 @@ public class ShoppingCartMCoffeeServiceImpl {
coupon
.
setActivityCode
(
activityCode
);
coupon
.
setActivityCode
(
activityCode
);
coupons
.
add
(
coupon
);
coupons
.
add
(
coupon
);
}
}
if
(
StringUtils
.
isNotEmpty
(
buyMonthlyCard
)
&&
Objects
.
equals
(
buyMonthlyCard
,
"1"
))
{
if
(
StringUtils
.
isNotEmpty
(
buyMonthlyCard
)
)
{
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
coupon
=
new
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
();
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
coupon
=
new
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
();
coupon
.
setCode
(
mcCafeUniversalCouponCode
);
coupon
.
setCode
(
buyMonthlyCard
);
coupons
.
add
(
coupon
);
coupons
.
add
(
coupon
);
}
}
...
...
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