Authored by 胡古飞

fix doSearchCacheMatchLog

... ... @@ -91,7 +91,7 @@ public class AggRecommendServiceImpl implements IAggRecommendService {
final String productIndexName = ISearchConstants.INDEX_NAME_PRODUCT_INDEX;
JSONArray cacheJSONArray = searchCacheService.getJSONArrayFromCache(searchCache, productIndexName, searchParam);
if (cacheJSONArray != null) {
SearchCacheMatchLogger.doCatchMatchLog("/productindex/aggRecommendBrand.json", paramMap);
SearchCacheMatchLogger.doSearchCacheMatchLog("/productindex/aggRecommendBrand.json", paramMap);
return new SearchApiResult().setData(cacheJSONArray);
}
// 6、从ES中获取
... ... @@ -133,7 +133,7 @@ public class AggRecommendServiceImpl implements IAggRecommendService {
final String productIndexName = ISearchConstants.INDEX_NAME_PRODUCT_INDEX;
JSONArray cacheJSONArray = searchCacheService.getJSONArrayFromCache(searchCache, productIndexName, searchParam);
if (cacheJSONArray != null) {
SearchCacheMatchLogger.doCatchMatchLog("/productindex/aggRecommendShop.json", paramMap);
SearchCacheMatchLogger.doSearchCacheMatchLog("/productindex/aggRecommendShop.json", paramMap);
return this.getRecommendShopSearchApiResult(cacheJSONArray, page, count);
}
// 6、从ES中获取
... ...
... ... @@ -127,7 +127,7 @@ public class BrandServiceImpl implements IBrandService, ApplicationEventPublishe
final String indexName = ISearchConstants.INDEX_NAME_PRODUCT_INDEX;
JSONArray cacheJSONArray = searchCacheService.getJSONArrayFromCache(brandAndShopSearchCache, indexName, searchParam);
if (cacheJSONArray != null) {
SearchCacheMatchLogger.doCatchMatchLog("/productindex/aggBrand.json", paramMap);
SearchCacheMatchLogger.doSearchCacheMatchLog("/productindex/aggBrand.json", paramMap);
return new SearchApiResult().setData(cacheJSONArray);
}
// 4、从ES中获取
... ... @@ -164,7 +164,7 @@ public class BrandServiceImpl implements IBrandService, ApplicationEventPublishe
final String indexName = ISearchConstants.INDEX_NAME_PRODUCT_INDEX;
JSONObject cacheObject = searchCacheService.getJSONObjectFromCache(brandAndShopSearchCache, indexName, searchParam);
if (cacheObject != null) {
SearchCacheMatchLogger.doCatchMatchLog("/productindex/brands.json", paramMap);
SearchCacheMatchLogger.doSearchCacheMatchLog("/productindex/brands.json", paramMap);
return new SearchApiResult().setData(cacheObject);
}
// 4、查询ES
... ... @@ -248,7 +248,7 @@ public class BrandServiceImpl implements IBrandService, ApplicationEventPublishe
final String brandIndexName = ISearchConstants.INDEX_NAME_BRAND;
JSONArray cacheJSONArray = searchCacheService.getJSONArrayFromCache(brandAndShopSearchCache, brandIndexName, searchParam);
if (cacheJSONArray != null) {
SearchCacheMatchLogger.doCatchMatchLog("/brand/list.json", paramMap);
SearchCacheMatchLogger.doSearchCacheMatchLog("/brand/list.json", paramMap);
return new SearchApiResult().setData(cacheJSONArray);
}
// 3、执行搜索
... ... @@ -299,7 +299,7 @@ public class BrandServiceImpl implements IBrandService, ApplicationEventPublishe
final String productIndexName = ISearchConstants.INDEX_NAME_PRODUCT_INDEX;
JSONObject groupBrandResult = searchCacheService.getJSONObjectFromCache(brandAndShopSearchCache, productIndexName, searchParam);
if (groupBrandResult != null) {
SearchCacheMatchLogger.doCatchMatchLog("/productindex/groupBrands.json", paramMap);
SearchCacheMatchLogger.doSearchCacheMatchLog("/productindex/groupBrands.json", paramMap);
return new SearchApiResult().setData(groupBrandResult);
}
// 6、从ES中获取
... ... @@ -367,7 +367,7 @@ public class BrandServiceImpl implements IBrandService, ApplicationEventPublishe
// 6、先从缓存中获取,如果能取到,则直接返回
JSONArray jsonArray = searchCacheService.getJSONArrayFromCache(brandAndShopSearchCache, ISearchConstants.INDEX_NAME_PRODUCT_INDEX, searchParam);
if (jsonArray != null) {
SearchCacheMatchLogger.doCatchMatchLog("/new-shelve.json", paramMap);
SearchCacheMatchLogger.doSearchCacheMatchLog("/new-shelve.json", paramMap);
return searchApiResult.setData(jsonArray);
}
... ... @@ -460,7 +460,7 @@ public class BrandServiceImpl implements IBrandService, ApplicationEventPublishe
// 7、先从缓存中获取,如果能取到,则直接返回
JSONArray jsonArray = searchCacheService.getJSONArrayFromCache(brandAndShopSearchCache, ISearchConstants.INDEX_NAME_PRODUCT_INDEX, searchParam);
if (jsonArray != null) {
SearchCacheMatchLogger.doCatchMatchLog("/new_product.json", paramMap);
SearchCacheMatchLogger.doSearchCacheMatchLog("/new_product.json", paramMap);
return searchApiResult.setData(jsonArray);
}
... ...
... ... @@ -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) {
SearchCacheMatchLogger.doCatchMatchLog("/productindex/productListWithSupply.json", paramMap);
SearchCacheMatchLogger.doSearchCacheMatchLog("/productindex/productListWithSupply.json", paramMap);
return new SearchApiResult().setData(cacheObject);
}
... ...
... ... @@ -84,7 +84,7 @@ public class RecentServiceImpl implements IRecentService, ApplicationEventPublis
if (cacheObject != null) {
Object result = searchAfterCacheService.dealRecentCacheObject(cacheObject);
searchApiResult.setData(result);
SearchCacheMatchLogger.doCatchMatchLog("/recent.json", paramMap);
SearchCacheMatchLogger.doSearchCacheMatchLog("/recent.json", paramMap);
return searchApiResult;
}
... ...