先付费模式创建订单之后结束购物车状态

This commit is contained in:
SongZhang 2024-10-11 16:42:35 +08:00
parent 4d0bb753c4
commit 857502e26e
1 changed files with 5 additions and 1 deletions

View File

@ -1205,7 +1205,6 @@ public class TbShopTableServiceImpl implements TbShopTableService {
String orderNo = generateOrderNumber(null);
orderInfo = new TbOrderInfo();
orderInfo.setOrderNo(orderNo);
orderInfo.setUseType(createOrderDTO.isPostPay() ? "postPay" : "afterPay");
orderInfo.setAmount(totalAmount);
orderInfo.setPayAmount(BigDecimal.ZERO);
orderInfo.setPackFee(packAMount);
@ -1286,6 +1285,11 @@ public class TbShopTableServiceImpl implements TbShopTableService {
if (cashierCart.getPlaceNum() == null) {
cashierCart.setPlaceNum(placeNum);
}
// 先付费模式结束购物车状态
if (shopEatTypeInfoDTO.isDineInBefore()) {
cashierCart.setStatus("final");
}
cashierCartMapper.updateById(cashierCart);
}