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
3eaf122d
Commit
3eaf122d
authored
Jun 16, 2021
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新操作
parent
3a6dfff2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
3 deletions
+27
-3
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+27
-3
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
3eaf122d
...
...
@@ -20,6 +20,7 @@ import cn.freemud.service.CouponService;
import
cn.freemud.service.impl.AssortmentSdkService
;
import
cn.freemud.service.impl.CouponServiceImpl
;
import
cn.freemud.service.impl.FullSubtractionActivityServiceImpl
;
import
cn.freemud.service.impl.mcoffee.calculation.BuySendCalculation
;
import
cn.freemud.service.impl.mcoffee.calculation.CalculationServiceImpl
;
import
cn.freemud.service.impl.mcoffee.calculation.CouponDiscountCalculation
;
import
cn.freemud.service.impl.mcoffee.entity.CopyShoppingCartRequestVo
;
...
...
@@ -115,6 +116,8 @@ public class ShoppingCartMCoffeeServiceImpl {
private
ProductClient
productClient
;
@Autowired
private
ShoppingCartConvertAdapter
shoppingCartConvertAdapter
;
@Autowired
private
BuySendCalculation
buySendCalculation
;
private
static
final
String
nullSeat
=
"508106"
;
...
...
@@ -249,8 +252,8 @@ public class ShoppingCartMCoffeeServiceImpl {
||
activityListOptional
.
get
().
getMcCafeSendGoodsList
().
stream
().
noneMatch
(
o
->
o
.
getSkuId
().
equals
(
cartSendGoodsList
.
get
(
0
).
getSkuId
())))
{
MCoffeeAddGoodsRequestVo
selectGoodsRequest
=
new
MCoffeeAddGoodsRequestVo
();
BeanUtils
.
copyProperties
(
addShoppingCartGoodsRequestVo
,
selectGoodsRequest
);
selectGoodsRequest
.
setSkuId
(
activityListOptional
.
get
().
getMcCafeSendGoodsList
().
get
(
0
).
get
Sku
Id
());
selectGoodsRequest
.
setSpuId
(
activityListOptional
.
get
().
getMcCafeSendGoodsList
().
get
(
0
).
get
Sku
Id
());
selectGoodsRequest
.
setSkuId
(
activityListOptional
.
get
().
getMcCafeSendGoodsList
().
get
(
0
).
get
Goods
Id
());
selectGoodsRequest
.
setSpuId
(
activityListOptional
.
get
().
getMcCafeSendGoodsList
().
get
(
0
).
get
Goods
Id
());
selectGoodsRequest
.
setOperationType
(
1
);
selectSendGoods
(
selectGoodsRequest
);
}
...
...
@@ -671,9 +674,30 @@ public class ShoppingCartMCoffeeServiceImpl {
// 当couponCode不为空时,需参与价格计算
List
<
ActivityCalculationDiscountRequestDto
.
CalculationDiscountCoupon
>
coupons
=
getCoupon
(
couponCode
,
null
,
cartGoodsList
,
freightCouponCode
,
null
);
// 促销活动的优惠金额计算
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
couponCode
,
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscount
=
calculationService
.
updateShoppingCartGoodsDiscount
(
partnerId
,
storeId
,
userId
,
appId
,
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
menuType
,
receiveId
,
couponCode
,
cartGoodsList
,
coupons
,
new
ArrayList
<>(),
shoppingCartGoodsResponseVo
,
null
,
cartSendGoodsList
);
if
(
null
!=
shoppingCartGoodsResponseVo
.
getActivityTip
()
&&
CollectionUtils
.
isNotEmpty
(
shoppingCartGoodsResponseVo
.
getActivityTip
().
getActivityList
()))
{
Optional
<
ActivityList
>
activityListOptional
=
shoppingCartGoodsResponseVo
.
getActivityTip
().
getActivityList
().
stream
().
filter
(
o
->
ActivityTypeEnum
.
TYPE_230
.
getCode
().
equals
(
o
.
getTipType
())).
findFirst
();
if
(
activityListOptional
.
isPresent
())
{
List
<
CartGoods
>
finalCartSendGoodsList
=
new
ArrayList
<>();
finalCartSendGoodsList
.
addAll
(
cartSendGoodsList
);
if
(
CollectionUtils
.
isEmpty
(
cartSendGoodsList
)
||
activityListOptional
.
get
().
getMcCafeSendGoodsList
().
stream
().
noneMatch
(
o
->
o
.
getSkuId
().
equals
(
finalCartSendGoodsList
.
get
(
0
).
getSkuId
())))
{
MCoffeeAddGoodsRequestVo
selectGoodsRequest
=
new
MCoffeeAddGoodsRequestVo
();
BeanUtils
.
copyProperties
(
updateShoppingCartGoodsQtyRequestVo
,
selectGoodsRequest
);
selectGoodsRequest
.
setSkuId
(
activityListOptional
.
get
().
getMcCafeSendGoodsList
().
get
(
0
).
getGoodsId
());
selectGoodsRequest
.
setSpuId
(
activityListOptional
.
get
().
getMcCafeSendGoodsList
().
get
(
0
).
getGoodsId
());
selectGoodsRequest
.
setOperationType
(
1
);
selectSendGoods
(
selectGoodsRequest
);
cartSendGoodsList
=
assortmentSdkService
.
getShoppingCartSendGoods
(
partnerId
,
storeId
,
userId
,
sessionId
,
""
,
shoppingCartBaseService
);
buySendCalculation
.
updateBuySendActivityTip
(
calculationDiscount
,
shoppingCartGoodsResponseVo
,
cartSendGoodsList
);
}
}
}
//把月卡放到最后
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsList
))
{
int
size
=
cartGoodsList
.
size
();
...
...
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