代客下单调整
This commit is contained in:
@@ -1095,7 +1095,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||
BigDecimal feeAmount = BigDecimal.ZERO;
|
||||
BigDecimal saleAmount = BigDecimal.ZERO;
|
||||
// 当前下单次数
|
||||
int placeNum = !shopEatTypeInfoDTO.isTakeout() ? getCurrentPlaceNum(createOrderDTO.getTableId(), createOrderDTO.getShopId().toString(), createOrderDTO.getUseType()) : 1;
|
||||
int placeNum = getCurrentPlaceNum(createOrderDTO.getTableId(), String.valueOf(createOrderDTO.getShopId()), createOrderDTO.getUseType());
|
||||
List<TbOrderDetail> orderDetails = new ArrayList<>();
|
||||
|
||||
BigDecimal mealAmount = null;
|
||||
@@ -1146,7 +1146,6 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||
orderId = cashierCart.getOrderId();
|
||||
}
|
||||
orderDetail.setOrderId(orderId);
|
||||
orderDetail.setPlaceNum(placeNum);
|
||||
orderDetails.add(orderDetail);
|
||||
}
|
||||
|
||||
@@ -1231,6 +1230,9 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||
orderId = orderInfo.getId();
|
||||
for (TbOrderDetail orderDetail : orderDetails) {
|
||||
orderDetail.setOrderId(orderId);
|
||||
if (orderDetail.getPlaceNum() == null) {
|
||||
orderDetail.setPlaceNum(placeNum);
|
||||
}
|
||||
}
|
||||
// 删除已经移除购物车的订单 修改并保存数据
|
||||
if (!orderDetails.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user