Authored by 胡古飞

fix TblProductService

... ... @@ -57,7 +57,7 @@ public class TblProductService {
tblSearchCache = searchCacheFactory.getTblSearchCache();
}
private final String TBLPRODUCT_INDEX_NAME = ISearchConstants.INDEX_NAME_TBLPRODUCT;
private static final String TBLPRODUCT_INDEX_NAME = ISearchConstants.INDEX_NAME_TBLPRODUCT;
public Map<String, Object> search(Map<String, String> paramMap) throws ExecutionException {
long begin = System.currentTimeMillis();
... ... @@ -97,7 +97,7 @@ public class TblProductService {
// 增加aggregation
searchParam.setAggregationBuilders(tblProductServiceHepler.buildAggregations(paramMap));
// 先从缓存取,取得到就直接返回
JSONObject result = searchCacheService.getJSONObjectFromCache(tblSearchCache,TBLPRODUCT_INDEX_NAME, searchParam);
JSONObject result = searchCacheService.getJSONObjectFromCache(tblSearchCache, TBLPRODUCT_INDEX_NAME, searchParam);
if (result != null) {
return result;
}
... ... @@ -122,7 +122,7 @@ public class TblProductService {
}
result.put("data", dataMap);
}
searchCacheService.addJSONObjectToCache(tblSearchCache,TBLPRODUCT_INDEX_NAME, searchParam, result);
searchCacheService.addJSONObjectToCache(tblSearchCache, TBLPRODUCT_INDEX_NAME, searchParam, result);
return result;
}
... ...