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
5046dd48
Commit
5046dd48
authored
Nov 12, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并冲突
parent
ce1125e6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
91 deletions
+61
-91
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/service/ShoppingCartBaseService.java
+9
-1
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartInfoRequestVo.java
+1
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+48
-80
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
+3
-10
No files found.
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/service/ShoppingCartBaseService.java
View file @
5046dd48
...
@@ -127,7 +127,15 @@ public interface ShoppingCartBaseService {
...
@@ -127,7 +127,15 @@ public interface ShoppingCartBaseService {
default
BaseResponse
<
List
<
CouponTypeVo
>>
getTypeCartCouponCode
(
CartParamDto
cartParamDto
,
String
trackingNo
)
{
default
BaseResponse
<
List
<
CouponTypeVo
>>
getTypeCartCouponCode
(
CartParamDto
cartParamDto
,
String
trackingNo
)
{
return
null
;
return
null
;
}
}
/**
* 获取购物车商品代金券
*
* @param cartParamDto
* @return
*/
default
BaseResponse
<
String
>
getCartCouponCode
(
CartParamDto
cartParamDto
,
String
trackingNo
)
{
return
null
;
}
/**
/**
* 清除麦咖啡购物车商品行信息
* 清除麦咖啡购物车商品行信息
*
*
...
...
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartInfoRequestVo.java
View file @
5046dd48
...
@@ -126,6 +126,7 @@ public class ShoppingCartInfoRequestVo extends BaseRequestVo {
...
@@ -126,6 +126,7 @@ public class ShoppingCartInfoRequestVo extends BaseRequestVo {
*/
*/
@NotNull
@NotNull
private
Integer
qty
;
private
Integer
qty
;
private
String
activityCode
;
}
}
@Data
@Data
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
5046dd48
...
@@ -43,6 +43,7 @@ import com.freemud.application.sdk.api.ordercenter.response.orderInfo.OrderItemR
...
@@ -43,6 +43,7 @@ import com.freemud.application.sdk.api.ordercenter.response.orderInfo.OrderItemR
import
com.freemud.application.sdk.api.ordercenter.response.orderInfo.QueryByCodeResponse
;
import
com.freemud.application.sdk.api.ordercenter.response.orderInfo.QueryByCodeResponse
;
import
com.freemud.application.sdk.api.ordercenter.service.OrderSdkService
;
import
com.freemud.application.sdk.api.ordercenter.service.OrderSdkService
;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
com.freemud.application.sdk.api.productcenter.service.ProductService
;
import
com.freemud.sdk.api.assortment.shoppingcart.constant.CartResponseConstant
;
import
com.freemud.sdk.api.assortment.shoppingcart.constant.CartResponseConstant
;
import
com.freemud.application.sdk.api.storecenter.request.StoreInfoRequest
;
import
com.freemud.application.sdk.api.storecenter.request.StoreInfoRequest
;
import
com.freemud.application.sdk.api.storecenter.response.StoreResponse
;
import
com.freemud.application.sdk.api.storecenter.response.StoreResponse
;
...
@@ -55,12 +56,12 @@ import com.freemud.sdk.api.assortment.shoppingcart.request.CheckCartRequest;
...
@@ -55,12 +56,12 @@ import com.freemud.sdk.api.assortment.shoppingcart.request.CheckCartRequest;
import
com.freemud.sdk.api.assortment.shoppingcart.service.ShoppingCartBaseService
;
import
com.freemud.sdk.api.assortment.shoppingcart.service.ShoppingCartBaseService
;
import
com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl
;
import
com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl
;
import
com.freemud.sdk.api.assortment.shoppingcart.util.CartResponseUtil
;
import
com.freemud.sdk.api.assortment.shoppingcart.util.CartResponseUtil
;
import
com.google.common.collect.Lists
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
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.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.json.JSONString
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -109,6 +110,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -109,6 +110,7 @@ public class ShoppingCartMCoffeeServiceImpl {
private
OrderSdkService
orderSdkService
;
private
OrderSdkService
orderSdkService
;
@Autowired
@Autowired
private
StoreCenterService
storeCenterService
;
private
StoreCenterService
storeCenterService
;
@Autowired
@Autowired
private
ProductClient
productClient
;
private
ProductClient
productClient
;
@Autowired
@Autowired
...
@@ -162,7 +164,6 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -162,7 +164,6 @@ public class ShoppingCartMCoffeeServiceImpl {
spuId2
=
vo
.
getSkuId
();
spuId2
=
vo
.
getSkuId
();
goodsId
=
vo
.
getSkuId
();
goodsId
=
vo
.
getSkuId
();
}
}
productIds
.
add
(
Long
.
parseLong
(
goodsId
));
productIds
.
add
(
Long
.
parseLong
(
goodsId
));
// 获取添加商品的详细信息
// 获取添加商品的详细信息
List
<
ProductBeanDTO
>
productBeanListSpuClass
=
assortmentSdkService
.
getProductsInfoSdk
(
partnerId
,
storeId
,
Collections
.
singletonList
(
spuId2
),
menuType
,
this
.
shoppingCartBaseService
);
List
<
ProductBeanDTO
>
productBeanListSpuClass
=
assortmentSdkService
.
getProductsInfoSdk
(
partnerId
,
storeId
,
Collections
.
singletonList
(
spuId2
),
menuType
,
this
.
shoppingCartBaseService
);
...
@@ -174,7 +175,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -174,7 +175,7 @@ public class ShoppingCartMCoffeeServiceImpl {
}
}
//商品券已添加情况校验
//商品券已添加情况校验
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
checkGoodsCoupon
(
oldCartGoodsList
,
operationType
,
couponCode
,
goodsId
,
addShoppingCartGoodsRequestVo
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
checkGoodsCoupon
(
oldCartGoodsList
,
operationType
,
couponCode
,
goodsId
);
CartGoods
addCartGoods
=
convent2CartGoods
(
addShoppingCartGoodsRequestVo
,
goodsId
,
vo
);
CartGoods
addCartGoods
=
convent2CartGoods
(
addShoppingCartGoodsRequestVo
,
goodsId
,
vo
);
setClassificationAndPrice
(
addCartGoods
,
productBeanListSpuClass
);
setClassificationAndPrice
(
addCartGoods
,
productBeanListSpuClass
);
if
(
StringUtils
.
isNotEmpty
(
addShoppingCartGoodsRequestVo
.
getGroupName
()))
{
if
(
StringUtils
.
isNotEmpty
(
addShoppingCartGoodsRequestVo
.
getGroupName
()))
{
...
@@ -182,13 +183,6 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -182,13 +183,6 @@ public class ShoppingCartMCoffeeServiceImpl {
addCartGoods
.
setSpuName
(
addShoppingCartGoodsRequestVo
.
getGroupName
());
addCartGoods
.
setSpuName
(
addShoppingCartGoodsRequestVo
.
getGroupName
());
addCartGoods
.
setName
(
addShoppingCartGoodsRequestVo
.
getGroupName
());
addCartGoods
.
setName
(
addShoppingCartGoodsRequestVo
.
getGroupName
());
}
}
//根据券号获取券名称
String
couponName
=
""
;
if
(
StringUtils
.
isNotEmpty
(
couponCode
)){
CustomerInfoVo
userLoginInfoDto
=
getCustomerInfoVo
(
sessionId
);
couponName
=
getCouponNameByCode
(
couponCode
,
userLoginInfoDto
,
BusinessTypeEnum
.
getByType
(
addShoppingCartGoodsRequestVo
.
getMenuType
()).
getCode
());
addCartGoods
.
setCouponName
(
couponName
);
}
// 如果购物车中有商品券,则当前添加的商品是特价商品时,需要提示“已选商品券,与其他优惠商品不同享,商品将恢复原价”
// 如果购物车中有商品券,则当前添加的商品是特价商品时,需要提示“已选商品券,与其他优惠商品不同享,商品将恢复原价”
boolean
haveCouponProduct
=
oldCartGoodsList
.
parallelStream
().
anyMatch
(
k
->
k
.
getCartGoodsUid
().
startsWith
(
CommonsConstant
.
COUPON_PREFIX
));
boolean
haveCouponProduct
=
oldCartGoodsList
.
parallelStream
().
anyMatch
(
k
->
k
.
getCartGoodsUid
().
startsWith
(
CommonsConstant
.
COUPON_PREFIX
));
...
@@ -232,7 +226,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -232,7 +226,7 @@ public class ShoppingCartMCoffeeServiceImpl {
}
}
private
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
checkGoodsCoupon
(
List
<
CartGoods
>
oldCartGoodsList
,
Integer
operationType
,
String
couponCode
,
String
goodsId
,
MCoffeeAddGoodsRequestVo
addShoppingCartGoodsRequestVo
)
{
private
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
checkGoodsCoupon
(
List
<
CartGoods
>
oldCartGoodsList
,
Integer
operationType
,
String
couponCode
,
String
goodsId
)
{
if
(
operationType
!=
null
&&
operationType
==
1
&&
StringUtils
.
isBlank
(
couponCode
))
{
if
(
operationType
!=
null
&&
operationType
==
1
&&
StringUtils
.
isBlank
(
couponCode
))
{
throw
new
ServiceException
(
ResponseResult
.
PARAMETER_MISSING
,
"商品券券号为空"
);
throw
new
ServiceException
(
ResponseResult
.
PARAMETER_MISSING
,
"商品券券号为空"
);
}
}
...
@@ -241,7 +235,6 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -241,7 +235,6 @@ public class ShoppingCartMCoffeeServiceImpl {
}
}
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
new
ArrayList
<>();
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
oldCartGoodsList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
oldCartGoodsList
))
{
Boolean
isContinue
=
true
;
for
(
CartGoods
cartGoods
:
oldCartGoodsList
)
{
for
(
CartGoods
cartGoods
:
oldCartGoodsList
)
{
//购物车已存在商品券
//购物车已存在商品券
if
(
StringUtils
.
isNotBlank
(
cartGoods
.
getCouponCode
()))
{
if
(
StringUtils
.
isNotBlank
(
cartGoods
.
getCouponCode
()))
{
...
@@ -253,19 +246,6 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -253,19 +246,6 @@ public class ShoppingCartMCoffeeServiceImpl {
//使用券的是,如果购物车已经存在这个券,先清除,再添加
//使用券的是,如果购物车已经存在这个券,先清除,再添加
cartGoods
.
setQty
(
0
);
cartGoods
.
setQty
(
0
);
}
}
if
(
StringUtils
.
isNotEmpty
(
goodsId
)
&&
StringUtils
.
isNotEmpty
(
couponCode
)
&&
goodsId
.
equals
(
cartGoods
.
getSkuId
())
&&
StringUtils
.
isBlank
(
cartGoods
.
getCouponCode
())
&&
isContinue
)
{
// 如果购物车商品存在商品规格,替换时复制规格信息
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getSpecialExtra
()))
{
addShoppingCartGoodsRequestVo
.
setSpecialExtra
(
cartGoods
.
getSpecialExtra
());
}
if
(
cartGoods
.
getQty
()
>
1
){
cartGoods
.
setQty
(
cartGoods
.
getQty
()
-
1
);
}
else
{
//如果购物车存在相同的商品,则先删除购物车商品,在新增商品券购物车行
cartGoods
.
setQty
(
0
);
}
isContinue
=
false
;
}
//同样商品券不能使用
//同样商品券不能使用
/* if (StringUtils.isNotEmpty(couponCode)&& StringUtils.isNotEmpty(cartGoods.getCouponCode()) && goodsId.equals(cartGoods.getGoodsId())) {
/* if (StringUtils.isNotEmpty(couponCode)&& StringUtils.isNotEmpty(cartGoods.getCouponCode()) && goodsId.equals(cartGoods.getGoodsId())) {
throw new ServiceException(ResponseResult.SHOPPING_CART_GOODS_COUPON_CAN_NOT_USE);
throw new ServiceException(ResponseResult.SHOPPING_CART_GOODS_COUPON_CAN_NOT_USE);
...
@@ -398,18 +378,6 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -398,18 +378,6 @@ public class ShoppingCartMCoffeeServiceImpl {
// 重新存储最新购物车
// 重新存储最新购物车
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
""
,
shoppingCartBaseService
);
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
""
,
shoppingCartBaseService
);
}
}
String
code
=
""
;
Long
payCardPrice
=
null
;
if
(
StringUtils
.
isNotEmpty
(
buyMonthlyCard
)
)
{
if
(
Objects
.
equals
(
buyMonthlyCard
,
"2"
))
{
code
=
shoppingCartInfoRequestVo
.
getMonthlyCardCode
();
payCardPrice
=
Long
.
valueOf
(
payCardFee
);
}
else
if
(
Objects
.
equals
(
buyMonthlyCard
,
"3"
)){
code
=
mcCafeUniversalCouponCode
;
payCardPrice
=
Long
.
valueOf
(
payCardFee
);
}
assortmentSdkService
.
setShoppingCartCouponCode
(
partnerId
,
storeId
,
userId
,
code
,
shoppingCartBaseService
,
SaveCouponType
.
MON_COUPON
.
getCode
());
}
/**
/**
* 如果couponCode为空,则从缓存里尝试获取
* 如果couponCode为空,则从缓存里尝试获取
...
@@ -461,6 +429,18 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -461,6 +429,18 @@ public class ShoppingCartMCoffeeServiceImpl {
shoppingCartGoodsResponseVo
.
setFreightCouponCode
(
freightCouponCode
);
shoppingCartGoodsResponseVo
.
setFreightCouponCode
(
freightCouponCode
);
}
}
String
code
=
""
;
Long
payCardPrice
=
null
;
if
(
StringUtils
.
isNotEmpty
(
buyMonthlyCard
)
)
{
if
(
Objects
.
equals
(
buyMonthlyCard
,
"2"
))
{
code
=
shoppingCartInfoRequestVo
.
getMonthlyCardCode
();
payCardPrice
=
Long
.
valueOf
(
payCardFee
);
}
else
if
(
Objects
.
equals
(
buyMonthlyCard
,
"3"
)){
code
=
mcCafeUniversalCouponCode
;
payCardPrice
=
Long
.
valueOf
(
payCardFee
);
}
assortmentSdkService
.
setShoppingCartCouponCode
(
partnerId
,
storeId
,
userId
,
code
,
shoppingCartBaseService
,
SaveCouponType
.
MON_COUPON
.
getCode
());
}
// 当couponCode不为空时,需参与价格计算
// 当couponCode不为空时,需参与价格计算
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
shoppingCartInfoRequestVo
.
getFreightCouponCode
(),
code
,
buyThreeGiveOneCouponCode
,
buyThreeGiveOneActivityCode
,
shoppingCartInfoRequestVo
.
getCouponTypeList
());
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
shoppingCartInfoRequestVo
.
getFreightCouponCode
(),
code
,
buyThreeGiveOneCouponCode
,
buyThreeGiveOneActivityCode
,
shoppingCartInfoRequestVo
.
getCouponTypeList
());
...
@@ -586,20 +566,24 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -586,20 +566,24 @@ public class ShoppingCartMCoffeeServiceImpl {
CustomerInfoVo
assortmentCustomerInfoVo
=
getCustomerInfoVo
(
requestVo
.
getSessionId
());
CustomerInfoVo
assortmentCustomerInfoVo
=
getCustomerInfoVo
(
requestVo
.
getSessionId
());
// 获取购物车商品
// 获取购物车商品
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCartForCoupon
(
requestVo
.
getPartnerId
(),
requestVo
.
getStoreId
(),
requestVo
.
getUserId
(),
""
,
shoppingCartBaseService
);
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCartForCoupon
(
requestVo
.
getPartnerId
(),
requestVo
.
getStoreId
(),
requestVo
.
getUserId
(),
""
,
shoppingCartBaseService
);
String
buyMonthlyCard
=
assortmentSdkService
.
getShoppingCartCoupon
(
requestVo
.
getPartnerId
(),
requestVo
.
getStoreId
(),
requestVo
.
getUserId
(),
shoppingCartBaseService
,
SaveCouponType
.
MON_COUPON
.
getCode
());
Long
payCardPrice
=
null
;
if
(
StringUtils
.
isNotEmpty
(
buyMonthlyCard
)){
payCardPrice
=
Long
.
valueOf
(
payCardFee
);
}
// 当couponCode不为空时,需参与价格计算
// 当couponCode不为空时,需参与价格计算
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
null
,
null
,
cartGoodsList
,
null
,
buyMonthlyCard
,
null
,
null
,
null
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
null
,
null
,
cartGoodsList
,
null
,
buyMonthlyCard
,
null
,
null
,
null
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
null
,
null
,
cartGoodsList
,
null
,
null
);
// 促销活动的优惠金额计算
// 促销活动的优惠金额计算
calculationService
.
updateShoppingCartGoodsDiscount
(
requestVo
.
getPartnerId
(),
requestVo
.
getStoreId
(),
requestVo
.
getUserId
(),
requestVo
.
getAppId
(),
requestVo
.
getOrderType
(),
assortmentCustomerInfoVo
.
isMemberPaid
(),
requestVo
.
getMenuType
(),
requestVo
.
getReceiveId
(),
null
,
calculationService
.
updateShoppingCartGoodsDiscount
(
requestVo
.
getPartnerId
(),
requestVo
.
getStoreId
(),
requestVo
.
getUserId
(),
requestVo
.
getAppId
(),
requestVo
.
getOrderType
(),
assortmentCustomerInfoVo
.
isMemberPaid
(),
requestVo
.
getMenuType
(),
requestVo
.
getReceiveId
(),
null
,
cartGoodsList
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
,
payCardPrice
,
null
);
cartGoodsList
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
,
payCardPrice
,
null
);
cartGoodsList
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
,
null
);
String
moneyCoupon
=
assortmentSdkService
.
getShoppingCartCoupon
(
requestVo
.
getPartnerId
(),
String
moneyCoupon
=
assortmentSdkService
.
getShoppingCartCoupon
(
requestVo
.
getPartnerId
(),
requestVo
.
getStoreId
(),
requestVo
.
getUserId
(),
shoppingCartBaseService
,
SaveCouponType
.
COUPON
.
getCode
());
requestVo
.
getStoreId
(),
requestVo
.
getUserId
(),
shoppingCartBaseService
,
SaveCouponType
.
COUPON
.
getCode
());
String
deliveryFeeCoupon
=
assortmentSdkService
.
getShoppingCartCoupon
(
requestVo
.
getPartnerId
(),
requestVo
.
getStoreId
(),
requestVo
.
getUserId
(),
shoppingCartBaseService
,
SaveCouponType
.
FREIGHT_COUPON
.
getCode
());
String
deliveryFeeCoupon
=
assortmentSdkService
.
getShoppingCartCoupon
(
requestVo
.
getPartnerId
(),
requestVo
.
getStoreId
(),
requestVo
.
getUserId
(),
shoppingCartBaseService
,
SaveCouponType
.
FREIGHT_COUPON
.
getCode
());
List
<
String
>
couponCodes
=
new
ArrayList
<>();
List
<
String
>
couponCodes
=
new
ArrayList
<>();
couponCodes
.
add
(
deliveryFeeCoupon
);
couponCodes
.
add
(
deliveryFeeCoupon
);
couponCodes
.
add
(
moneyCoupon
);
couponCodes
.
add
(
moneyCoupon
);
List
<
CouponAvailableReq
>
resList
=
couponDiscountCalculation
.
buildAvailableCoupons
(
requestVo
,
cartGoodsList
,
couponCodes
);
List
<
CouponAvailableReqByCart
>
resList
=
couponDiscountCalculation
.
buildAvailableCoupons
(
requestVo
,
cartGoodsList
,
couponCodes
);
return
ResponseUtil
.
success
(
resList
);
return
ResponseUtil
.
success
(
resList
);
}
}
...
@@ -767,8 +751,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -767,8 +751,7 @@ public class ShoppingCartMCoffeeServiceImpl {
//设置更新响应信息
//设置更新响应信息
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
QUERY_INFO
,
shoppingCartInfoRequestVo
);
setAddAndUpdateResponse
(
shoppingCartGoodsResponseVo
,
cartGoodsList
,
shoppingCartGoodsResponseVo
.
getToastMsg
(),
ShoppingCartConstant
.
QUERY_INFO
,
shoppingCartInfoRequestVo
);
log
.
info
(
"结算均摊信息:shoppingCartGoodsResponseVo:{},calculationDiscount,{},shoppingCartGoodsDto,{},shoppingCartInfoRequestVo{}"
,
JSONObject
.
toJSONString
(
shoppingCartGoodsResponseVo
),
JSONObject
.
toJSONString
(
calculationDiscount
),
JSONObject
.
toJSONString
(
shoppingCartGoodsDto
),
JSONObject
.
toJSONString
(
shoppingCartInfoRequestVo
));
//设置均摊信息
//设置均摊信息
calculationService
.
updateShoppingCartGoodsApportion
(
shoppingCartGoodsResponseVo
,
calculationDiscount
,
shoppingCartGoodsDto
,
premiumExchangeActivity
,
shoppingCartInfoRequestVo
);
calculationService
.
updateShoppingCartGoodsApportion
(
shoppingCartGoodsResponseVo
,
calculationDiscount
,
shoppingCartGoodsDto
,
premiumExchangeActivity
,
shoppingCartInfoRequestVo
);
...
@@ -827,8 +810,6 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -827,8 +810,6 @@ 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
,
null
,
null
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
null
,
null
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
null
,
null
,
null
,
null
,
null
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
null
,
null
,
null
,
null
,
null
);
// 促销活动的优惠金额计算
// 促销活动的优惠金额计算
...
@@ -846,8 +827,6 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -846,8 +827,6 @@ 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
,
null
,
null
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
null
,
null
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
null
,
null
,
null
,
null
,
null
);
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
null
,
null
,
null
,
null
,
null
);
// 促销活动的优惠金额计算
// 促销活动的优惠金额计算
...
@@ -1041,22 +1020,18 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1041,22 +1020,18 @@ public class ShoppingCartMCoffeeServiceImpl {
}
}
private
CartGoods
.
ComboxGoods
getComboxGoods
(
CartGoods
cartGoods
,
OrderItemResp
orderItemResp
)
{
private
CartGoods
.
ComboxGoods
getComboxGoods
(
CartGoods
cartGoods
,
OrderItemResp
orderItemResp
,
List
<
OrderItemResp
>
orderItemList
)
{
CartGoods
.
ComboxGoods
comboxGoods
=
new
CartGoods
.
ComboxGoods
();
CartGoods
.
ComboxGoods
comboxGoods
=
new
CartGoods
.
ComboxGoods
();
comboxGoods
.
setSkuId
(
orderItemResp
.
getProductSpec
());
comboxGoods
.
setSkuId
(
orderItemResp
.
getProductSpec
());
comboxGoods
.
setGoodsId
(
orderItemResp
.
getProductId
());
comboxGoods
.
setGoodsId
(
orderItemResp
.
getProductId
());
comboxGoods
.
setQty
(
orderItemResp
.
getProductQuantity
());
comboxGoods
.
setQty
(
orderItemResp
.
getProductQuantity
());
comboxGoods
.
setOriginalPrice
(
orderItemResp
.
getProductPrice
().
longValue
());
comboxGoods
.
setOriginalPrice
(
orderItemResp
.
getProductPrice
().
longValue
());
comboxGoods
.
setFinalPrice
(
orderItemResp
.
getSalePrice
().
longValue
());
comboxGoods
.
setFinalPrice
(
orderItemResp
.
getSalePrice
().
longValue
());
comboxGoods
.
setPic
(
orderItemResp
.
getProductPicUrl
());
comboxGoods
.
setPic
(
orderItemResp
.
getProductPicUrl
());
comboxGoods
.
setName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductName
())
?
orderItemResp
.
getProductName
()
:
""
);
comboxGoods
.
setName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductName
())
?
orderItemResp
.
getProductName
()
:
""
);
comboxGoods
.
setSpuName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductName
())
?
orderItemResp
.
getProductName
()
:
""
);
comboxGoods
.
setSpuName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductName
())
?
orderItemResp
.
getProductName
()
:
""
);
comboxGoods
.
setSkuName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductSpecName
())
?
orderItemResp
.
getProductSpecName
()
:
""
);
comboxGoods
.
setSkuName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductSpecName
())
?
orderItemResp
.
getProductSpecName
()
:
""
);
comboxGoods
.
setSubName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductSpecName
())
?
orderItemResp
.
getProductSpecName
()
:
""
);
comboxGoods
.
setSubName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductSpecName
())
?
orderItemResp
.
getProductSpecName
()
:
""
);
comboxGoods
.
setPic
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductPicUrl
())
?
orderItemResp
.
getProductPicUrl
()
:
""
);
if
(!
""
.
equals
(
orderItemResp
.
getProductProperty
()))
{
comboxGoods
.
setOriginalAmount
(
comboxGoods
.
getOriginalPrice
()
*
comboxGoods
.
getQty
());
comboxGoods
.
setOriginalAmount
(
comboxGoods
.
getOriginalPrice
()
*
comboxGoods
.
getQty
());
comboxGoods
.
setAmount
(
comboxGoods
.
getFinalPrice
()
*
comboxGoods
.
getQty
());
comboxGoods
.
setAmount
(
comboxGoods
.
getFinalPrice
()
*
comboxGoods
.
getQty
());
if
(
StringUtils
.
isNotBlank
(
orderItemResp
.
getProductProperty
()))
{
if
(
StringUtils
.
isNotBlank
(
orderItemResp
.
getProductProperty
()))
{
...
@@ -1069,11 +1044,28 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1069,11 +1044,28 @@ public class ShoppingCartMCoffeeServiceImpl {
}
}
comboxGoods
.
setExtra
(
extra
);
comboxGoods
.
setExtra
(
extra
);
}
}
for
(
OrderItemResp
itemResp
:
orderItemList
)
{
//特制
if
(
StringUtils
.
isNotEmpty
(
itemResp
.
getExtInfo
())){
JSONObject
extJson
=
JSONObject
.
parseObject
(
itemResp
.
getExtInfo
());
if
(
extJson
.
containsKey
(
"specialAttrs"
))
{
CartGoods
.
SpecialExtra
specialExtra
=
new
CartGoods
.
SpecialExtra
();
JSONArray
specialAttrs
=
JSONArray
.
parseArray
(
extJson
.
getString
(
"specialAttrs"
));
for
(
Object
specialAttr
:
specialAttrs
)
{
JSONObject
object
=
JSONObject
.
parseObject
(
specialAttr
.
toString
());
specialExtra
.
setAttributeId
(
object
.
containsKey
(
"attributeId"
)
?
object
.
getString
(
"attributeId"
)
:
""
);
specialExtra
.
setAttributeName
(
object
.
containsKey
(
"attributeName"
)
?
object
.
getString
(
"attributeName"
)
:
""
);
specialExtra
.
setSpecialCode
(
object
.
containsKey
(
"specialCode"
)
?
object
.
getString
(
"specialCode"
)
:
""
);
}
comboxGoods
.
setSpecialExtra
(
Arrays
.
asList
(
specialExtra
));
}
}
}
Map
<
String
,
Object
>
map
=
JSONObject
.
parseObject
(
orderItemResp
.
getExtInfo
(),
Map
.
class
);
Map
<
String
,
Object
>
map
=
JSONObject
.
parseObject
(
orderItemResp
.
getExtInfo
(),
Map
.
class
);
if
(
map
.
containsKey
(
"isFixedProduct"
)
&&
(
boolean
)
map
.
get
(
"isFixedProduct"
))
{
if
(
map
.
containsKey
(
"isFixedProduct"
)
&&
(
boolean
)
map
.
get
(
"isFixedProduct"
))
{
cartGoods
.
getProductComboList
().
add
(
comboxGoods
);
cartGoods
.
getProductComboList
().
add
(
comboxGoods
);
cartGoods
.
setFinalPrice
(
comboxGoods
.
getFinalPrice
());
cartGoods
.
setOriginalPrice
(
comboxGoods
.
getOriginalPrice
());
}
}
if
(
map
.
containsKey
(
"isFixedProduct"
)
&&
!(
boolean
)
map
.
get
(
"isFixedProduct"
))
{
if
(
map
.
containsKey
(
"isFixedProduct"
)
&&
!(
boolean
)
map
.
get
(
"isFixedProduct"
))
{
cartGoods
.
getProductGroupList
().
add
(
comboxGoods
);
cartGoods
.
getProductGroupList
().
add
(
comboxGoods
);
...
@@ -1506,7 +1498,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1506,7 +1498,7 @@ public class ShoppingCartMCoffeeServiceImpl {
* 【去支付使用】购物车商品check,加购商品不在菜单不check
* 【去支付使用】购物车商品check,加购商品不在菜单不check
*/
*/
private
CheckCartRequest
checkCartGoodsForToPay
(
String
partnerId
,
String
storeId
,
Integer
orderType
,
String
menuType
,
private
CheckCartRequest
checkCartGoodsForToPay
(
String
partnerId
,
String
storeId
,
Integer
orderType
,
String
menuType
,
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
).
collect
(
Collectors
.
toList
());
...
@@ -1619,28 +1611,20 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1619,28 +1611,20 @@ public class ShoppingCartMCoffeeServiceImpl {
List
<
String
>
invalidSpu
=
new
ArrayList
<>();
List
<
String
>
invalidSpu
=
new
ArrayList
<>();
List
<
String
>
notFoundSpu
=
new
ArrayList
<>();
List
<
String
>
notFoundSpu
=
new
ArrayList
<>();
List
<
String
>
changePriceSpu
=
new
ArrayList
<>();
List
<
String
>
changePriceSpu
=
new
ArrayList
<>();
List
<
String
>
disableCoupon
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
validateResult
.
getFailureList
().
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
validateResult
.
getFailureList
().
size
();
i
++)
{
checkCartRequest
.
getShoppingCartGoodsResponseVo
().
setChanged
(
true
);
checkCartRequest
.
getShoppingCartGoodsResponseVo
().
setChanged
(
true
);
ValiadShopProductResult
validaProduct
=
validateResult
.
getFailureList
().
get
(
i
);
ValiadShopProductResult
validaProduct
=
validateResult
.
getFailureList
().
get
(
i
);
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
cartGoods
:
checkCartRequest
.
getCartGoodsList
())
{
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
cartGoods
:
checkCartRequest
.
getCartGoodsList
())
{
if
(
cartGoods
.
getSkuId
().
equals
(
validaProduct
.
getSkuId
()))
{
if
(
cartGoods
.
getSkuId
().
equals
(
validaProduct
.
getSkuId
()))
{
String
spuName
=
null
==
validaProduct
.
getProductType
()
?
cartGoods
.
getSpuName
()
:
validaProduct
.
getProductType
().
getName
();
String
spuName
=
null
==
validaProduct
.
getProductType
()
?
cartGoods
.
getSpuName
()
:
validaProduct
.
getProductType
().
getName
();
String
couponName
=
StringUtils
.
isNotEmpty
(
cartGoods
.
getCouponName
())
?
cartGoods
.
getCouponName
()
:
""
;
if
(
PRODUCT_DOWN
==
validaProduct
.
getCode
())
{
if
(
PRODUCT_DOWN
==
validaProduct
.
getCode
())
{
invalidSpu
.
add
(
spuName
);
invalidSpu
.
add
(
spuName
);
if
(
StringUtils
.
isNotEmpty
(
couponName
)){
disableCoupon
.
add
(
couponName
);
}
cartGoodsStates
.
setHasInvalidGoods
(
true
);
cartGoodsStates
.
setHasInvalidGoods
(
true
);
cartGoods
.
setCartGoodsUid
(
null
);
cartGoods
.
setCartGoodsUid
(
null
);
break
;
break
;
}
}
if
(
PRODUCT_NOTFOUND
==
validaProduct
.
getCode
())
{
if
(
PRODUCT_NOTFOUND
==
validaProduct
.
getCode
())
{
notFoundSpu
.
add
(
spuName
);
notFoundSpu
.
add
(
spuName
);
if
(
StringUtils
.
isNotEmpty
(
couponName
)){
disableCoupon
.
add
(
couponName
);
}
cartGoodsStates
.
setHasInvalidGoods
(
true
);
cartGoodsStates
.
setHasInvalidGoods
(
true
);
cartGoods
.
setCartGoodsUid
(
null
);
cartGoods
.
setCartGoodsUid
(
null
);
break
;
break
;
...
@@ -1671,10 +1655,6 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1671,10 +1655,6 @@ public class ShoppingCartMCoffeeServiceImpl {
toastMsg
=
toastMsg
.
concat
(
CART_PRODUCT_PRICE_CHANGE
.
replace
(
"$spuName"
,
StringUtils
.
join
(
changePriceSpu
,
","
)));
toastMsg
=
toastMsg
.
concat
(
CART_PRODUCT_PRICE_CHANGE
.
replace
(
"$spuName"
,
StringUtils
.
join
(
changePriceSpu
,
","
)));
}
}
if
(
CollectionUtils
.
isNotEmpty
(
disableCoupon
)){
toastMsg
=
toastMsg
.
concat
(
COUPON_IS_DISABLE
.
replace
(
"$couponName"
,
StringUtils
.
join
(
disableCoupon
,
","
)));
}
checkCartRequest
.
getShoppingCartGoodsResponseVo
().
setToastMsg
(
toastMsg
);
checkCartRequest
.
getShoppingCartGoodsResponseVo
().
setToastMsg
(
toastMsg
);
setToastMsgIfNotExist
(
checkCartRequest
.
getShoppingCartGoodsResponseVo
(),
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
constant
.
ShoppingCartConstant
.
SHOPPING_CART_GOODS_CHANGE
);
setToastMsgIfNotExist
(
checkCartRequest
.
getShoppingCartGoodsResponseVo
(),
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
constant
.
ShoppingCartConstant
.
SHOPPING_CART_GOODS_CHANGE
);
...
@@ -1847,17 +1827,4 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1847,17 +1827,4 @@ public class ShoppingCartMCoffeeServiceImpl {
}
}
return
requestVo
;
return
requestVo
;
}
}
}
private
String
getCouponNameByCode
(
String
couponCode
,
CustomerInfoVo
userInfo
,
String
menuType
){
\ No newline at end of file
String
couponName
=
""
;
//加购的时候根据券号查询券名称,存入cartGood
CheckSpqInfoRequestDto
checkSpqInfoRequestDto
=
new
CheckSpqInfoRequestDto
(
userInfo
.
getPartnerId
(),
userInfo
.
getStoreId
(),
couponCode
,
menuType
);
CouponService
couponService
=
SDKCommonBaseContextWare
.
getBean
(
CouponService
.
class
);
CheckSpqInfoResponseDto
checkSpqInfoResponseDto
=
couponService
.
checkSpqInfo
(
checkSpqInfoRequestDto
);
if
(
null
!=
checkSpqInfoRequestDto
&&
StringUtils
.
isNotEmpty
(
checkSpqInfoResponseDto
.
getActivityName
())){
couponName
=
checkSpqInfoResponseDto
.
getActivityName
();
}
return
couponName
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
View file @
5046dd48
...
@@ -62,7 +62,7 @@ public class CouponDiscountCalculation {
...
@@ -62,7 +62,7 @@ public class CouponDiscountCalculation {
private
CouponClient
mCoffeeCouponClient
;
private
CouponClient
mCoffeeCouponClient
;
@Autowired
@Autowired
private
CouponAdapter
couponAdapter
;
private
CouponAdapter
couponAdapter
;
// @Autowired
// @Autowired
// private RedisCache redisCache;
// private RedisCache redisCache;
// @Autowired
// @Autowired
// private CardBinClient cardBinClient;
// private CardBinClient cardBinClient;
...
@@ -107,7 +107,7 @@ public class CouponDiscountCalculation {
...
@@ -107,7 +107,7 @@ public class CouponDiscountCalculation {
// 匹配随单购悦享卡
// 匹配随单购悦享卡
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
Discount
discountMon
=
couponDiscounts
.
stream
().
filter
(
t
->
(
ActivityTypeEnum
.
TYPE_32
.
getCode
().
equals
(
t
.
getType
())
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
Discount
discountMon
=
couponDiscounts
.
stream
().
filter
(
t
->
(
ActivityTypeEnum
.
TYPE_32
.
getCode
().
equals
(
t
.
getType
())
&&
mccafeUniversalCouponCode
.
equals
(
t
.
getActivityCode
()))).
findFirst
().
orElse
(
null
);
&&
mccafeUniversalCouponCode
.
equals
(
t
.
getActivityCode
()))).
findFirst
().
orElse
(
null
);
for
(
CartGoods
cartGoods
:
cartGoodsList
)
{
for
(
CartGoods
cartGoods
:
cartGoodsList
)
{
if
(
goodsMap
.
get
(
cartGoods
.
getCartGoodsUid
())
==
null
)
{
if
(
goodsMap
.
get
(
cartGoods
.
getCartGoodsUid
())
==
null
)
{
...
@@ -182,11 +182,6 @@ public class CouponDiscountCalculation {
...
@@ -182,11 +182,6 @@ public class CouponDiscountCalculation {
continue
;
continue
;
}
}
//商品券商品
//商品券商品
if
(
StringUtils
.
isNotEmpty
(
cartGoods
.
getCouponCode
())
||
discount
!=
null
)
{
if
(
goodsMap
.
get
(
cartGoods
.
getCartGoodsUid
())
==
null
)
{
continue
;
}
if
(
StringUtils
.
isNotEmpty
(
cartGoods
.
getCouponCode
())
)
{
if
(
StringUtils
.
isNotEmpty
(
cartGoods
.
getCouponCode
())
)
{
List
<
ActivityDiscountsDto
>
productActivityDiscountsDtos
=
new
ArrayList
<>();
List
<
ActivityDiscountsDto
>
productActivityDiscountsDtos
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
discounts
))
{
if
(
CollectionUtils
.
isNotEmpty
(
discounts
))
{
...
@@ -207,8 +202,6 @@ public class CouponDiscountCalculation {
...
@@ -207,8 +202,6 @@ public class CouponDiscountCalculation {
}
}
}
}
}
}
cartGoods
.
setCustomerCode
(
goodsMap
.
get
(
cartGoods
.
getCartGoodsUid
()).
getArtNo
());
}
}
cartGoods
.
setCustomerCode
(
goodsMap
.
get
(
cartGoods
.
getCartGoodsUid
()).
getArtNo
());
cartGoods
.
setCustomerCode
(
goodsMap
.
get
(
cartGoods
.
getCartGoodsUid
()).
getArtNo
());
List
<
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
>
list
=
goodsMap
.
get
(
cartGoods
.
getCartGoodsUid
()).
getDiscounts
();
List
<
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
>
list
=
goodsMap
.
get
(
cartGoods
.
getCartGoodsUid
()).
getDiscounts
();
...
@@ -402,7 +395,7 @@ public class CouponDiscountCalculation {
...
@@ -402,7 +395,7 @@ public class CouponDiscountCalculation {
public
List
<
CouponAvailableReqByCart
>
buildAvailableCoupons
(
QueryCartInfoRequestVo
requestVo
,
List
<
CartGoods
>
cartGoods
,
public
List
<
CouponAvailableReqByCart
>
buildAvailableCoupons
(
QueryCartInfoRequestVo
requestVo
,
List
<
CartGoods
>
cartGoods
,
List
<
String
>
couponCodes
){
List
<
String
>
couponCodes
){
List
<
CouponAvailableReqByCart
>
resList
=
new
ArrayList
<>();
List
<
CouponAvailableReqByCart
>
resList
=
new
ArrayList
<>();
CouponAvailableReqByCart
res
=
new
CouponAvailableReqByCart
();
CouponAvailableReqByCart
res
=
new
CouponAvailableReqByCart
();
res
.
setProviderId
(
requestVo
.
getPartnerId
());
res
.
setProviderId
(
requestVo
.
getPartnerId
());
...
...
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