购物车只查询当天购物车,规格增加销量

This commit is contained in:
19991905653 2024-04-02 11:46:49 +08:00
parent 03a447d95b
commit bc167fc1c7
1 changed files with 6 additions and 5 deletions

View File

@ -104,16 +104,17 @@ public class OrderService {
cart.setNumber(number);
cart.setIsGift(isGift);
cart.setIsPack(isPack);
if (isGift.equals("false")) {
cart.setTotalAmount(new BigDecimal(number).multiply(skuWithBLOBs.getSalePrice()));
} else {
cart.setTotalAmount(BigDecimal.ZERO);
}
if (isPack.equals("false")){
cart.setPackFee(BigDecimal.ZERO);
}else {
cart.setPackFee(new BigDecimal(number).multiply(product.getPackFee()));
}
if (isGift.equals("false")) {
cart.setTotalAmount(new BigDecimal(number).multiply(skuWithBLOBs.getSalePrice()));
} else {
cart.setTotalAmount(BigDecimal.ZERO);
}
cart.setTotalNumber(number);
cart.setUuid(uuid);
cashierCartMapper.updateByPrimaryKeySelective(cart);