fix: 订单优惠券折扣金额不准确修复

This commit is contained in:
张松
2024-11-21 15:13:36 +08:00
parent aceb5be7a6
commit 23cc269ae9

View File

@@ -1457,7 +1457,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
OrderCartInfoDTO cartInfoDTO = new OrderCartInfoDTO();
List<TbCashierCart> allCashierCarts;
if (orderId != null) {
allCashierCarts = mpCashierCartService.selectByOrderIdAndState(orderId, null);
allCashierCarts = mpCashierCartService.selectByOrderIdAndState(orderId);
}else {
allCashierCarts = mpCashierCartService.selectByShopEatType(shopEatTypeInfoDTO, masterId);
}
@@ -2082,7 +2082,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
private BigDecimal getCartCouponDiscount(TbOrderInfo orderInfo, PayDTO payDTO) {
Set<String> productIdSet = new HashSet<>();
List<TbCashierCart> cashierCarts = mpCashierCartService.selectByOrderIdAndState(orderInfo.getId(), null);
List<TbCashierCart> cashierCarts = mpCashierCartService.selectByOrderIdAndState(orderInfo.getId());
ArrayList<TbCashierCart> activateCartInfo = new ArrayList<>();
for (TbCashierCart cashierCart : cashierCarts) {
productIdSet.add(cashierCart.getProductId());