...
|
...
|
@@ -21,6 +21,7 @@ import com.alibaba.fastjson.JSONObject; |
|
|
import com.yoho.search.base.utils.ISearchConstants;
|
|
|
import com.yoho.search.core.es.model.SearchParam;
|
|
|
import com.yoho.search.core.es.model.SearchResult;
|
|
|
import com.yoho.search.service.cache.CatchMatchLogger;
|
|
|
import com.yoho.search.service.cache.SearchCacheFactory;
|
|
|
import com.yoho.search.service.cache.model.SearchCache;
|
|
|
import com.yoho.search.service.service.SearchCacheService;
|
...
|
...
|
@@ -32,7 +33,6 @@ import com.yoho.search.service.service.helper.SearchParamHelper; |
|
|
import com.yoho.search.service.service.helper.SearchSortHelper;
|
|
|
import com.yoho.search.service.servicenew.IProductListWithSupplyService;
|
|
|
import com.yoho.search.service.servicenew.ISimilarProductService;
|
|
|
import com.yoho.search.service.utils.HttpServletRequestUtils;
|
|
|
import com.yoho.search.service.utils.SearchApiResultUtils;
|
|
|
import com.yoho.search.service.utils.SearchRequestParams;
|
|
|
import com.yoho.search.service.vo.SearchApiResult;
|
...
|
...
|
@@ -42,8 +42,8 @@ import com.yoho.search.service.vo.SearchApiResult; |
|
|
*/
|
|
|
@Service
|
|
|
public class ProductListWithSupplyServiceImpl implements IProductListWithSupplyService {
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(ProductListWithSupplyServiceImpl.class);
|
|
|
private static Logger CACHE_MATCH_REQUEST = LoggerFactory.getLogger("CACHE_MATCH_REQUEST");
|
|
|
|
|
|
@Autowired
|
|
|
private SearchCommonHelper searchCommonHelper;
|
...
|
...
|
@@ -96,7 +96,7 @@ public class ProductListWithSupplyServiceImpl implements IProductListWithSupplyS |
|
|
final String indexName = ISearchConstants.INDEX_NAME_PRODUCT_INDEX;
|
|
|
JSONObject cacheObject = searchCacheService.getJSONObjectFromCache(productListSearchCache, indexName, searchParam);
|
|
|
if (cacheObject != null) {
|
|
|
CACHE_MATCH_REQUEST.info("match cache , url is :/productindex/productListWithSupply.json?" + HttpServletRequestUtils.genParamString(paramMap));
|
|
|
CatchMatchLogger.doCatchMatchLog("/productindex/productListWithSupply.json", paramMap);
|
|
|
return new SearchApiResult().setData(cacheObject);
|
|
|
}
|
|
|
|
...
|
...
|
|