不能取消赠送fix

This commit is contained in:
SongZhang 2024-10-18 17:27:06 +08:00
parent fcaf1f230b
commit b12f6ae823
1 changed files with 2 additions and 2 deletions

View File

@ -382,8 +382,8 @@ public class TbShopTableServiceImpl implements TbShopTableService {
tbCashierCart.setIsPack(updateCartDTO.getIsPack() ? "true" : "false");
}
if (updateCartDTO.getIsGift() != null && updateCartDTO.getIsGift()) {
tbCashierCart.setTotalAmount(BigDecimal.ZERO);
if (updateCartDTO.getIsGift() != null ) {
tbCashierCart.setTotalAmount(updateCartDTO.getIsGift() ? BigDecimal.ZERO : tbCashierCart.getTotalAmount());
tbCashierCart.setIsGift(updateCartDTO.getIsGift() ? "true" : "false");
}