Authored by wangnan

优化mqlinster代码结构,减少重复代码

Showing 44 changed files with 98 additions and 62 deletions
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.db;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.search.base.utils.ConvertUtils; 5 import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.consumer.dynwords.EsWordDefService; 7 import com.yoho.search.consumer.dynwords.EsWordDefService;
  8 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
8 import com.yoho.search.core.es.utils.IgnoreSomeException; 9 import com.yoho.search.core.es.utils.IgnoreSomeException;
9 import com.yoho.search.dal.model.EsWordDef; 10 import com.yoho.search.dal.model.EsWordDef;
10 import org.apache.commons.lang.StringUtils; 11 import org.apache.commons.lang.StringUtils;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.db;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.search.base.utils.ConvertUtils; 5 import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
  7 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
7 import com.yoho.search.consumer.service.base.PromotionInfoService; 8 import com.yoho.search.consumer.service.base.PromotionInfoService;
8 import com.yoho.search.core.es.utils.IgnoreSomeException; 9 import com.yoho.search.core.es.utils.IgnoreSomeException;
9 import com.yoho.search.dal.model.PromotionInfo; 10 import com.yoho.search.dal.model.PromotionInfo;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.db;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.search.base.utils.ConvertUtils; 5 import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
  7 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
7 import com.yoho.search.consumer.service.base.PromotionParamsService; 8 import com.yoho.search.consumer.service.base.PromotionParamsService;
8 import com.yoho.search.core.es.utils.IgnoreSomeException; 9 import com.yoho.search.core.es.utils.IgnoreSomeException;
9 import com.yoho.search.dal.model.PromotionParams; 10 import com.yoho.search.dal.model.PromotionParams;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.db;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.search.base.utils.ConvertUtils; 5 import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
  7 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
7 import com.yoho.search.consumer.service.base.ScoreRuleService; 8 import com.yoho.search.consumer.service.base.ScoreRuleService;
8 import com.yoho.search.consumer.service.logic.ScoreRuleLogicService; 9 import com.yoho.search.consumer.service.logic.ScoreRuleLogicService;
9 import com.yoho.search.core.es.utils.IgnoreSomeException; 10 import com.yoho.search.core.es.utils.IgnoreSomeException;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.db;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.error.event.SearchLogsEvent; 5 import com.yoho.error.event.SearchLogsEvent;
6 import com.yoho.search.base.utils.ConvertUtils; 6 import com.yoho.search.base.utils.ConvertUtils;
7 import com.yoho.search.base.utils.EventReportEnum; 7 import com.yoho.search.base.utils.EventReportEnum;
  8 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
8 import com.yoho.search.consumer.service.base.StandardService; 9 import com.yoho.search.consumer.service.base.StandardService;
9 import com.yoho.search.core.es.utils.IgnoreSomeException; 10 import com.yoho.search.core.es.utils.IgnoreSomeException;
10 import com.yoho.search.dal.model.Standard; 11 import com.yoho.search.dal.model.Standard;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.otherIndex;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
4 import com.rabbitmq.client.Channel; 4 import com.rabbitmq.client.Channel;
@@ -9,6 +9,7 @@ import com.yoho.search.base.utils.ISearchConstants; @@ -9,6 +9,7 @@ import com.yoho.search.base.utils.ISearchConstants;
9 import com.yoho.search.consumer.index.common.IYohoIndexService; 9 import com.yoho.search.consumer.index.common.IYohoIndexService;
10 import com.yoho.search.consumer.index.fullbuild.ProductIndexIndexBuilder; 10 import com.yoho.search.consumer.index.fullbuild.ProductIndexIndexBuilder;
11 import com.yoho.search.consumer.index.fullbuild.TblProductNewIndexBuilder; 11 import com.yoho.search.consumer.index.fullbuild.TblProductNewIndexBuilder;
  12 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
12 import com.yoho.search.consumer.service.base.BrandService; 13 import com.yoho.search.consumer.service.base.BrandService;
13 import com.yoho.search.core.es.utils.IgnoreSomeException; 14 import com.yoho.search.core.es.utils.IgnoreSomeException;
14 import com.yoho.search.dal.model.Brand; 15 import com.yoho.search.dal.model.Brand;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.otherIndex;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
4 import com.rabbitmq.client.Channel; 4 import com.rabbitmq.client.Channel;
@@ -7,6 +7,7 @@ import com.yoho.search.base.utils.ConvertUtils; @@ -7,6 +7,7 @@ import com.yoho.search.base.utils.ConvertUtils;
7 import com.yoho.search.base.utils.EventReportEnum; 7 import com.yoho.search.base.utils.EventReportEnum;
8 import com.yoho.search.base.utils.ISearchConstants; 8 import com.yoho.search.base.utils.ISearchConstants;
9 import com.yoho.search.consumer.index.common.IYohoIndexService; 9 import com.yoho.search.consumer.index.common.IYohoIndexService;
  10 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
10 import com.yoho.search.consumer.service.base.HelperService; 11 import com.yoho.search.consumer.service.base.HelperService;
11 import com.yoho.search.core.es.model.ESBluk; 12 import com.yoho.search.core.es.model.ESBluk;
12 import com.yoho.search.core.es.utils.IgnoreSomeException; 13 import com.yoho.search.core.es.utils.IgnoreSomeException;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.otherIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -6,6 +6,7 @@ import com.yoho.search.base.utils.ConvertUtils; @@ -6,6 +6,7 @@ import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.base.utils.ISearchConstants; 7 import com.yoho.search.base.utils.ISearchConstants;
8 import com.yoho.search.consumer.index.common.IYohoIndexService; 8 import com.yoho.search.consumer.index.common.IYohoIndexService;
  9 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
