fix: 修复无台桌商品无法删除问题
This commit is contained in:
@@ -596,9 +596,6 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeCart(RemoveCartDTO removeCartDTO) {
|
public void removeCart(RemoveCartDTO removeCartDTO) {
|
||||||
ShopEatTypeInfoDTO shopEatTypeInfoDTO = checkEatModel(removeCartDTO.getShopId(), removeCartDTO.getTableId());
|
|
||||||
|
|
||||||
int currentPlaceNum = getCurrentPlaceNum(shopEatTypeInfoDTO);
|
|
||||||
// 会员点单
|
// 会员点单
|
||||||
TbCashierCart cashierCart = cashierCartMapper.selectOne(new LambdaQueryWrapper<TbCashierCart>()
|
TbCashierCart cashierCart = cashierCartMapper.selectOne(new LambdaQueryWrapper<TbCashierCart>()
|
||||||
.eq(TbCashierCart::getShopId, removeCartDTO.getShopId())
|
.eq(TbCashierCart::getShopId, removeCartDTO.getShopId())
|
||||||
@@ -608,7 +605,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||||||
throw new BadRequestException("购物车商品不存在");
|
throw new BadRequestException("购物车商品不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (removeCartDTO.getTableId() != null && cashierCart.getPlaceNum() != null && !cashierCart.getPlaceNum().equals(currentPlaceNum)) {
|
if (removeCartDTO.getTableId() != null && cashierCart.getPlaceNum() != null) {
|
||||||
throw new BadRequestException("已下单商品仅支持退单操作");
|
throw new BadRequestException("已下单商品仅支持退单操作");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user