创建订单保存sendType

This commit is contained in:
2024-09-27 10:05:49 +08:00
parent cf9ff5c380
commit 19533f37b4
2 changed files with 5 additions and 1 deletions

View File

@@ -15,4 +15,5 @@ public class ShopEatTypeInfoDTO {
private String useType;
private Object shopId;
private String tableId;
private String sendType;
}

View File

@@ -180,7 +180,8 @@ public class TbShopTableServiceImpl implements TbShopTableService {
boolean isDineInBefore = isMunchies && !isTakeout;
return new ShopEatTypeInfoDTO(isTakeout, isMunchies, isDineInAfter, isDineInBefore, shopInfo, isTakeout ? OrderUseTypeEnum.TAKEOUT.getValue() :
isMunchies ? OrderUseTypeEnum.DINE_IN_BEFORE.getValue() : OrderUseTypeEnum.DINE_IN_AFTER.getValue(), shopId, tableId);
isMunchies ? OrderUseTypeEnum.DINE_IN_BEFORE.getValue() : OrderUseTypeEnum.DINE_IN_AFTER.getValue(),
shopId, tableId, isTakeout ? OrderSendTypeEnums.TAKE_SELF.getValue() : OrderSendTypeEnums.TABLE.getValue());
}
@@ -1198,6 +1199,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
orderInfo.setCreatedAt(DateUtil.current());
orderInfo.setSeatAmount(mealAmount);
orderInfo.setSeatCount(mealNum);
orderInfo.setSendType(shopEatTypeInfoDTO.getSendType());
// 存在新添加的商品,增加下单次数
if (hasNewInfo) {
orderInfo.setPlaceNum(placeNum);
@@ -1232,6 +1234,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
orderInfo.setUseType(createOrderDTO.getUseType());
orderInfo.setSeatAmount(mealAmount);
orderInfo.setSeatCount(mealNum);
orderInfo.setSendType(shopEatTypeInfoDTO.getSendType());
TbMerchantAccount merchantAccount = merchantAccountMapper.selectOne(new LambdaQueryWrapper<TbMerchantAccount>()
.eq(TbMerchantAccount::getShopId, createOrderDTO.getShopId())
.eq(TbMerchantAccount::getStatus, 1));