Authored by 胡古飞

fix

@@ -27,31 +27,31 @@ public class BrandController { @@ -27,31 +27,31 @@ public class BrandController {
27 private IBrandWithShopsService brandWithShopsService; 27 private IBrandWithShopsService brandWithShopsService;
28 28
29 /** 29 /**
30 - * 按品牌前缀名获取品牌列表 30 + * 获取品牌列表[不包含全球购]
31 * 31 *
32 * @param request 32 * @param request
33 * @return 33 * @return
34 */ 34 */
35 - @DownGradeAble(key = "brands")  
36 - @RequestMapping(method = RequestMethod.GET, value = "/brands") 35 + @DownGradeAble(key = "brandList")
  36 + @RequestMapping(method = RequestMethod.GET, value = "/brand/list")
37 @ResponseBody 37 @ResponseBody
38 - public SearchApiResult brands(HttpServletRequest request) { 38 + public SearchApiResult brandList(HttpServletRequest request) {
39 Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request); 39 Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
40 - return brandService.brands(paramMap); 40 + return brandService.brandList(paramMap);
41 } 41 }
42 - 42 +
43 /** 43 /**
44 - * 获取品牌列表 44 + * 按品牌前缀名获取品牌列表
45 * 45 *
46 * @param request 46 * @param request
47 * @return 47 * @return
48 */ 48 */
49 - @DownGradeAble(key = "brandList")  
50 - @RequestMapping(method = RequestMethod.GET, value = "/brand/list") 49 + @DownGradeAble(key = "brands")
  50 + @RequestMapping(method = RequestMethod.GET, value = "/brands")
51 @ResponseBody 51 @ResponseBody
52 - public SearchApiResult brandList(HttpServletRequest request) { 52 + public SearchApiResult brands(HttpServletRequest request) {
53 Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request); 53 Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
54 - return brandService.brandList(paramMap); 54 + return brandService.brands(paramMap);
55 } 55 }
56 56
57 /** 57 /**
@@ -7,7 +7,15 @@ import org.elasticsearch.index.query.BoolQueryBuilder; @@ -7,7 +7,15 @@ import org.elasticsearch.index.query.BoolQueryBuilder;
7 import com.yoho.search.service.vo.SearchApiResult; 7 import com.yoho.search.service.vo.SearchApiResult;
8 8
9 public interface IBrandService { 9 public interface IBrandService {
10 - 10 +
  11 + /**
  12 + * 获取商品列表[直接从brand索引里取全部][不返回全球购品牌]
  13 + *
  14 + * @param paramMap
  15 + * @return
  16 + */
  17 + public SearchApiResult brandList(Map<String, String> paramMap);
  18 +
11 /** 19 /**
12 * 获取品牌的聚合结果[使用本地缓存][按参数决定是否返回全球购品牌] 20 * 获取品牌的聚合结果[使用本地缓存][按参数决定是否返回全球购品牌]
13 * 21 *
@@ -15,14 +23,14 @@ public interface IBrandService { @@ -15,14 +23,14 @@ public interface IBrandService {
15 * @return 23 * @return
16 */ 24 */
17 public SearchApiResult aggBrand(Map<String, String> paramMap); 25 public SearchApiResult aggBrand(Map<String, String> paramMap);
18 - 26 +
19 /** 27 /**
20 * 获取品牌的聚合结果[使用本地缓存][按参数决定是否返回全球购品牌] 28 * 获取品牌的聚合结果[使用本地缓存][按参数决定是否返回全球购品牌]
21 * 29 *
22 * @param paramMap 30 * @param paramMap
23 * @return 31 * @return
24 */ 32 */
25 - public SearchApiResult aggBrand(Map<String, String> paramMap,BoolQueryBuilder mustFilter); 33 + public SearchApiResult aggBrand(Map<String, String> paramMap, BoolQueryBuilder mustFilter);
26 34
27 /** 35 /**
28 * 按品牌前缀名获取品牌列表[按参数决定是否返回全球购品牌] 36 * 按品牌前缀名获取品牌列表[按参数决定是否返回全球购品牌]
@@ -33,33 +41,26 @@ public interface IBrandService { @@ -33,33 +41,26 @@ public interface IBrandService {
33 public SearchApiResult brands(Map<String, String> paramMap); 41 public SearchApiResult brands(Map<String, String> paramMap);
34 42
35 /** 43 /**
36 - * 获取商品列表[直接从brand索引里取全部][不返回全球购品牌] 44 + * 按品牌聚合商品[按参数决定是否返回全球购品牌]
37 * 45 *
38 * @param paramMap 46 * @param paramMap
39 * @return 47 * @return
40 */ 48 */
41 - public SearchApiResult brandList(Map<String, String> paramMap);  
42 - 49 + public SearchApiResult groupBrands(Map<String, String> paramMap);
  50 +
43 /** 51 /**
44 - * 按品牌聚合商品[按参数决定是否返回全球购品牌] 52 + * 聚合不同品牌的最新商品
  53 + *
45 * @param paramMap 54 * @param paramMap
46 * @return 55 * @return
47 */ 56 */
48 - public SearchApiResult groupBrands(Map<String, String> paramMap);  
49 -  
50 - /**  
51 - * 聚合不同品牌的最新商品  
52 - *  
53 - * @param paramMap  
54 - * @return  
55 - */  
56 - public SearchApiResult aggProductsByBrandId(Map<String, String> paramMap); 57 + public SearchApiResult aggProductsByBrandId(Map<String, String> paramMap);
57 58
58 - /**  
59 - * 获取不同品牌的商品列表【按order参数对商品排序】【参数要传brand】  
60 - *  
61 - * @param paramMap  
62 - * @return  
63 - */  
64 - public SearchApiResult aggProductsByBrandIdInParam(Map<String, String> paramMap); 59 + /**
  60 + * 获取不同品牌的商品列表【按order参数对商品排序】【参数要传brand】
  61 + *
  62 + * @param paramMap
  63 + * @return
  64 + */
  65 + public SearchApiResult aggProductsByBrandIdInParam(Map<String, String> paramMap);
65 } 66 }