|
@@ -208,6 +208,10 @@ public class SearchIndexServiceImpl implements SearchIndexService {
|
|
|
if (promotionIds != null && promotionIds.size() > 0) {
|
|
|
product.setP_promotions_id(promotionIds.get(0));
|
|
|
}
|
|
|
+ List<Integer> shopPromotionIds = searchMapper.findShopPromotion(product.getP_id());
|
|
|
+ if (shopPromotionIds != null && shopPromotionIds.size() > 0) {
|
|
|
+ product.setP_promotions_id(shopPromotionIds.get(0));
|
|
|
+ }
|
|
|
// product p_promotions_id
|
|
|
if (null != product) {
|
|
|
// 定义星范商品数据
|
|
@@ -1137,6 +1141,10 @@ public class SearchIndexServiceImpl implements SearchIndexService {
|
|
|
if (promotionIds != null && promotionIds.size() > 0) {
|
|
|
product.setP_promotions_id(promotionIds.get(0));
|
|
|
}
|
|
|
+ List<Integer> shopPromotionIds = searchMapper.findShopPromotion(product.getP_id());
|
|
|
+ if (shopPromotionIds != null && shopPromotionIds.size() > 0) {
|
|
|
+ product.setP_promotions_id(shopPromotionIds.get(0));
|
|
|
+ }
|
|
|
productDoc.setCmd("add");
|
|
|
productDoc.setFields(product);
|
|
|
productList.add(productDoc);
|