diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCashierCart.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCashierCart.java index 0aeb5b3..f05df71 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCashierCart.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCashierCart.java @@ -87,6 +87,8 @@ public class TbCashierCart implements Serializable { private String useCouponInfo; private int isThirdCoupon; private String proGroupInfo; + private String typeEnum; + private Integer groupType; public void copy(TbCashierCart source) { BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java index 64331cf..75f50d2 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java @@ -391,7 +391,7 @@ public class OrderService { } - if (Objects.nonNull(cart)) { + if (Objects.nonNull(cart) && cart.getGroupType() != null && cart.getGroupType() == 0) { //查询现有规格商品 cart.setNumber(number); cart.setIsGift(isGift); @@ -408,7 +408,7 @@ public class OrderService { List list = cashierCartMapper.selectALlByMasterId(masterId, "create"); TbCashierCart cashierCart = getCashierInfo(shopId, skuId, productId, tableId, masterId, shopEatTypeInfoDTO); // 不存在新增 - if (Objects.isNull(cashierCart)) { + if (Objects.isNull(cashierCart) || (cart != null && cart.getGroupType() != null && cart.getGroupType() == 1)) { cashierCart = new TbCashierCart(); cashierCart.setUseType(shopEatTypeInfoDTO.getUseType()); if (product != null) { @@ -416,6 +416,8 @@ public class OrderService { cashierCart.setIsSku(product.getTypeEnum()); cashierCart.setName(product.getName()); cashierCart.setCategoryId(product.getCategoryId()); + cashierCart.setTypeEnum(product.getTypeEnum()); + cashierCart.setGroupType(product.getGroupType()); } cashierCart.setCreatedAt(System.currentTimeMillis()); cashierCart.setMasterId(masterId);