feat: 1. 添加商品会员价 2.空订单直接删除

This commit is contained in:
张松
2024-11-07 10:25:52 +08:00
parent 635ebb138f
commit 896667018a
5 changed files with 47 additions and 3 deletions

View File

@@ -61,6 +61,8 @@ public class TbCashierCart implements Serializable {
private String useType;
private Integer placeNum;
private String platformType;
private BigDecimal memberPrice;
private Integer isMember;
@TableField(exist = false)
private TbProductSpec tbProductSpec;
@@ -69,4 +71,22 @@ public class TbCashierCart implements Serializable {
private String selectSpec="";
private static final long serialVersionUID = 1L;
/**
* 根据是否会员充值价格
*/
public void resetTotalAmount() {
if ("false".equals(isPack)) {
packFee = BigDecimal.ZERO;
}
if ("true".equals(isGift)) {
totalAmount = packFee;
}else {
if (isMember != null && isMember == 1) {
totalAmount = BigDecimal.valueOf(totalNumber).multiply(memberPrice).add(packFee);
}else {
totalAmount = BigDecimal.valueOf(totalNumber).multiply(salePrice).add(packFee);
}
}
}
}

View File

@@ -47,5 +47,7 @@ public class TbOrderDetail implements Serializable {
private String note;
private BigDecimal memberPrice;
private static final long serialVersionUID = 1L;
}