修复代客下单多个商品计算总金额错误的bug
This commit is contained in:
@@ -6,6 +6,7 @@ import cn.hutool.core.collection.CollUtil;
|
|||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.thread.ThreadUtil;
|
import cn.hutool.core.thread.ThreadUtil;
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.ysk.cashier.config.security.security.TokenProvider;
|
import cn.ysk.cashier.config.security.security.TokenProvider;
|
||||||
@@ -544,7 +545,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||||||
|
|
||||||
cashierCart.setProGroupInfo(JSONObject.toJSONString(foods));
|
cashierCart.setProGroupInfo(JSONObject.toJSONString(foods));
|
||||||
}
|
}
|
||||||
}else if (isFixGroup) {
|
} else if (isFixGroup) {
|
||||||
String groupSnap = product.getGroupSnap();
|
String groupSnap = product.getGroupSnap();
|
||||||
if (StrUtil.isNotBlank(groupSnap)) {
|
if (StrUtil.isNotBlank(groupSnap)) {
|
||||||
ArrayList<ProductGroupVo.Food> foods = new ArrayList<>();
|
ArrayList<ProductGroupVo.Food> foods = new ArrayList<>();
|
||||||
@@ -2278,7 +2279,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||||||
for (TbCashierCart cashierCart : cashierCarts) {
|
for (TbCashierCart cashierCart : cashierCarts) {
|
||||||
if (cashierCart.getUserCouponId() == null) {
|
if (cashierCart.getUserCouponId() == null) {
|
||||||
cashierCart.setTotalAmount(cashierCart.getTotalAmount().multiply(discount).setScale(2, RoundingMode.HALF_UP));
|
cashierCart.setTotalAmount(cashierCart.getTotalAmount().multiply(discount).setScale(2, RoundingMode.HALF_UP));
|
||||||
totalAmount = cashierCart.getTotalAmount();
|
totalAmount = NumberUtil.add(totalAmount, cashierCart.getTotalAmount());
|
||||||
}
|
}
|
||||||
// item.setSalePrice(item.getSalePrice().multiply(discount).setScale(2, RoundingMode.HALF_UP));
|
// item.setSalePrice(item.getSalePrice().multiply(discount).setScale(2, RoundingMode.HALF_UP));
|
||||||
// item.setMemberPrice(item.getMemberPrice().multiply(discount).setScale(2, RoundingMode.HALF_UP));
|
// item.setMemberPrice(item.getMemberPrice().multiply(discount).setScale(2, RoundingMode.HALF_UP));
|
||||||
|
|||||||
Reference in New Issue
Block a user