fix: 转桌并桌实现
This commit is contained in:
@@ -2693,6 +2693,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||
tbCashierCart.setNumber(BigDecimal.valueOf(choseCountDTO.getNum()));
|
||||
tbCashierCart.setTotalNumber(BigDecimal.valueOf(choseCountDTO.getNum()));
|
||||
tbCashierCart.setUseType(choseCountDTO.getUseType());
|
||||
tbCashierCart.setPlatformType("pc");
|
||||
tbCashierCartMapper.insert(tbCashierCart);
|
||||
} else {
|
||||
tbCashierCart.setMemberPrice(shopInfo.getTableFee());
|
||||
@@ -3429,9 +3430,11 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||
mpOrderDetailService.removeByCartIds(cartIds);
|
||||
|
||||
// 删除原有台桌detail和order信息
|
||||
if (switchTableDTO.isFull() || switchTableDTO.getCartIds().size() == totalSize) {
|
||||
if (orderId != null && (switchTableDTO.isFull() || switchTableDTO.getCartIds().size() == totalSize)) {
|
||||
mpOrderInfoService.removeById(orderId);
|
||||
}else {
|
||||
}
|
||||
|
||||
if (!switchTableDTO.isFull() && switchTableDTO.getCartIds().size() != totalSize){
|
||||
// 重新创建订单数据
|
||||
CreateOrderDTO createOrderDTO = new CreateOrderDTO();
|
||||
createOrderDTO.setMasterId(switchTableDTO.getMasterId());
|
||||
|
||||
Reference in New Issue
Block a user