...
|
...
|
@@ -142,11 +142,12 @@ public class AggRecommendServiceImpl implements IAggRecommendService { |
|
|
return new SearchApiResult().setData(500).setMessage("exception");
|
|
|
}
|
|
|
// 7、生成结果并且加入缓存
|
|
|
cacheJSONArray = recommendShopResult.getJSONArray(recommendShopAgg.aggName());
|
|
|
if (cacheJSONArray != null) {
|
|
|
searchCacheService.addJSONArrayToCache(searchCache, productIndexName, searchParam, cacheJSONArray);
|
|
|
JSONArray recommendShops = recommendShopResult.getJSONArray(recommendShopAgg.aggName());
|
|
|
if (recommendShops != null) {
|
|
|
searchCacheService.addJSONArrayToCache(searchCache, productIndexName, searchParam, recommendShops);
|
|
|
return this.getRecommendShopSearchApiResult(recommendShops, page, count);
|
|
|
}
|
|
|
return this.getRecommendShopSearchApiResult(cacheJSONArray, page, count);
|
|
|
return new SearchApiResult().setData(new ArrayList<Map<String, Object>>());
|
|
|
} catch (Exception e) {
|
|
|
return SearchApiResultUtils.errorSearchApiResult("aggRecommendBrand", paramMap, e);
|
|
|
}
|
...
|
...
|
|