fix: 清空购物车修改

This commit is contained in:
张松 2024-12-16 17:09:02 +08:00
parent 0a89b6d67c
commit b13db23b90
1 changed files with 7 additions and 3 deletions

View File

@ -1533,9 +1533,13 @@ public class OrderService {
mpCashierCartMapper.deleteBatchIds(ids);
}
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
.eq(TbShopTable::getQrcode, cartVo.getTableId())
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
Long count = mpCashierCartService.countByShopEatType(shopEatTypeInfoDTO, cartVo.getMasterId(), orderId, false, TableConstant.OrderInfo.Status.CREATE, TableConstant.OrderInfo.Status.RETURN);
if (count == 0) {
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
.eq(TbShopTable::getQrcode, cartVo.getTableId())
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
}
// 打印退款票据
int finalOrderId = orderId;