feat: 多选套餐每次新增数量

This commit is contained in:
张松 2024-12-05 09:39:29 +08:00
parent a3d5b735db
commit 1a2e4bc3bc
2 changed files with 6 additions and 2 deletions

View File

@ -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));

View File

@ -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<TbCashierCart> 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);