!777 商城模块,商品库存为零也可显示商品信息

Merge pull request !777 from 奕泽云/master
This commit is contained in:
芋道源码 2023-12-06 12:17:00 +00:00 committed by Gitee
commit f333aa38c1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -63,7 +63,7 @@ public interface ProductSpuMapper extends BaseMapperX<ProductSpuDO> {
// 分类 // 分类
.inIfPresent(ProductSpuDO::getCategoryId, categoryIds); .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)) { if (ObjUtil.equal(pageReqVO.getRecommendType(), AppProductSpuPageReqVO.RECOMMEND_TYPE_HOT)) {
query.eq(ProductSpuDO::getRecommendHot, true); query.eq(ProductSpuDO::getRecommendHot, true);