fix: 购物车增加称重商品标识

This commit is contained in:
张松 2024-12-19 17:58:04 +08:00
parent df92ad6179
commit 004b3294c4
3 changed files with 5 additions and 1 deletions

View File

@ -89,6 +89,7 @@ public class TbCashierCart implements Serializable {
private String proGroupInfo;
private String typeEnum;
private Integer groupType;
private int isWeight;
public void copy(TbCashierCart source) {
BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));

View File

@ -67,5 +67,5 @@ public class TbOrderDetail implements Serializable {
private BigDecimal discountSaleAmount;
private String discountSaleNote;
private String proGroupInfo;
private int isWeight;
}

View File

@ -544,6 +544,8 @@ public class OrderService {
cashierCart.setTableId(tableId);
cashierCart.setPlatformType(OrderPlatformTypeEnum.CASH.getValue());
if (product != null) {
cashierCart.setIsWeight("weigh".equals(product.getType()) ? 1 : 0);
resetGroupProductCart(groupProductIdList, product, cashierCart);
}
list.add(cashierCart);
@ -1087,6 +1089,7 @@ public class OrderService {
if (TableConstant.CART_SEAT_ID.equals(cashierCart.getProductId())) {
saleAmount = saleAmount.add(shopInfo.getTableFee());
}
orderDetail.setIsWeight(cashierCart.getIsWeight());
orderDetail.setProGroupInfo(cashierCart.getProGroupInfo());
orderDetail.setIsTemporary(cashierCart.getIsTemporary());