commit
5d598d9034
@ -382,7 +382,11 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
List<EsGoodsIndex> esGoodsIndices = new ArrayList<>();
|
||||
for (GoodsSku goodsSku : goodsSkuList) {
|
||||
EsGoodsIndex goodsIndex = this.settingUpGoodsIndexData(goods, goodsSku);
|
||||
goodsIndex.setSkuSource(skuSource--);
|
||||
skuSource--;
|
||||
if (skuSource <= 0) {
|
||||
skuSource = 1;
|
||||
}
|
||||
goodsIndex.setSkuSource(skuSource);
|
||||
log.info("goodsSku:{}", goodsSku);
|
||||
log.info("生成商品索引 {}", goodsIndex);
|
||||
esGoodsIndices.add(goodsIndex);
|
||||
|
@ -88,6 +88,9 @@ public class FootprintServiceImpl extends ServiceImpl<FootprintMapper, FootPrint
|
||||
.mapToObj(i -> {
|
||||
if (goodsSkuByIdFromCache.get(i) == null) {
|
||||
EsGoodsIndex esGoodsIndex = new EsGoodsIndex();
|
||||
FootPrint footPrint = footPrintPages.getRecords().get(i);
|
||||
esGoodsIndex.setGoodsId(footPrint.getGoodsId());
|
||||
esGoodsIndex.setId(footPrint.getSkuId());
|
||||
esGoodsIndex.setReleaseTime(footPrintPages.getRecords().get(i).getCreateTime().getTime());
|
||||
return esGoodsIndex;
|
||||
}
|
||||
|
@ -235,6 +235,9 @@ public class EsGoodsIndexServiceImpl extends BaseElasticsearchService implements
|
||||
if (count >= 1) {
|
||||
skuSource -= count;
|
||||
}
|
||||
if (skuSource <= 0) {
|
||||
skuSource = 1;
|
||||
}
|
||||
esGoodsIndex.setSkuSource(skuSource);
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user