9 import com.yoho.search.consumer.service.base.ProductColorService; 10 import com.yoho.search.consumer.service.base.ProductColorService;
10 import com.yoho.search.consumer.service.logic.productIndex.ProductGoodsLogicService; 11 import com.yoho.search.consumer.service.logic.productIndex.ProductGoodsLogicService;
11 import com.yoho.search.core.es.utils.IgnoreSomeException; 12 import com.yoho.search.core.es.utils.IgnoreSomeException;
@@ -40,8 +41,7 @@ public class ProductColorMqListener extends AbstractMqListener implements Channe @@ -40,8 +41,7 @@ public class ProductColorMqListener extends AbstractMqListener implements Channe
40 @Override 41 @Override
41 public void onMessage(Message message, Channel channel) throws Exception { 42 public void onMessage(Message message, Channel channel) throws Exception {
42 try { 43 try {
43 - String indexName = ISearchConstants.INDEX_NAME_PRODUCT_COLOR;  
44 - String idField = ISearchConstants.getKeyField(indexName); 44 + String idField = ISearchConstants.getKeyField(getIndexName());
45 if (StringUtils.isBlank(idField)) { 45 if (StringUtils.isBlank(idField)) {
46 throw new Exception("idField is empty,indexName is " + getIndexName()); 46 throw new Exception("idField is empty,indexName is " + getIndexName());
47 } 47 }
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.otherIndex;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
4 import com.rabbitmq.client.Channel; 4 import com.rabbitmq.client.Channel;
@@ -8,6 +8,7 @@ import com.yoho.search.base.utils.EventReportEnum; @@ -8,6 +8,7 @@ import com.yoho.search.base.utils.EventReportEnum;
8 import com.yoho.search.base.utils.ISearchConstants; 8 import com.yoho.search.base.utils.ISearchConstants;
9 import com.yoho.search.base.utils.PriceUtil; 9 import com.yoho.search.base.utils.PriceUtil;
10 import com.yoho.search.consumer.index.common.IYohoIndexService; 10 import com.yoho.search.consumer.index.common.IYohoIndexService;
  11 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
11 import com.yoho.search.consumer.service.base.ProductPricePlanService; 12 import com.yoho.search.consumer.service.base.ProductPricePlanService;
12 import com.yoho.search.core.es.utils.IgnoreSomeException; 13 import com.yoho.search.core.es.utils.IgnoreSomeException;
13 import com.yoho.search.dal.model.ProductPricePlan; 14 import com.yoho.search.dal.model.ProductPricePlan;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.otherIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -8,6 +8,7 @@ import com.yoho.search.base.utils.ISearchConstants; @@ -8,6 +8,7 @@ import com.yoho.search.base.utils.ISearchConstants;
8 import com.yoho.search.consumer.index.common.IYohoIndexService; 8 import com.yoho.search.consumer.index.common.IYohoIndexService;
9 import com.yoho.search.consumer.index.fullbuild.ProductIndexIndexBuilder; 9 import com.yoho.search.consumer.index.fullbuild.ProductIndexIndexBuilder;
10 import com.yoho.search.consumer.index.fullbuild.TblProductNewIndexBuilder; 10 import com.yoho.search.consumer.index.fullbuild.TblProductNewIndexBuilder;
  11 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
11 import com.yoho.search.consumer.service.base.ProductSortService; 12 import com.yoho.search.consumer.service.base.ProductSortService;
12 import com.yoho.search.core.es.utils.IgnoreSomeException; 13 import com.yoho.search.core.es.utils.IgnoreSomeException;
13 import com.yoho.search.dal.model.ProductSort; 14 import com.yoho.search.dal.model.ProductSort;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.otherIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -6,6 +6,7 @@ import com.yoho.search.base.utils.ConvertUtils; @@ -6,6 +6,7 @@ import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.base.utils.ISearchConstants; 7 import com.yoho.search.base.utils.ISearchConstants;
8 import com.yoho.search.consumer.index.common.IYohoIndexService; 8 import com.yoho.search.consumer.index.common.IYohoIndexService;
  9 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
9 import com.yoho.search.consumer.service.base.RobotQuestionService; 10 import com.yoho.search.consumer.service.base.RobotQuestionService;
10 import com.yoho.search.core.es.utils.IgnoreSomeException; 11 import com.yoho.search.core.es.utils.IgnoreSomeException;
11 import com.yoho.search.dal.model.RobotQuestion; 12 import com.yoho.search.dal.model.RobotQuestion;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.otherIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.search.base.utils.ConvertUtils; 5 import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.base.utils.ISearchConstants; 7 import com.yoho.search.base.utils.ISearchConstants;
  8 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
8 import com.yoho.search.consumer.service.base.ShopsBrandsService; 9 import com.yoho.search.consumer.service.base.ShopsBrandsService;
9 import com.yoho.search.core.es.utils.IgnoreSomeException; 10 import com.yoho.search.core.es.utils.IgnoreSomeException;
10 import com.yoho.search.dal.model.ShopsBrands; 11 import com.yoho.search.dal.model.ShopsBrands;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.otherIndex;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
4 import com.rabbitmq.client.Channel; 4 import com.rabbitmq.client.Channel;
@@ -8,6 +8,7 @@ import com.yoho.search.base.utils.EventReportEnum; @@ -8,6 +8,7 @@ import com.yoho.search.base.utils.EventReportEnum;
8 import com.yoho.search.base.utils.ISearchConstants; 8 import com.yoho.search.base.utils.ISearchConstants;
9 import com.yoho.search.consumer.index.common.IYohoIndexService; 9 import com.yoho.search.consumer.index.common.IYohoIndexService;
10 import com.yoho.search.consumer.index.fullbuild.ProductIndexIndexBuilder; 10 import com.yoho.search.consumer.index.fullbuild.ProductIndexIndexBuilder;
  11 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
11 import com.yoho.search.consumer.service.base.ShopService; 12 import com.yoho.search.consumer.service.base.ShopService;
12 import com.yoho.search.core.es.model.ESBluk; 13 import com.yoho.search.core.es.model.ESBluk;
13 import com.yoho.search.core.es.utils.IgnoreSomeException; 14 import com.yoho.search.core.es.utils.IgnoreSomeException;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.otherIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -7,6 +7,7 @@ import com.yoho.search.base.utils.EventReportEnum; @@ -7,6 +7,7 @@ import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.base.utils.ISearchConstants; 7 import com.yoho.search.base.utils.ISearchConstants;
8 import com.yoho.search.consumer.index.common.IYohoIndexService; 8 import com.yoho.search.consumer.index.common.IYohoIndexService;
9 import com.yoho.search.consumer.index.fullbuild.TblProductNewIndexBuilder; 9 import com.yoho.search.consumer.index.fullbuild.TblProductNewIndexBuilder;
  10 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
10 import com.yoho.search.consumer.service.base.SizeService; 11 import com.yoho.search.consumer.service.base.SizeService;
11 import com.yoho.search.core.es.utils.IgnoreSomeException; 12 import com.yoho.search.core.es.utils.IgnoreSomeException;
12 import com.yoho.search.dal.model.Size; 13 import com.yoho.search.dal.model.Size;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.otherIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -6,6 +6,7 @@ import com.yoho.search.base.utils.ConvertUtils; @@ -6,6 +6,7 @@ import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.base.utils.ISearchConstants; 7 import com.yoho.search.base.utils.ISearchConstants;
8 import com.yoho.search.consumer.index.common.IYohoIndexService; 8 import com.yoho.search.consumer.index.common.IYohoIndexService;
  9 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
9 import com.yoho.search.consumer.service.base.StyleService; 10 import com.yoho.search.consumer.service.base.StyleService;
10 import com.yoho.search.core.es.utils.IgnoreSomeException; 11 import com.yoho.search.core.es.utils.IgnoreSomeException;
11 import com.yoho.search.dal.model.Style; 12 import com.yoho.search.dal.model.Style;
@@ -30,7 +31,7 @@ public class StyleMqListener extends AbstractMqListener implements ChannelAwareM @@ -30,7 +31,7 @@ public class StyleMqListener extends AbstractMqListener implements ChannelAwareM
30 31
31 @Override 32 @Override
32 public String getIndexName() { 33 public String getIndexName() {
33 - return ISearchConstants.INDEX_NAME_PRODUCT_INDEX; 34 + return ISearchConstants.INDEX_NAME_STYLE;
34 } 35 }
35 36
36 @Override 37 @Override
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.otherIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -7,6 +7,7 @@ import com.yoho.search.base.utils.EventReportEnum; @@ -7,6 +7,7 @@ import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.base.utils.ISearchConstants; 7 import com.yoho.search.base.utils.ISearchConstants;
8 import com.yoho.search.base.utils.MD5Util; 8 import com.yoho.search.base.utils.MD5Util;
9 import com.yoho.search.consumer.index.common.IYohoIndexService; 9 import com.yoho.search.consumer.index.common.IYohoIndexService;
  10 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
10 import com.yoho.search.consumer.service.base.SuggestConversionCustomService; 11 import com.yoho.search.consumer.service.base.SuggestConversionCustomService;
11 import com.yoho.search.consumer.service.base.SuggestConversionService; 12 import com.yoho.search.consumer.service.base.SuggestConversionService;
12 import com.yoho.search.consumer.suggests.common.SuggestionConstants; 13 import com.yoho.search.consumer.suggests.common.SuggestionConstants;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.otherIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.search.base.utils.*; 5 import com.yoho.search.base.utils.*;
6 import com.yoho.search.consumer.index.common.IYohoIndexService; 6 import com.yoho.search.consumer.index.common.IYohoIndexService;
  7 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
7 import com.yoho.search.consumer.service.base.SuggestWordCustomService; 8 import com.yoho.search.consumer.service.base.SuggestWordCustomService;
8 import com.yoho.search.consumer.service.base.SuggestWordDefService; 9 import com.yoho.search.consumer.service.base.SuggestWordDefService;
9 import com.yoho.search.consumer.suggests.common.KeywordType; 10 import com.yoho.search.consumer.suggests.common.KeywordType;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.alibaba.fastjson.JSONArray; 3 import com.alibaba.fastjson.JSONArray;
  4 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
4 import com.yoho.search.consumer.service.base.GoodsService; 5 import com.yoho.search.consumer.service.base.GoodsService;
5 import com.yoho.search.consumer.service.bo.ProductGoodsBO; 6 import com.yoho.search.consumer.service.bo.ProductGoodsBO;
6 import com.yoho.search.consumer.service.bo.ProductSizesBO; 7 import com.yoho.search.consumer.service.bo.ProductSizesBO;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.alibaba.fastjson.JSONArray; 3 import com.alibaba.fastjson.JSONArray;
4 import com.rabbitmq.client.Channel; 4 import com.rabbitmq.client.Channel;
@@ -6,6 +6,7 @@ import com.yoho.error.event.SearchEvent; @@ -6,6 +6,7 @@ import com.yoho.error.event.SearchEvent;
6 import com.yoho.search.base.utils.ConvertUtils; 6 import com.yoho.search.base.utils.ConvertUtils;
7 import com.yoho.search.base.utils.EventReportEnum; 7 import com.yoho.search.base.utils.EventReportEnum;
8 import com.yoho.search.base.utils.ISearchConstants; 8 import com.yoho.search.base.utils.ISearchConstants;
  9 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
9 import com.yoho.search.consumer.service.base.ActivityProductService; 10 import com.yoho.search.consumer.service.base.ActivityProductService;
10 import com.yoho.search.consumer.service.base.ProductService; 11 import com.yoho.search.consumer.service.base.ProductService;
11 import com.yoho.search.core.es.utils.IgnoreSomeException; 12 import com.yoho.search.core.es.utils.IgnoreSomeException;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.alibaba.fastjson.JSONArray; 3 import com.alibaba.fastjson.JSONArray;
4 import com.rabbitmq.client.Channel; 4 import com.rabbitmq.client.Channel;
@@ -7,6 +7,7 @@ import com.yoho.search.base.utils.ConvertUtils; @@ -7,6 +7,7 @@ import com.yoho.search.base.utils.ConvertUtils;
7 import com.yoho.search.base.utils.EventReportEnum; 7 import com.yoho.search.base.utils.EventReportEnum;
8 import com.yoho.search.base.utils.ISearchConstants; 8 import com.yoho.search.base.utils.ISearchConstants;
9 import com.yoho.search.consumer.common.CostStatistics; 9 import com.yoho.search.consumer.common.CostStatistics;
  10 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
10 import com.yoho.search.consumer.service.base.GoodsImagesService; 11 import com.yoho.search.consumer.service.base.GoodsImagesService;
11 import com.yoho.search.consumer.service.base.GoodsService; 12 import com.yoho.search.consumer.service.base.GoodsService;
12 import com.yoho.search.consumer.service.bo.ProductGoodsBO; 13 import com.yoho.search.consumer.service.bo.ProductGoodsBO;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.error.event.SearchLogsEvent; 5 import com.yoho.error.event.SearchLogsEvent;
6 import com.yoho.search.base.utils.ConvertUtils; 6 import com.yoho.search.base.utils.ConvertUtils;
7 import com.yoho.search.base.utils.EventReportEnum; 7 import com.yoho.search.base.utils.EventReportEnum;
  8 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
8 import com.yoho.search.consumer.service.base.ParameterMakeService; 9 import com.yoho.search.consumer.service.base.ParameterMakeService;
9 import com.yoho.search.core.es.utils.IgnoreSomeException; 10 import com.yoho.search.core.es.utils.IgnoreSomeException;
10 import com.yoho.search.dal.model.ParameterMake; 11 import com.yoho.search.dal.model.ParameterMake;
@@ -35,7 +36,6 @@ public class ParameterMakeMqListener extends AbstractMqListener implements Chann @@ -35,7 +36,6 @@ public class ParameterMakeMqListener extends AbstractMqListener implements Chann
35 publisher.publishEvent(new SearchLogsEvent("MqListener", EventReportEnum.PARAMETERMAKEMQLISTENER_ONMESSAGE.getMoudleName(), "monitor",nowTimeMillis+"")); 36 publisher.publishEvent(new SearchLogsEvent("MqListener", EventReportEnum.PARAMETERMAKEMQLISTENER_ONMESSAGE.getMoudleName(), "monitor",nowTimeMillis+""));
36 // 记录上报的日志 37 // 记录上报的日志
37 SEARCH_EVENT_LOG.info("report to influxDb,currentTimeMillis is [{}],EventName is [{}] ,MoudleName is [{}]",nowTimeMillis, "MqListener", "consumer"); 38 SEARCH_EVENT_LOG.info("report to influxDb,currentTimeMillis is [{}],EventName is [{}] ,MoudleName is [{}]",nowTimeMillis, "MqListener", "consumer");
38 - printIncreaseMark();  
39 } catch (Exception e) { 39 } catch (Exception e) {
40 publisher.publishEvent(new SearchEvent(EventReportEnum.PARAMETERMAKEMQLISTENER_ONMESSAGE.getEventName(), 40 publisher.publishEvent(new SearchEvent(EventReportEnum.PARAMETERMAKEMQLISTENER_ONMESSAGE.getEventName(),
41 EventReportEnum.PARAMETERMAKEMQLISTENER_ONMESSAGE.getFunctionName(), 41 EventReportEnum.PARAMETERMAKEMQLISTENER_ONMESSAGE.getFunctionName(),
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -7,6 +7,7 @@ import com.yoho.search.base.utils.ConvertUtils; @@ -7,6 +7,7 @@ import com.yoho.search.base.utils.ConvertUtils;
7 import com.yoho.search.base.utils.EventReportEnum; 7 import com.yoho.search.base.utils.EventReportEnum;
8 import com.yoho.search.base.utils.ISearchConstants; 8 import com.yoho.search.base.utils.ISearchConstants;
9 import com.yoho.search.consumer.common.CostStatistics; 9 import com.yoho.search.consumer.common.CostStatistics;
  10 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
10 import com.yoho.search.consumer.service.base.ProductActivitiesLinkService; 11 import com.yoho.search.consumer.service.base.ProductActivitiesLinkService;
11 import com.yoho.search.consumer.service.base.ProductService; 12 import com.yoho.search.consumer.service.base.ProductService;
12 import com.yoho.search.core.es.utils.IgnoreSomeException; 13 import com.yoho.search.core.es.utils.IgnoreSomeException;
@@ -47,7 +48,6 @@ public class ProductActivitiesLinkMqListener extends AbstractMqListener implemen @@ -47,7 +48,6 @@ public class ProductActivitiesLinkMqListener extends AbstractMqListener implemen
47 publisher.publishEvent(new SearchLogsEvent("MqListener", EventReportEnum.PRODUCTACTIVITIESLINKMQLISTENER_ONMESSAGE.getMoudleName(), "monitor", nowTimeMillis + "")); 48 publisher.publishEvent(new SearchLogsEvent("MqListener", EventReportEnum.PRODUCTACTIVITIESLINKMQLISTENER_ONMESSAGE.getMoudleName(), "monitor", nowTimeMillis + ""));
48 // 记录上报的日志 49 // 记录上报的日志
49 SEARCH_EVENT_LOG.info("report to influxDb,currentTimeMillis is [{}],EventName is [{}] ,MoudleName is [{}]", nowTimeMillis, "MqListener", "consumer"); 50 SEARCH_EVENT_LOG.info("report to influxDb,currentTimeMillis is [{}],EventName is [{}] ,MoudleName is [{}]", nowTimeMillis, "MqListener", "consumer");
50 - printIncreaseMark();  
51 } catch (Exception e) { 51 } catch (Exception e) {
52 publisher.publishEvent(new SearchEvent(EventReportEnum.PRODUCTACTIVITIESLINKMQLISTENER_ONMESSAGE.getEventName(), 52 publisher.publishEvent(new SearchEvent(EventReportEnum.PRODUCTACTIVITIESLINKMQLISTENER_ONMESSAGE.getEventName(),
53 EventReportEnum.PRODUCTACTIVITIESLINKMQLISTENER_ONMESSAGE.getFunctionName(), EventReportEnum.PRODUCTACTIVITIESLINKMQLISTENER_ONMESSAGE.getMoudleName(), 53 EventReportEnum.PRODUCTACTIVITIESLINKMQLISTENER_ONMESSAGE.getFunctionName(), EventReportEnum.PRODUCTACTIVITIESLINKMQLISTENER_ONMESSAGE.getMoudleName(),
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.search.base.utils.ConvertUtils; 5 import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
  7 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
7 import com.yoho.search.consumer.service.base.ProductAttributeService; 8 import com.yoho.search.consumer.service.base.ProductAttributeService;
8 import com.yoho.search.core.es.utils.IgnoreSomeException; 9 import com.yoho.search.core.es.utils.IgnoreSomeException;
9 import com.yoho.search.dal.model.ProductAttribute; 10 import com.yoho.search.dal.model.ProductAttribute;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -6,6 +6,7 @@ import com.yoho.search.base.utils.ConvertUtils; @@ -6,6 +6,7 @@ import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.base.utils.ISearchConstants; 7 import com.yoho.search.base.utils.ISearchConstants;
8 import com.yoho.search.consumer.index.common.IYohoIndexService; 8 import com.yoho.search.consumer.index.common.IYohoIndexService;
  9 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
9 import com.yoho.search.consumer.service.base.ProductAttributeService; 10 import com.yoho.search.consumer.service.base.ProductAttributeService;
10 import com.yoho.search.consumer.service.base.ProductService; 11 import com.yoho.search.consumer.service.base.ProductService;
11 import com.yoho.search.core.es.utils.IgnoreSomeException; 12 import com.yoho.search.core.es.utils.IgnoreSomeException;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -6,6 +6,7 @@ import com.yoho.search.base.utils.ConvertUtils; @@ -6,6 +6,7 @@ import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.base.utils.ISearchConstants; 7 import com.yoho.search.base.utils.ISearchConstants;
8 import com.yoho.search.consumer.index.common.IYohoIndexService; 8 import com.yoho.search.consumer.index.common.IYohoIndexService;
  9 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
9 import com.yoho.search.consumer.service.base.ProductExtService; 10 import com.yoho.search.consumer.service.base.ProductExtService;
10 import com.yoho.search.consumer.service.base.ProductService; 11 import com.yoho.search.consumer.service.base.ProductService;
11 import com.yoho.search.core.es.utils.IgnoreSomeException; 12 import com.yoho.search.core.es.utils.IgnoreSomeException;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
4 import com.rabbitmq.client.Channel; 4 import com.rabbitmq.client.Channel;
@@ -7,6 +7,7 @@ import com.yoho.search.base.utils.EventReportEnum; @@ -7,6 +7,7 @@ import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.base.utils.ISearchConstants; 7 import com.yoho.search.base.utils.ISearchConstants;
8 import com.yoho.search.consumer.index.common.IYohoIndexService; 8 import com.yoho.search.consumer.index.common.IYohoIndexService;
9 import com.yoho.search.consumer.index.fullbuild.ProductIndexIndexBuilder; 9 import com.yoho.search.consumer.index.fullbuild.ProductIndexIndexBuilder;
  10 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
10 import com.yoho.search.consumer.service.base.ProductIndexService; 11 import com.yoho.search.consumer.service.base.ProductIndexService;
11 import com.yoho.search.consumer.service.bo.ProductIndexBO; 12 import com.yoho.search.consumer.service.bo.ProductIndexBO;
12 import com.yoho.search.core.es.utils.IgnoreSomeException; 13 import com.yoho.search.core.es.utils.IgnoreSomeException;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.search.base.utils.ConvertUtils; 5 import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.base.utils.ISearchConstants; 7 import com.yoho.search.base.utils.ISearchConstants;
  8 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
8 import com.yoho.search.consumer.service.base.ProductKeywordsService; 9 import com.yoho.search.consumer.service.base.ProductKeywordsService;
9 import com.yoho.search.core.es.utils.IgnoreSomeException; 10 import com.yoho.search.core.es.utils.IgnoreSomeException;
10 import com.yoho.search.dal.model.ProductKeywords; 11 import com.yoho.search.dal.model.ProductKeywords;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.alibaba.fastjson.JSON; 3 import com.alibaba.fastjson.JSON;
4 import com.alibaba.fastjson.JSONObject; 4 import com.alibaba.fastjson.JSONObject;
@@ -11,6 +11,7 @@ import com.yoho.search.consumer.common.CostStatistics; @@ -11,6 +11,7 @@ import com.yoho.search.consumer.common.CostStatistics;
11 import com.yoho.search.consumer.common.PerformanceMonitor; 11 import com.yoho.search.consumer.common.PerformanceMonitor;
12 import com.yoho.search.consumer.index.common.IYohoIndexService; 12 import com.yoho.search.consumer.index.common.IYohoIndexService;
13 import com.yoho.search.consumer.index.fullbuild.ProductIndexIndexBuilder; 13 import com.yoho.search.consumer.index.fullbuild.ProductIndexIndexBuilder;
  14 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
14 import com.yoho.search.consumer.service.base.ProductPriceService; 15 import com.yoho.search.consumer.service.base.ProductPriceService;
15 import com.yoho.search.consumer.service.base.ProductService; 16 import com.yoho.search.consumer.service.base.ProductService;
16 import com.yoho.search.consumer.service.bo.ProductIBO; 17 import com.yoho.search.consumer.service.bo.ProductIBO;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.alibaba.fastjson.JSONArray; 3 import com.alibaba.fastjson.JSONArray;
4 import com.alibaba.fastjson.JSONObject; 4 import com.alibaba.fastjson.JSONObject;
@@ -8,6 +8,7 @@ import com.yoho.search.base.utils.ConvertUtils; @@ -8,6 +8,7 @@ import com.yoho.search.base.utils.ConvertUtils;
8 import com.yoho.search.base.utils.EventReportEnum; 8 import com.yoho.search.base.utils.EventReportEnum;
9 import com.yoho.search.base.utils.ISearchConstants; 9 import com.yoho.search.base.utils.ISearchConstants;
10 import com.yoho.search.consumer.common.CostStatistics; 10 import com.yoho.search.consumer.common.CostStatistics;
  11 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
11 import com.yoho.search.consumer.service.base.ProductPoolDetailService; 12 import com.yoho.search.consumer.service.base.ProductPoolDetailService;
12 import com.yoho.search.consumer.service.base.ProductService; 13 import com.yoho.search.consumer.service.base.ProductService;
13 import com.yoho.search.core.es.utils.IgnoreSomeException; 14 import com.yoho.search.core.es.utils.IgnoreSomeException;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.search.base.utils.ConvertUtils; 5 import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.base.utils.ISearchConstants; 7 import com.yoho.search.base.utils.ISearchConstants;
  8 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
8 import com.yoho.search.consumer.service.base.ProductPriceService; 9 import com.yoho.search.consumer.service.base.ProductPriceService;
9 import com.yoho.search.consumer.service.base.ProductService; 10 import com.yoho.search.consumer.service.base.ProductService;
10 import com.yoho.search.consumer.service.bo.ProductPriceBO; 11 import com.yoho.search.consumer.service.bo.ProductPriceBO;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.search.base.utils.ConvertUtils; 5 import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.base.utils.ISearchConstants; 7 import com.yoho.search.base.utils.ISearchConstants;
8 -import com.yoho.search.consumer.index.common.IYohoIndexService; 8 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
9 import com.yoho.search.consumer.service.base.ProductSearchService; 9 import com.yoho.search.consumer.service.base.ProductSearchService;
10 import com.yoho.search.consumer.service.base.ProductService; 10 import com.yoho.search.consumer.service.base.ProductService;
11 import com.yoho.search.core.es.utils.IgnoreSomeException; 11 import com.yoho.search.core.es.utils.IgnoreSomeException;
@@ -28,8 +28,6 @@ public class ProductSearchMqListener extends AbstractMqListener implements Chann @@ -28,8 +28,6 @@ public class ProductSearchMqListener extends AbstractMqListener implements Chann
28 @Autowired 28 @Autowired
29 private ProductSearchService productSearchService; 29 private ProductSearchService productSearchService;
30 @Autowired 30 @Autowired
31 - private IYohoIndexService indexService;  
32 - @Autowired  
33 private ProductService productService; 31 private ProductService productService;
34 32
35 @Override 33 @Override
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
4 import com.rabbitmq.client.Channel; 4 import com.rabbitmq.client.Channel;
@@ -6,6 +6,7 @@ import com.yoho.error.event.SearchEvent; @@ -6,6 +6,7 @@ import com.yoho.error.event.SearchEvent;
6 import com.yoho.search.base.utils.ConvertUtils; 6 import com.yoho.search.base.utils.ConvertUtils;
7 import com.yoho.search.base.utils.EventReportEnum; 7 import com.yoho.search.base.utils.EventReportEnum;
8 import com.yoho.search.base.utils.ISearchConstants; 8 import com.yoho.search.base.utils.ISearchConstants;
  9 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
9 import com.yoho.search.consumer.service.base.ProductStandardRelationService; 10 import com.yoho.search.consumer.service.base.ProductStandardRelationService;
10 import com.yoho.search.core.es.utils.IgnoreSomeException; 11 import com.yoho.search.core.es.utils.IgnoreSomeException;
11 import com.yoho.search.dal.model.ProductStandardRelation; 12 import com.yoho.search.dal.model.ProductStandardRelation;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.search.base.utils.ConvertUtils; 5 import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
7 import com.yoho.search.base.utils.ISearchConstants; 7 import com.yoho.search.base.utils.ISearchConstants;
  8 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
8 import com.yoho.search.consumer.service.base.ProductStyleRelationService; 9 import com.yoho.search.consumer.service.base.ProductStyleRelationService;
9 import com.yoho.search.core.es.utils.IgnoreSomeException; 10 import com.yoho.search.core.es.utils.IgnoreSomeException;
10 import com.yoho.search.dal.model.ProductStyleRelation; 11 import com.yoho.search.dal.model.ProductStyleRelation;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -6,6 +6,7 @@ import com.yoho.error.event.SearchLogsEvent; @@ -6,6 +6,7 @@ import com.yoho.error.event.SearchLogsEvent;
6 import com.yoho.search.base.utils.ConvertUtils; 6 import com.yoho.search.base.utils.ConvertUtils;
7 import com.yoho.search.base.utils.EventReportEnum; 7 import com.yoho.search.base.utils.EventReportEnum;
8 import com.yoho.search.base.utils.ISearchConstants; 8 import com.yoho.search.base.utils.ISearchConstants;
  9 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
9 import com.yoho.search.consumer.service.base.ProductService; 10 import com.yoho.search.consumer.service.base.ProductService;
10 import com.yoho.search.consumer.service.base.ProductTimingService; 11 import com.yoho.search.consumer.service.base.ProductTimingService;
11 import com.yoho.search.consumer.service.logic.productIndex.StorageUpdateTimeLogicService; 12 import com.yoho.search.consumer.service.logic.productIndex.StorageUpdateTimeLogicService;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.search.base.utils.ConvertUtils; 5 import com.yoho.search.base.utils.ConvertUtils;
6 import com.yoho.search.base.utils.EventReportEnum; 6 import com.yoho.search.base.utils.EventReportEnum;
  7 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
  8 +import com.yoho.search.consumer.index.increment.otherIndex.RobotQuestionMqListener;
7 import com.yoho.search.consumer.service.logic.SalesCategoryLogicService; 9 import com.yoho.search.consumer.service.logic.SalesCategoryLogicService;
8 import com.yoho.search.core.es.utils.IgnoreSomeException; 10 import com.yoho.search.core.es.utils.IgnoreSomeException;
9 import com.yoho.search.dal.model.SalesCategory; 11 import com.yoho.search.dal.model.SalesCategory;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.productIndex;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.tbl;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -8,6 +8,7 @@ import com.yoho.search.base.utils.EventReportEnum; @@ -8,6 +8,7 @@ import com.yoho.search.base.utils.EventReportEnum;
8 import com.yoho.search.base.utils.ISearchConstants; 8 import com.yoho.search.base.utils.ISearchConstants;
9 import com.yoho.search.consumer.index.common.IYohoIndexService; 9 import com.yoho.search.consumer.index.common.IYohoIndexService;
10 import com.yoho.search.consumer.index.fullbuild.TblProductNewIndexBuilder; 10 import com.yoho.search.consumer.index.fullbuild.TblProductNewIndexBuilder;
  11 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
11 import com.yoho.search.consumer.service.base.TblBrandService; 12 import com.yoho.search.consumer.service.base.TblBrandService;
12 import com.yoho.search.core.es.model.ESBluk; 13 import com.yoho.search.core.es.model.ESBluk;
13 import com.yoho.search.core.es.utils.IgnoreSomeException; 14 import com.yoho.search.core.es.utils.IgnoreSomeException;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.tbl;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -6,6 +6,7 @@ import com.yoho.error.event.SearchLogsEvent; @@ -6,6 +6,7 @@ import com.yoho.error.event.SearchLogsEvent;
6 import com.yoho.search.base.utils.ConvertUtils; 6 import com.yoho.search.base.utils.ConvertUtils;
7 import com.yoho.search.base.utils.EventReportEnum; 7 import com.yoho.search.base.utils.EventReportEnum;
8 import com.yoho.search.base.utils.ISearchConstants; 8 import com.yoho.search.base.utils.ISearchConstants;
  9 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
9 import com.yoho.search.consumer.index.increment.bulks.GlobalndexBulkService; 10 import com.yoho.search.consumer.index.increment.bulks.GlobalndexBulkService;
10 import com.yoho.search.consumer.service.base.TblProductService; 11 import com.yoho.search.consumer.service.base.TblProductService;
11 import com.yoho.search.core.es.utils.IgnoreSomeException; 12 import com.yoho.search.core.es.utils.IgnoreSomeException;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.tbl;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -6,6 +6,7 @@ import com.yoho.error.event.SearchLogsEvent; @@ -6,6 +6,7 @@ import com.yoho.error.event.SearchLogsEvent;
6 import com.yoho.search.base.utils.ConvertUtils; 6 import com.yoho.search.base.utils.ConvertUtils;
7 import com.yoho.search.base.utils.EventReportEnum; 7 import com.yoho.search.base.utils.EventReportEnum;
8 import com.yoho.search.base.utils.ISearchConstants; 8 import com.yoho.search.base.utils.ISearchConstants;
  9 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
9 import com.yoho.search.consumer.index.increment.bulks.GlobalndexBulkService; 10 import com.yoho.search.consumer.index.increment.bulks.GlobalndexBulkService;
10 import com.yoho.search.consumer.service.base.TblProductSkcService; 11 import com.yoho.search.consumer.service.base.TblProductSkcService;
11 import com.yoho.search.core.es.utils.IgnoreSomeException; 12 import com.yoho.search.core.es.utils.IgnoreSomeException;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.tbl;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -6,6 +6,7 @@ import com.yoho.error.event.SearchLogsEvent; @@ -6,6 +6,7 @@ import com.yoho.error.event.SearchLogsEvent;
6 import com.yoho.search.base.utils.ConvertUtils; 6 import com.yoho.search.base.utils.ConvertUtils;
7 import com.yoho.search.base.utils.EventReportEnum; 7 import com.yoho.search.base.utils.EventReportEnum;
8 import com.yoho.search.base.utils.ISearchConstants; 8 import com.yoho.search.base.utils.ISearchConstants;
  9 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
9 import com.yoho.search.consumer.index.increment.bulks.GlobalndexBulkService; 10 import com.yoho.search.consumer.index.increment.bulks.GlobalndexBulkService;
10 import com.yoho.search.consumer.service.base.TblProductSkuService; 11 import com.yoho.search.consumer.service.base.TblProductSkuService;
11 import com.yoho.search.core.es.utils.IgnoreSomeException; 12 import com.yoho.search.core.es.utils.IgnoreSomeException;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.tbl;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
@@ -7,6 +7,7 @@ import com.yoho.search.base.utils.ConvertUtils; @@ -7,6 +7,7 @@ import com.yoho.search.base.utils.ConvertUtils;
7 import com.yoho.search.base.utils.EventReportEnum; 7 import com.yoho.search.base.utils.EventReportEnum;
8 import com.yoho.search.base.utils.ISearchConstants; 8 import com.yoho.search.base.utils.ISearchConstants;
9 import com.yoho.search.consumer.index.fullbuild.TblProductNewIndexBuilder; 9 import com.yoho.search.consumer.index.fullbuild.TblProductNewIndexBuilder;
  10 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
10 import com.yoho.search.consumer.index.increment.bulks.GlobalndexBulkService; 11 import com.yoho.search.consumer.index.increment.bulks.GlobalndexBulkService;
11 import com.yoho.search.consumer.service.base.TblProductService; 12 import com.yoho.search.consumer.service.base.TblProductService;
12 import com.yoho.search.consumer.service.base.TblSiteService; 13 import com.yoho.search.consumer.service.base.TblSiteService;
1 -package com.yoho.search.consumer.index.increment; 1 +package com.yoho.search.consumer.index.increment.tbl;
2 2
3 import com.rabbitmq.client.Channel; 3 import com.rabbitmq.client.Channel;
4 import com.yoho.error.event.SearchEvent; 4 import com.yoho.error.event.SearchEvent;
5 import com.yoho.error.event.SearchLogsEvent; 5 import com.yoho.error.event.SearchLogsEvent;
6 import com.yoho.search.base.utils.ConvertUtils; 6 import com.yoho.search.base.utils.ConvertUtils;
7 import com.yoho.search.base.utils.EventReportEnum; 7 import com.yoho.search.base.utils.EventReportEnum;
  8 +import com.yoho.search.consumer.index.increment.AbstractMqListener;
8 import com.yoho.search.consumer.service.base.TblSortService; 9 import com.yoho.search.consumer.service.base.TblSortService;
9 import com.yoho.search.core.es.utils.IgnoreSomeException; 10 import com.yoho.search.core.es.utils.IgnoreSomeException;
10 import com.yoho.search.dal.model.TblSort; 11 import com.yoho.search.dal.model.TblSort;
@@ -95,17 +95,17 @@ @@ -95,17 +95,17 @@
95 <property name="WaitForTasksToCompleteOnShutdown" value="false" /> 95 <property name="WaitForTasksToCompleteOnShutdown" value="false" />
96 </bean> 96 </bean>
97 97
98 - <bean id="productMqListener0" class="com.yoho.search.consumer.index.increment.ProductMqListener"></bean>  
99 - <bean id="productMqListener1" class="com.yoho.search.consumer.index.increment.ProductMqListener"></bean>  
100 - <bean id="productMqListener2" class="com.yoho.search.consumer.index.increment.ProductMqListener"></bean>  
101 - <bean id="productMqListener3" class="com.yoho.search.consumer.index.increment.ProductMqListener"></bean>  
102 - <bean id="productMqListener4" class="com.yoho.search.consumer.index.increment.ProductMqListener"></bean>  
103 -  
104 - <bean id="productPriceMqListener0" class="com.yoho.search.consumer.index.increment.ProductPriceMqListener"></bean>  
105 - <bean id="productPriceMqListener1" class="com.yoho.search.consumer.index.increment.ProductPriceMqListener"></bean>  
106 - <bean id="productPriceMqListener2" class="com.yoho.search.consumer.index.increment.ProductPriceMqListener"></bean>  
107 - <bean id="productPriceMqListener3" class="com.yoho.search.consumer.index.increment.ProductPriceMqListener"></bean>  
108 - <bean id="productPriceMqListener4" class="com.yoho.search.consumer.index.increment.ProductPriceMqListener"></bean> 98 + <bean id="productMqListener0" class="com.yoho.search.consumer.index.increment.productIndex.ProductMqListener"></bean>
  99 + <bean id="productMqListener1" class="com.yoho.search.consumer.index.increment.productIndex.ProductMqListener"></bean>
  100 + <bean id="productMqListener2" class="com.yoho.search.consumer.index.increment.productIndex.ProductMqListener"></bean>
  101 + <bean id="productMqListener3" class="com.yoho.search.consumer.index.increment.productIndex.ProductMqListener"></bean>
  102 + <bean id="productMqListener4" class="com.yoho.search.consumer.index.increment.productIndex.ProductMqListener"></bean>
  103 +
  104 + <bean id="productPriceMqListener0" class="com.yoho.search.consumer.index.increment.productIndex.ProductPriceMqListener"></bean>
  105 + <bean id="productPriceMqListener1" class="com.yoho.search.consumer.index.increment.productIndex.ProductPriceMqListener"></bean>
  106 + <bean id="productPriceMqListener2" class="com.yoho.search.consumer.index.increment.productIndex.ProductPriceMqListener"></bean>
  107 + <bean id="productPriceMqListener3" class="com.yoho.search.consumer.index.increment.productIndex.ProductPriceMqListener"></bean>
  108 + <bean id="productPriceMqListener4" class="com.yoho.search.consumer.index.increment.productIndex.ProductPriceMqListener"></bean>
109 109
110 <rabbit:listener-container connection-factory="connectionFactory" task-executor="taskExecutor" concurrency="1"> 110 <rabbit:listener-container connection-factory="connectionFactory" task-executor="taskExecutor" concurrency="1">
111 <rabbit:listener queue-names="data_update_channel_esworddef" ref="esWordDefMqListener" /> 111 <rabbit:listener queue-names="data_update_channel_esworddef" ref="esWordDefMqListener" />