查询商品列表是增加库存大于0限制
This commit is contained in:
@@ -110,6 +110,7 @@ public class ShopProductLabelController {
|
||||
shopProductEntityMPJLambdaWrapper.eq(ShopProductToLabelEntity::getSplId,splId);
|
||||
shopProductEntityMPJLambdaWrapper.eq(ShopProductToLabelEntity::getDelFlag,0);
|
||||
shopProductEntityMPJLambdaWrapper.eq(ShopProduct::getDelFlag,0);
|
||||
shopProductEntityMPJLambdaWrapper.gt(ShopProduct::getProductStock,0);
|
||||
Page<ShopProduct> shopProductEntityPage = shopProductToLabelDao.selectJoinPage(new Page<ShopProduct>(page, limit), ShopProduct.class, shopProductEntityMPJLambdaWrapper);
|
||||
|
||||
return R.ok().put("page",shopProductEntityPage);
|
||||
|
||||
@@ -60,7 +60,9 @@ public class ShopProductServiceImpl extends ServiceImpl<ShopProductDao, ShopProd
|
||||
Object name = params.get("name");
|
||||
IPage<ShopProduct> page = this.page(
|
||||
new Query<ShopProduct>().getPage(params),
|
||||
new ExcludeEmptyQueryWrapper<ShopProduct>().like("product_name", params.get("key"))
|
||||
new ExcludeEmptyQueryWrapper<ShopProduct>()
|
||||
.gt("product_stock",0)
|
||||
.like("product_name", params.get("key"))
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user