Authored by wangnan9279

是否是视频商品标志位 fix

... ... @@ -105,11 +105,11 @@ public class GoodsImagesMqListener extends AbstractMqListener {
logger.info("[func=getProductGoodsByProductId][productId={}][cost={}ms]", productId, costStatistics.getCost());
// 2、更新图片的时候检查下是否存在视频
String specialSearchFieldVideo = "";
String isVideo = "N";
String hasVideo = "N";
Set<Integer> hasVideosProductIds = videosBuilder.queryHasVideosProductIds(Arrays.asList(productId));
if (hasVideosProductIds.contains(productId)) {
specialSearchFieldVideo = specialSearchFieldLogicService.getSpecialSearchFieldVideo(true);
isVideo = "Y";
hasVideo = "Y";
}
// 3、更新商品索引
Map<String, Object> indexData = new HashMap<String, Object>();
... ... @@ -117,7 +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.hasVideo, hasVideo);
indexData.put(ProductIndexEsField.cover_1, productGoodsBO.getCover_1());
indexData.put(ProductIndexEsField.cover_2, productGoodsBO.getCover_2());
this.updateProductIndexWithDataMap(indexData, productId);
... ...
... ... @@ -723,7 +723,7 @@
"isZeroHelp": {
"type": "keyword"
},
"isVideo": {
"hasVideo": {
"type": "keyword"
}
}
... ...
... ... @@ -116,7 +116,7 @@ public class ProductIndexBO extends ProductIBO implements Serializable {
// from videos
private String specialSearchFieldVideo;
private String isVideo;
private String hasVideo;
// from product_heat_values
private BigDecimal heatValue;
... ... @@ -169,12 +169,12 @@ public class ProductIndexBO extends ProductIBO implements Serializable {
//from in_storage_time
private Integer inStorageTime;
public String getIsVideo() {
return isVideo;
public String getHasVideo() {
return hasVideo;
}
public void setIsVideo(String isVideo) {
this.isVideo = isVideo;
public void setHasVideo(String hasVideo) {
this.hasVideo = hasVideo;
}
public String getIsCollage() {
... ...
... ... @@ -233,7 +233,7 @@ public class ProductIndexBOToMapService {
map.put(ProductIndexEsField.cutdownPriceOrder, productIndexBO.getCutdownPriceOrder());
map.put(ProductIndexEsField.pools, productIndexBO.getPools());
map.put(ProductIndexEsField.isZeroHelp, productIndexBO.getIsZeroHelp());
map.put(ProductIndexEsField.isVideo, productIndexBO.getIsVideo());
map.put(ProductIndexEsField.hasVideo, productIndexBO.getHasVideo());
return map;
}
... ...
... ... @@ -36,7 +36,7 @@ public class VideosBuilder implements IndexFieldBuilder {
boolean hasVideo = productIdSet.contains(pi.getProductId());
String specialSearchFieldVideo = specialSearchFieldLogicService.getSpecialSearchFieldVideo(hasVideo);
pi.setSpecialSearchFieldVideo(specialSearchFieldVideo);
pi.setIsVideo(hasVideo ? "Y" : "N");
pi.setHasVideo(hasVideo ? "Y" : "N");
}
}
... ...