Authored by 胡古飞

fix RobotQuestionServiceImpl

@@ -34,6 +34,7 @@ import com.yoho.search.core.es.model.SearchParam; @@ -34,6 +34,7 @@ import com.yoho.search.core.es.model.SearchParam;
34 import com.yoho.search.core.es.model.SearchResult; 34 import com.yoho.search.core.es.model.SearchResult;
35 import com.yoho.search.core.es.utils.IgnoreSomeException; 35 import com.yoho.search.core.es.utils.IgnoreSomeException;
36 import com.yoho.search.service.cache.SearchCacheFactory; 36 import com.yoho.search.service.cache.SearchCacheFactory;
  37 +import com.yoho.search.service.cache.SearchCacheMatchLogger;
37 import com.yoho.search.service.cache.model.SearchCache; 38 import com.yoho.search.service.cache.model.SearchCache;
38 import com.yoho.search.service.service.SearchCacheService; 39 import com.yoho.search.service.service.SearchCacheService;
39 import com.yoho.search.service.service.SearchCommonService; 40 import com.yoho.search.service.service.SearchCommonService;
@@ -50,8 +51,6 @@ public class RobotQuestionServiceImpl extends BaseService implements IRobotQuest @@ -50,8 +51,6 @@ public class RobotQuestionServiceImpl extends BaseService implements IRobotQuest
50 51
51 private static final Logger logger = LoggerFactory.getLogger(RobotQuestionServiceImpl.class); 52 private static final Logger logger = LoggerFactory.getLogger(RobotQuestionServiceImpl.class);
52 53
53 - private static Logger CACHE_MATCH_REQUEST = LoggerFactory.getLogger("CACHE_MATCH_REQUEST");  
54 -  
55 private ApplicationEventPublisher publisher; 54 private ApplicationEventPublisher publisher;
56 55
57 @Autowired 56 @Autowired
@@ -136,7 +135,7 @@ public class RobotQuestionServiceImpl extends BaseService implements IRobotQuest @@ -136,7 +135,7 @@ public class RobotQuestionServiceImpl extends BaseService implements IRobotQuest
136 final String indexName = ISearchConstants.INDEX_NAME_ROBOTQUESTION; 135 final String indexName = ISearchConstants.INDEX_NAME_ROBOTQUESTION;
137 JSONObject cacheObject = searchCacheService.getJSONObjectFromCache(searchCache,indexName, searchParam); 136 JSONObject cacheObject = searchCacheService.getJSONObjectFromCache(searchCache,indexName, searchParam);
138 if (cacheObject != null) { 137 if (cacheObject != null) {
139 - CACHE_MATCH_REQUEST.info("match cache , url is :/robotquestion.json?" + HttpServletRequestUtils.genParamString(paramMap)); 138 + SearchCacheMatchLogger.doSearchCacheMatchLog("/robotquestion.json", paramMap);
140 return new SearchApiResult().setData(cacheObject); 139 return new SearchApiResult().setData(cacheObject);
141 } 140 }
142 141