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
7eadc4c7
Commit
7eadc4c7
authored
Oct 06, 2020
by
huiyang.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 随单购
parent
59432323
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
16 deletions
+46
-16
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/ActivityCalculationDiscountRequestDto.java
+4
-0
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartInfoRequestVo.java
+14
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+23
-13
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CalculationServiceImpl.java
+5
-3
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/ActivityCalculationDiscountRequestDto.java
View file @
7eadc4c7
...
@@ -65,6 +65,10 @@ public class ActivityCalculationDiscountRequestDto {
...
@@ -65,6 +65,10 @@ public class ActivityCalculationDiscountRequestDto {
private
Long
distributionFee
;
private
Long
distributionFee
;
/**
/**
* 购买月卡费用(分)
*/
private
Long
payCardFee
;
/**
* 是否是会员
* 是否是会员
*/
*/
private
Boolean
isMember
;
private
Boolean
isMember
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartInfoRequestVo.java
View file @
7eadc4c7
...
@@ -87,6 +87,20 @@ public class ShoppingCartInfoRequestVo extends BaseRequestVo {
...
@@ -87,6 +87,20 @@ public class ShoppingCartInfoRequestVo extends BaseRequestVo {
*/
*/
private
String
menuType
;
private
String
menuType
;
/**
* 随单购是否购买月享卡
* 1:购买,2:不购买
*/
private
String
buyMonthlyCard
;
/**
* 月享卡卡号
*/
private
String
monthlyCardCode
;
/**
* 购买月卡费用(分)
*/
private
Long
payCardFee
;
@Data
@Data
public
final
static
class
SendGoods
{
public
final
static
class
SendGoods
{
/**
/**
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
7eadc4c7
...
@@ -42,6 +42,7 @@ import org.apache.commons.collections4.CollectionUtils;
...
@@ -42,6 +42,7 @@ import org.apache.commons.collections4.CollectionUtils;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
java.util.*
;
...
@@ -87,6 +88,9 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -87,6 +88,9 @@ public class ShoppingCartMCoffeeServiceImpl {
private
static
final
String
nullSeat
=
"508106"
;
private
static
final
String
nullSeat
=
"508106"
;
@Value
(
"${mccafe.universal.coupon.code}"
)
private
String
mcCafeUniversalCouponCode
;
/**
/**
* 添加商品、超值加购、商品券
* 添加商品、超值加购、商品券
*/
*/
...
@@ -159,7 +163,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -159,7 +163,7 @@ public class ShoppingCartMCoffeeServiceImpl {
// 促销活动等价格计算
// 促销活动等价格计算
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
newCartGoods
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
);
newCartGoods
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
,
null
);
// 返回购物车数据
// 返回购物车数据
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
newCartGoods
,
null
,
ShoppingCartConstant
.
ADD_AND_UPDATE
,
null
);
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
newCartGoods
,
null
,
ShoppingCartConstant
.
ADD_AND_UPDATE
,
null
);
...
@@ -269,10 +273,10 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -269,10 +273,10 @@ public class ShoppingCartMCoffeeServiceImpl {
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
""
,
shoppingCartBaseService
);
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
""
,
shoppingCartBaseService
);
// 当couponCode不为空时,需参与价格计算
// 当couponCode不为空时,需参与价格计算
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
null
,
null
,
cartGoodsList
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
null
,
null
,
cartGoodsList
,
null
);
// 促销活动的优惠金额计算
// 促销活动的优惠金额计算
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
cartGoodsList
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
);
cartGoodsList
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
,
null
);
//设置更新响应信息
//设置更新响应信息
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
ADD_AND_UPDATE
,
null
);
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
ADD_AND_UPDATE
,
null
);
return
ResponseUtil
.
success
(
shoppingCartGoodsResponseVo
);
return
ResponseUtil
.
success
(
shoppingCartGoodsResponseVo
);
...
@@ -302,6 +306,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -302,6 +306,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
();
Long
payCardFee
=
shoppingCartInfoRequestVo
.
getPayCardFee
();
// 获取购物车商品
// 获取购物车商品
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
sessionId
,
""
,
shoppingCartBaseService
);
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
sessionId
,
""
,
shoppingCartBaseService
);
...
@@ -314,11 +319,11 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -314,11 +319,11 @@ public class ShoppingCartMCoffeeServiceImpl {
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
""
,
shoppingCartBaseService
);
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
""
,
shoppingCartBaseService
);
}
}
// 当couponCode不为空时,需参与价格计算
// 当couponCode不为空时,需参与价格计算
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
shoppingCartInfoRequestVo
.
getBuyMonthlyCard
()
);
// 促销活动的优惠金额计算
// 促销活动的优惠金额计算
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
cartGoodsList
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
);
cartGoodsList
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
,
payCardFee
);
//设置更新响应信息
//设置更新响应信息
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
QUERY_INFO
,
shoppingCartInfoRequestVo
);
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
QUERY_INFO
,
shoppingCartInfoRequestVo
);
...
@@ -480,7 +485,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -480,7 +485,7 @@ public class ShoppingCartMCoffeeServiceImpl {
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
tableNumber
,
shoppingCartBaseService
);
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
tableNumber
,
shoppingCartBaseService
);
// 当couponCode不为空时,需参与价格计算
// 当couponCode不为空时,需参与价格计算
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
shoppingCartInfoRequestVo
.
getBuyMonthlyCard
()
);
//加价购商品
//加价购商品
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoodsList
=
shoppingCartInfoRequestVo
.
getSendGoods
();
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoodsList
=
shoppingCartInfoRequestVo
.
getSendGoods
();
...
@@ -488,7 +493,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -488,7 +493,7 @@ public class ShoppingCartMCoffeeServiceImpl {
// packgeAdditional(shoppingCartInfoRequestVo, premiumExchangeActivity);
// 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
);
cartGoodsList
,
coupons
,
sendGoodsList
,
shoppingCartGoodsResponseVo
,
shoppingCartInfoRequestVo
.
getPayCardFee
()
);
//设置更新响应信息
//设置更新响应信息
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
QUERY_INFO
,
shoppingCartInfoRequestVo
);
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
QUERY_INFO
,
shoppingCartInfoRequestVo
);
...
@@ -551,11 +556,11 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -551,11 +556,11 @@ public class ShoppingCartMCoffeeServiceImpl {
//清空商品券商品
//清空商品券商品
clearCartCouponGoods
(
partnerId
,
toStoreId
,
userId
,
sessionId
,
cartGoodsList
);
clearCartCouponGoods
(
partnerId
,
toStoreId
,
userId
,
sessionId
,
cartGoodsList
);
// 当couponCode不为空时,需参与价格计算
// 当couponCode不为空时,需参与价格计算
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
null
);
// 促销活动的优惠金额计算
// 促销活动的优惠金额计算
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
toStoreId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
toStoreId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
cartGoodsList
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
);
cartGoodsList
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
,
null
);
//设置更新响应信息
//设置更新响应信息
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
QUERY_INFO
,
shoppingCartInfoRequestVo
);
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
QUERY_INFO
,
shoppingCartInfoRequestVo
);
shoppingCartGoodsResponseVo
.
setChanged
(
false
);
shoppingCartGoodsResponseVo
.
setChanged
(
false
);
...
@@ -568,11 +573,11 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -568,11 +573,11 @@ public class ShoppingCartMCoffeeServiceImpl {
//清空商品券商品
//清空商品券商品
clearCartCouponGoods
(
partnerId
,
toStoreId
,
userId
,
sessionId
,
cartGoodsList
);
clearCartCouponGoods
(
partnerId
,
toStoreId
,
userId
,
sessionId
,
cartGoodsList
);
// 当couponCode不为空时,需参与价格计算
// 当couponCode不为空时,需参与价格计算
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
null
);
// 促销活动的优惠金额计算
// 促销活动的优惠金额计算
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
toStoreId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
toStoreId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
null
,
cartGoodsList
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
);
cartGoodsList
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
,
null
);
//设置更新响应信息
//设置更新响应信息
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
QUERY_INFO
,
shoppingCartInfoRequestVo
);
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
QUERY_INFO
,
shoppingCartInfoRequestVo
);
shoppingCartGoodsResponseVo
.
setChanged
(
false
);
shoppingCartGoodsResponseVo
.
setChanged
(
false
);
...
@@ -632,7 +637,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -632,7 +637,7 @@ public class ShoppingCartMCoffeeServiceImpl {
}
}
// 促销活动的优惠金额计算
// 促销活动的优惠金额计算
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
null
,
null
,
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
null
,
null
,
cartGoodsList
,
new
ArrayList
<>(),
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
);
cartGoodsList
,
new
ArrayList
<>(),
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
,
null
);
//设置更新响应信息
//设置更新响应信息
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
ADD_AND_UPDATE
,
null
);
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
ADD_AND_UPDATE
,
null
);
...
@@ -1097,7 +1102,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1097,7 +1102,7 @@ public class ShoppingCartMCoffeeServiceImpl {
return
checkCartRequest
;
return
checkCartRequest
;
}
}
private
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
getCoupon
(
String
couponCode
,
String
activityCode
,
List
<
CartGoods
>
cartGoodsList
)
{
private
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
getCoupon
(
String
couponCode
,
String
activityCode
,
List
<
CartGoods
>
cartGoodsList
,
String
buyMonthlyCard
)
{
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
new
ArrayList
<>();
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotEmpty
(
couponCode
))
{
if
(
StringUtils
.
isNotEmpty
(
couponCode
))
{
...
@@ -1106,6 +1111,11 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1106,6 +1111,11 @@ public class ShoppingCartMCoffeeServiceImpl {
coupon
.
setActivityCode
(
activityCode
);
coupon
.
setActivityCode
(
activityCode
);
coupons
.
add
(
coupon
);
coupons
.
add
(
coupon
);
}
}
if
(
StringUtils
.
isNotEmpty
(
buyMonthlyCard
)
&&
Objects
.
equals
(
buyMonthlyCard
,
"1"
)){
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
coupon
=
new
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
();
coupon
.
setCode
(
mcCafeUniversalCouponCode
);
coupons
.
add
(
coupon
);
}
//购物车商品券
//购物车商品券
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsList
))
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CalculationServiceImpl.java
View file @
7eadc4c7
...
@@ -84,12 +84,13 @@ public class CalculationServiceImpl {
...
@@ -84,12 +84,13 @@ public class CalculationServiceImpl {
public
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
updateShoppingCartGoodsDiscount
(
String
partnerId
,
String
storeId
,
String
userId
,
String
appId
,
Integer
orderType
,
public
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
updateShoppingCartGoodsDiscount
(
String
partnerId
,
String
storeId
,
String
userId
,
String
appId
,
Integer
orderType
,
boolean
isMember
,
String
menuType
,
String
receiveId
,
String
couponCode
,
boolean
isMember
,
String
menuType
,
String
receiveId
,
String
couponCode
,
List
<
CartGoods
>
cartGoodsList
,
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
,
List
<
CartGoods
>
cartGoodsList
,
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
,
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoodsList
,
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
)
{
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoodsList
,
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
Long
payCardFee
)
{
Long
deliveryAmount
=
calculateDeliveryAmount
(
receiveId
,
partnerId
,
storeId
,
menuType
);
Long
deliveryAmount
=
calculateDeliveryAmount
(
receiveId
,
partnerId
,
storeId
,
menuType
);
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscount
=
getCalculationDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
isMember
,
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscount
=
getCalculationDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
isMember
,
menuType
,
deliveryAmount
,
cartGoodsList
,
coupons
,
sendGoodsList
);
menuType
,
deliveryAmount
,
cartGoodsList
,
coupons
,
sendGoodsList
,
payCardFee
);
updateDiscount
(
calculationDiscount
,
cartGoodsList
,
shoppingCartGoodsResponseVo
,
deliveryAmount
);
updateDiscount
(
calculationDiscount
,
cartGoodsList
,
shoppingCartGoodsResponseVo
,
deliveryAmount
);
//满减
//满减
ActivityQueryDto
activityQueryDto
=
fullPromotionCalculation
.
getActivityQueryDto
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
);
ActivityQueryDto
activityQueryDto
=
fullPromotionCalculation
.
getActivityQueryDto
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
);
...
@@ -111,7 +112,7 @@ public class CalculationServiceImpl {
...
@@ -111,7 +112,7 @@ public class CalculationServiceImpl {
public
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
getCalculationDiscount
(
public
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
getCalculationDiscount
(
String
partnerId
,
String
storeId
,
String
userId
,
String
appId
,
Integer
orderType
,
boolean
isMember
,
String
menuType
,
Long
deliveryAmount
,
String
partnerId
,
String
storeId
,
String
userId
,
String
appId
,
Integer
orderType
,
boolean
isMember
,
String
menuType
,
Long
deliveryAmount
,
List
<
CartGoods
>
cartGoodsList
,
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
,
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoodsList
)
{
List
<
CartGoods
>
cartGoodsList
,
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
,
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoodsList
,
Long
payCardFee
)
{
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountGoods
>
calculationDiscountGoodsList
=
new
ArrayList
<>();
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountGoods
>
calculationDiscountGoodsList
=
new
ArrayList
<>();
for
(
CartGoods
cartGoods
:
cartGoodsList
)
{
for
(
CartGoods
cartGoods
:
cartGoodsList
)
{
...
@@ -141,6 +142,7 @@ public class CalculationServiceImpl {
...
@@ -141,6 +142,7 @@ public class CalculationServiceImpl {
discountRequest
.
setOrgIds
(
commonService
.
getOrgIds
(
partnerId
,
storeId
));
discountRequest
.
setOrgIds
(
commonService
.
getOrgIds
(
partnerId
,
storeId
));
discountRequest
.
setDistributionFee
(
deliveryAmount
);
discountRequest
.
setDistributionFee
(
deliveryAmount
);
discountRequest
.
setIsMember
(
isMember
);
discountRequest
.
setIsMember
(
isMember
);
discountRequest
.
setPayCardFee
(
payCardFee
);
ActivityCalculationDiscountResponseDto
activityCalculationDiscountResponseDto
;
ActivityCalculationDiscountResponseDto
activityCalculationDiscountResponseDto
;
try
{
try
{
activityCalculationDiscountResponseDto
=
activityClient
.
calculationDiscountSharing
(
discountRequest
);
activityCalculationDiscountResponseDto
=
activityClient
.
calculationDiscountSharing
(
discountRequest
);
...
...
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