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
60ad4eb0
Commit
60ad4eb0
authored
Mar 31, 2018
by
Junling Bu
Browse files
update[litemall-wx-api]:实现简单的运费计算,即满88则运费0,否则运费8。
parent
da447795
Changes
2
Hide whitespace changes
Inline
Side-by-side
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxCartController.java
View file @
60ad4eb0
...
...
@@ -362,10 +362,6 @@ public class WxCartController {
}
}
// 根据收货地址计算运费
BigDecimal
freightPrice
=
new
BigDecimal
(
0.00
);
// 获取可用的优惠券信息
// 使用优惠券减免的金额
BigDecimal
couponPrice
=
new
BigDecimal
(
0.00
);
...
...
@@ -388,6 +384,12 @@ public class WxCartController {
checkedGoodsPrice
=
checkedGoodsPrice
.
add
(
cart
.
getRetailPrice
().
multiply
(
new
BigDecimal
(
cart
.
getNumber
())));
}
// 根据订单商品总价计算运费,满88则免运费,否则8元;
BigDecimal
freightPrice
=
new
BigDecimal
(
0.00
);
if
(
checkedGoodsPrice
.
compareTo
(
new
BigDecimal
(
88.00
))
==
-
1
){
freightPrice
=
new
BigDecimal
(
8.00
);
}
// 可以使用的其他钱,例如用户积分
BigDecimal
integralPrice
=
new
BigDecimal
(
0.00
);
...
...
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxOrderController.java
View file @
60ad4eb0
...
...
@@ -198,9 +198,6 @@ public class WxOrderController {
// 收货地址
LitemallAddress
checkedAddress
=
addressService
.
findById
(
addressId
);
// 根据收货地址计算运费
BigDecimal
freightPrice
=
new
BigDecimal
(
0.00
);
// 获取可用的优惠券信息
// 使用优惠券减免的金额
BigDecimal
couponPrice
=
new
BigDecimal
(
0.00
);
...
...
@@ -223,6 +220,12 @@ public class WxOrderController {
checkedGoodsPrice
=
checkedGoodsPrice
.
add
(
cart
.
getRetailPrice
().
multiply
(
new
BigDecimal
(
cart
.
getNumber
())));
}
// 根据订单商品总价计算运费,满88则免运费,否则8元;
BigDecimal
freightPrice
=
new
BigDecimal
(
0.00
);
if
(
checkedGoodsPrice
.
compareTo
(
new
BigDecimal
(
88.00
))
==
-
1
){
freightPrice
=
new
BigDecimal
(
8.00
);
}
// 可以使用的其他钱,例如用户积分
BigDecimal
integralPrice
=
new
BigDecimal
(
0.00
);
...
...
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