fix: 优化生成es索引,只生成库存大于0的商品

This commit is contained in:
misworga831
2023-03-31 16:58:34 +08:00
parent 9f01078fe0
commit 4ebe0d4f43
2 changed files with 3 additions and 0 deletions

View File

@@ -343,6 +343,7 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
searchParams.setGoodsId(goods.getId());
searchParams.setPageNumber(i);
searchParams.setPageSize(BATCH_SIZE);
searchParams.setGeQuantity(0);
IPage<GoodsSku> goodsSkuByPage = this.goodsSkuService.getGoodsSkuByPage(searchParams);
if (goodsSkuByPage == null || goodsSkuByPage.getRecords().isEmpty()) {
break;