商城-商品库存为零可以展示商品列表

This commit is contained in:
胡桃云 2023-12-03 23:08:50 +08:00
parent 319c73feaf
commit 6f237a10b5
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ public interface ProductSpuMapper extends BaseMapperX<ProductSpuDO> {
// 分类
.inIfPresent(ProductSpuDO::getCategoryId, categoryIds);
// 上架状态 且有库存
query.eq(ProductSpuDO::getStatus, ProductSpuStatusEnum.ENABLE.getStatus()).gt(ProductSpuDO::getStock, 0);
query.eq(ProductSpuDO::getStatus, ProductSpuStatusEnum.ENABLE.getStatus());
// 推荐类型的过滤条件
if (ObjUtil.equal(pageReqVO.getRecommendType(), AppProductSpuPageReqVO.RECOMMEND_TYPE_HOT)) {
query.eq(ProductSpuDO::getRecommendHot, true);