退菜同步修改订单金额

This commit is contained in:
2024-10-12 10:20:02 +08:00
parent 608fb72c78
commit 7379b1d85d
2 changed files with 17 additions and 0 deletions

View File

@@ -629,6 +629,9 @@ public class TbShopTableServiceImpl implements TbShopTableService {
}
// 餐位费直接删除
TbOrderDetail orderDetail = orderDetailMapper.selectOne(new LambdaQueryWrapper<TbOrderDetail>()
.eq(TbOrderDetail::getCartId, cashierCart.getId()));
if (cashierCart.getId() == -999) {
cashierCartMapper.deleteById(cashierCart.getId());
if (cashierCart.getOrderId() != null) {
@@ -656,6 +659,12 @@ public class TbShopTableServiceImpl implements TbShopTableService {
}
if (cashierCart.getOrderId() != null) {
// 减少订单金额
orderInfoMapper.updateOrderAmount(cashierCart.getOrderId(), orderDetail.getPriceAmount(), orderDetail.getPackAmount());
}
}
@Override