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
4568d9fa
Commit
4568d9fa
authored
Nov 04, 2021
by
周晓航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增字段用于优惠券使用门槛
Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent
ef2565a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+16
-2
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
4568d9fa
...
...
@@ -406,6 +406,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
//埋点添加购物车行为
this
.
buriedPointShoppingCart
(
addShoppingCartGoodsRequestVo
,
spuId
,
productName
);
this
.
shoppingCartAddOrListCommonResponseHandle
(
shoppingCartGoodsResponseVo
);
return
ResponseUtil
.
success
(
shoppingCartGoodsResponseVo
);
}
...
...
@@ -867,8 +868,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
updateForPopupWindow
(
shoppingCartGoodsResponseVo
,
premiumExchangeResponseVoBaseResponse
.
getResult
().
getShowType
(),
chooseSendGoodList
,
shoppingCartInfoRequestVo
.
getSendGoods
());
}
// 设置优惠券的使用门槛金额, 需要排除券的金额
Long
useCouponThreshold
=
this
.
getUseCouponThreshold
(
shoppingCartGoodsResponseVo
.
getProducts
());
shoppingCartGoodsResponseVo
.
setUseCouponThreshold
(
useCouponThreshold
);
this
.
shoppingCartAddOrListCommonResponseHandle
(
shoppingCartGoodsResponseVo
);
// 校验入参券是否可用
if
(!
checkAvailableCoupon
(
shoppingCartGoodsResponseVo
,
shoppingCartInfoRequestVo
.
getCouponCode
()))
{
return
ResponseUtil
.
error
(
ResponseResult
.
SHOPPING_CART_COUPON_NOT_USE
);
...
...
@@ -877,6 +877,20 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
/**
* 加车 和list接口 公用处理方法
* @param shoppingCartGoodsResponseVo
*/
private
void
shoppingCartAddOrListCommonResponseHandle
(
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
){
if
(
Objects
.
isNull
(
shoppingCartGoodsResponseVo
))
{
return
;
}
// 设置 使用信息
Long
useCouponThreshold
=
this
.
getUseCouponThreshold
(
shoppingCartGoodsResponseVo
.
getProducts
());
shoppingCartGoodsResponseVo
.
setUseCouponThreshold
(
useCouponThreshold
);
}
/**
* 获取 券使用的门槛信息
* @param products
* @return
...
...
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