1.fix
This commit is contained in:
2026-05-19 12:33:57 +08:00
parent 0c76f33b95
commit c58e21e592

View File

@@ -207,7 +207,7 @@ public class MerchantInventoryServiceImpl extends BaseServiceImpl<MerchantInvent
throw new ServiceException("商品不存在"); throw new ServiceException("商品不存在");
} }
if(orderMapper.exists(Wrappers.lambdaQuery(MerchantOrderEntity.class).eq(MerchantOrderEntity::getInventoryId, inventory).notIn(MerchantOrderEntity::getStatus, List.of(OrderStatus.COMPLETED.getCode(),OrderStatus.CANCELLED.getCode())))){ if(orderMapper.exists(Wrappers.lambdaQuery(MerchantOrderEntity.class).eq(MerchantOrderEntity::getInventoryId, inventory.getId()).notIn(MerchantOrderEntity::getStatus, List.of(OrderStatus.COMPLETED.getCode(),OrderStatus.CANCELLED.getCode())))){
throw new ServiceException("当前商品有为完成订单,无法进行下架操作"); throw new ServiceException("当前商品有为完成订单,无法进行下架操作");
} }