fix: 修复打包未计算的问题

This commit is contained in:
张松 2024-11-06 17:21:32 +08:00
parent 6c5940c6ea
commit e6145311ed
2 changed files with 4 additions and 1 deletions

View File

@ -176,6 +176,9 @@ public class TbCashierCart implements Serializable {
* 根据是否会员充值价格
*/
public void resetTotalAmount() {
if ("false".equals(isPack)) {
packFee = BigDecimal.ZERO;
}
if ("true".equals(isGift)) {
totalAmount = packFee;
}else {

View File

@ -1414,8 +1414,8 @@ public class TbShopTableServiceImpl implements TbShopTableService {
for (TbCashierCart cashierCart : fullCashierCarts) {
if (orderInfo != null) {
cashierCart.setIsMember(orderInfo.getMemberId() == null ? 0 : 1);
cashierCart.resetTotalAmount();
}
cashierCart.resetTotalAmount();
// 已经退款和使用优惠券的商品不进行统计金额
if (!"return".equals(cashierCart.getStatus()) && cashierCart.getUserCouponId() == null) {