Authored by wangnan9279

ufo

@@ -2,6 +2,7 @@ package com.yoho.search.service.scene.shopbrand; @@ -2,6 +2,7 @@ package com.yoho.search.service.scene.shopbrand;
2 2
3 import com.alibaba.fastjson.JSONArray; 3 import com.alibaba.fastjson.JSONArray;
4 import com.alibaba.fastjson.JSONObject; 4 import com.alibaba.fastjson.JSONObject;
  5 +import com.yoho.search.aop.cache.SearchCacheAble;
5 import com.yoho.search.base.utils.ISearchConstants; 6 import com.yoho.search.base.utils.ISearchConstants;
6 import com.yoho.search.common.SearchCommonService; 7 import com.yoho.search.common.SearchCommonService;
7 import com.yoho.search.common.SearchRequestParams; 8 import com.yoho.search.common.SearchRequestParams;
@@ -39,7 +40,7 @@ public class UfoAggBrandService { @@ -39,7 +40,7 @@ public class UfoAggBrandService {
39 @Autowired 40 @Autowired
40 private SearchCommonService searchCommonService; 41 private SearchCommonService searchCommonService;
41 42
42 - //@SearchCacheAble(cacheName = "UFO_BRAND_LIST", cacheInMinute = 10) 43 + @SearchCacheAble(cacheName = "UFO_BRAND_LIST", cacheInMinute = 10)
43 public SearchApiResult aggAllBrandList(Map<String, String> paramMap) { 44 public SearchApiResult aggAllBrandList(Map<String, String> paramMap) {
44 try { 45 try {
45 // 1、构造带filter和query的SearchParam 46 // 1、构造带filter和query的SearchParam
1 package com.yoho.search.service.scene.ufo; 1 package com.yoho.search.service.scene.ufo;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
  4 +import com.yoho.search.aop.cache.SearchCacheAble;
4 import com.yoho.search.base.utils.ISearchConstants; 5 import com.yoho.search.base.utils.ISearchConstants;
5 import com.yoho.search.common.SearchCommonService; 6 import com.yoho.search.common.SearchCommonService;
6 import com.yoho.search.core.es.model.SearchParam; 7 import com.yoho.search.core.es.model.SearchParam;
@@ -39,7 +40,7 @@ public class UfoProductListService { @@ -39,7 +40,7 @@ public class UfoProductListService {
39 private static final String RETURN_LIST_NAME = "product_list"; 40 private static final String RETURN_LIST_NAME = "product_list";
40 private static final Integer RECOMMEND_LIMIT = 30; 41 private static final Integer RECOMMEND_LIMIT = 30;
41 42
42 - //@SearchCacheAble(cacheName = "UFO_PRODUCT_LIST", cacheInMinute = 10) 43 + @SearchCacheAble(cacheName = "UFO_PRODUCT_LIST", cacheInMinute = 10)
43 public SearchApiResult productList(Map<String, String> paramMap) { 44 public SearchApiResult productList(Map<String, String> paramMap) {
44 try { 45 try {
45 // 1、参数校验 46 // 1、参数校验
@@ -82,7 +83,7 @@ public class UfoProductListService { @@ -82,7 +83,7 @@ public class UfoProductListService {
82 } 83 }
83 } 84 }
84 85
85 - //@SearchCacheAble(cacheName = "UFO_RECOMMEND_LIST", cacheInMinute = 10) 86 + @SearchCacheAble(cacheName = "UFO_RECOMMEND_LIST", cacheInMinute = 10)
86 public SearchApiResult recommendList(Map<String, String> paramMap) { 87 public SearchApiResult recommendList(Map<String, String> paramMap) {
87 String query = MapUtils.getString(paramMap, "query"); 88 String query = MapUtils.getString(paramMap, "query");
88 Integer brandId = MapUtils.getInteger(paramMap, "brand"); 89 Integer brandId = MapUtils.getInteger(paramMap, "brand");
@@ -2,6 +2,7 @@ package com.yoho.search.service.scene.ufo; @@ -2,6 +2,7 @@ package com.yoho.search.service.scene.ufo;
2 2
3 import com.alibaba.fastjson.JSONArray; 3 import com.alibaba.fastjson.JSONArray;
4 import com.alibaba.fastjson.JSONObject; 4 import com.alibaba.fastjson.JSONObject;
  5 +import com.yoho.search.aop.cache.SearchCacheAble;
5 import com.yoho.search.base.utils.ISearchConstants; 6 import com.yoho.search.base.utils.ISearchConstants;
6 import com.yoho.search.common.SearchCommonService; 7 import com.yoho.search.common.SearchCommonService;
7 import com.yoho.search.common.utils.SearchApiResultUtils; 8 import com.yoho.search.common.utils.SearchApiResultUtils;
@@ -42,7 +43,7 @@ public class UfoSelectionsService { @@ -42,7 +43,7 @@ public class UfoSelectionsService {
42 @Autowired 43 @Autowired
43 private SearchCommonService searchCommonService; 44 private SearchCommonService searchCommonService;
44 45
45 - //@SearchCacheAble(cacheName = "UFO_SELECTIONS_LIST", cacheInMinute = 10) 46 + @SearchCacheAble(cacheName = "UFO_SELECTIONS_LIST", cacheInMinute = 10)
46 public SearchApiResult getSelectionsForApp(Map<String, String> paramMap) { 47 public SearchApiResult getSelectionsForApp(Map<String, String> paramMap) {
47 try { 48 try {
48 // 1)构造searchParam 49 // 1)构造searchParam