...
|
...
|
@@ -105,9 +105,11 @@ public class GoodsImagesMqListener extends AbstractMqListener { |
|
|
logger.info("[func=getProductGoodsByProductId][productId={}][cost={}ms]", productId, costStatistics.getCost());
|
|
|
// 2、更新图片的时候检查下是否存在视频
|
|
|
String specialSearchFieldVideo = "";
|
|
|
String isVideo = "N";
|
|
|
Set<Integer> hasVideosProductIds = videosBuilder.queryHasVideosProductIds(Arrays.asList(productId));
|
|
|
if (hasVideosProductIds.contains(productId)) {
|
|
|
specialSearchFieldVideo = specialSearchFieldLogicService.getSpecialSearchFieldVideo(true);
|
|
|
isVideo = "Y";
|
|
|
}
|
|
|
// 3、更新商品索引
|
|
|
Map<String, Object> indexData = new HashMap<String, Object>();
|
...
|
...
|
@@ -115,6 +117,7 @@ public class GoodsImagesMqListener extends AbstractMqListener { |
|
|
indexData.put(ProductIndexEsField.defaultImages, defaultImageUrl);
|
|
|
indexData.put(ProductIndexEsField.goodsList, goodInfoList);
|
|
|
indexData.put(ProductIndexEsField.specialSearchFieldVideo, specialSearchFieldVideo);
|
|
|
indexData.put(ProductIndexEsField.isVideo, isVideo);
|
|
|
indexData.put(ProductIndexEsField.cover_1, productGoodsBO.getCover_1());
|
|
|
indexData.put(ProductIndexEsField.cover_2, productGoodsBO.getCover_2());
|
|
|
this.updateProductIndexWithDataMap(indexData, productId);
|
...
|
...
|
|