fix: 修复无台桌商品无法删除问题

This commit is contained in:
SongZhang 2024-10-25 11:43:01 +08:00
parent dbf29b5e38
commit b49b7ef8af
1 changed files with 1 additions and 4 deletions

View File

@ -596,9 +596,6 @@ public class TbShopTableServiceImpl implements TbShopTableService {
@Override
public void removeCart(RemoveCartDTO removeCartDTO) {
ShopEatTypeInfoDTO shopEatTypeInfoDTO = checkEatModel(removeCartDTO.getShopId(), removeCartDTO.getTableId());
int currentPlaceNum = getCurrentPlaceNum(shopEatTypeInfoDTO);
// 会员点单
TbCashierCart cashierCart = cashierCartMapper.selectOne(new LambdaQueryWrapper<TbCashierCart>()
.eq(TbCashierCart::getShopId, removeCartDTO.getShopId())
@ -608,7 +605,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
throw new BadRequestException("购物车商品不存在");
}
if (removeCartDTO.getTableId() != null && cashierCart.getPlaceNum() != null && !cashierCart.getPlaceNum().equals(currentPlaceNum)) {
if (removeCartDTO.getTableId() != null && cashierCart.getPlaceNum() != null) {
throw new BadRequestException("已下单商品仅支持退单操作");
}