Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
b252cf2b
Commit
b252cf2b
authored
Apr 16, 2019
by
Junling Bu
Browse files
fix[litemall-wx-api]: 下单时存在传递不合适的优惠券的情况,此时后端自动选择合适的优惠券。
parent
74396eb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxCartController.java
View file @
b252cf2b
...
...
@@ -466,11 +466,14 @@ public class WxCartController {
}
else
{
LitemallCoupon
coupon
=
couponVerifyService
.
checkCoupon
(
userId
,
couponId
,
checkedGoodsPrice
);
// 用户选择的优惠券有问题
// 用户选择的优惠券有问题
,则选择合适优惠券,否则使用用户选择的优惠券
if
(
coupon
==
null
){
return
ResponseUtil
.
badArgumentValue
();
couponPrice
=
tmpCouponPrice
;
couponId
=
tmpCouponId
;
}
else
{
couponPrice
=
coupon
.
getDiscount
();
}
couponPrice
=
coupon
.
getDiscount
();
}
// 根据订单商品总价计算运费,满88则免运费,否则8元;
...
...
Write
Preview
Supports
Markdown
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