Authored by LUOXC

Merge branch 'master' into test6.9.1

@@ -203,10 +203,11 @@ public class ProductSearchController { @@ -203,10 +203,11 @@ public class ProductSearchController {
203 @IgnoreSession 203 @IgnoreSession
204 @Cachable(expire = 180) 204 @Cachable(expire = 180)
205 public ApiResponse searchUvscoreProductList( 205 public ApiResponse searchUvscoreProductList(
  206 + @RequestParam(value = "rankType", required = false, defaultValue = "a") String rankType,
206 @RequestParam(value = "limit", required = false)Integer limit, 207 @RequestParam(value = "limit", required = false)Integer limit,
207 @RequestParam(value = "page", required = false)Integer page) { 208 @RequestParam(value = "page", required = false)Integer page) {
208 209
209 - ProductSearchReq req = new ProductSearchReq().setViewNum(limit).setPage(page); 210 + ProductSearchReq req = new ProductSearchReq().setViewNum(limit).setPage(page).setRankType(rankType);
210 LOG.info("in method=ufo.product.search.uvscoreProductList req={}", req.toString()); 211 LOG.info("in method=ufo.product.search.uvscoreProductList req={}", req.toString());
211 212
212 JSONObject resp = productSearchService.searchUvscoreProductList(req); 213 JSONObject resp = productSearchService.searchUvscoreProductList(req);
@@ -92,6 +92,8 @@ public final class SearchConstants { @@ -92,6 +92,8 @@ public final class SearchConstants {
92 92
93 String CONTAIN_YOHO = "contain_yoho"; 93 String CONTAIN_YOHO = "contain_yoho";
94 94
  95 + String RANK_TYPE = "rankType";
  96 +
95 } 97 }
96 98
97 } 99 }
@@ -54,7 +54,8 @@ public class SearchParam { @@ -54,7 +54,8 @@ public class SearchParam {
54 .setBrandSeries(req.getSeries()).setGender(req.getGender()).setFilterYearMonth(req.getFilterYearMonth()) 54 .setBrandSeries(req.getSeries()).setGender(req.getGender()).setFilterYearMonth(req.getFilterYearMonth())
55 .setStartTime(req.getStartTime()) 55 .setStartTime(req.getStartTime())
56 .setEndTime(req.getEndTime()) 56 .setEndTime(req.getEndTime())
57 - .setContainYoho(req.getContainYoho()); 57 + .setContainYoho(req.getContainYoho())
  58 + .setRankType(req.getRankType());
58 return this; 59 return this;
59 } 60 }
60 61
@@ -66,7 +67,8 @@ public class SearchParam { @@ -66,7 +67,8 @@ public class SearchParam {
66 .setFilterYearMonth(req.getFilterYearMonth()) 67 .setFilterYearMonth(req.getFilterYearMonth())
67 .setStartTime(req.getStartTime()) 68 .setStartTime(req.getStartTime())
68 .setEndTime(req.getEndTime()) 69 .setEndTime(req.getEndTime())
69 - .setContainYoho(req.getContainYoho()); 70 + .setContainYoho(req.getContainYoho())
  71 + .setRankType(req.getRankType());
70 return this; 72 return this;
71 } 73 }
72 74
@@ -199,14 +201,14 @@ public class SearchParam { @@ -199,14 +201,14 @@ public class SearchParam {
199 } 201 }
200 return this; 202 return this;
201 } 203 }
202 - 204 +
203 public SearchParam setFilterYearMonth(String yearMonth) { 205 public SearchParam setFilterYearMonth(String yearMonth) {
204 if (StringUtils.isNotBlank(yearMonth)) { 206 if (StringUtils.isNotBlank(yearMonth)) {
205 param.put(SearchConstants.IndexNameConstant.FILTER_YEAR_MONTH, yearMonth); 207 param.put(SearchConstants.IndexNameConstant.FILTER_YEAR_MONTH, yearMonth);
206 } 208 }
207 return this; 209 return this;
208 } 210 }
209 - 211 +
210 public SearchParam setStartTime(Integer startTime) { 212 public SearchParam setStartTime(Integer startTime) {
211 if (startTime != null) { 213 if (startTime != null) {
212 param.put(SearchConstants.IndexNameConstant.START_TIME, startTime); 214 param.put(SearchConstants.IndexNameConstant.START_TIME, startTime);
@@ -260,6 +262,13 @@ public class SearchParam { @@ -260,6 +262,13 @@ public class SearchParam {
260 return this; 262 return this;
261 } 263 }
262 264
  265 + public SearchParam setRankType(String rankType) {
  266 + if (StringUtils.isNotEmpty(rankType)) {
  267 + param.put(SearchConstants.IndexNameConstant.RANK_TYPE, rankType);
  268 + }
  269 + return this;
  270 + }
  271 +
263 public Map<String, Object> getParam() { 272 public Map<String, Object> getParam() {
264 return param; 273 return param;
265 } 274 }
@@ -24,6 +24,7 @@ public class ProductSearchReq { @@ -24,6 +24,7 @@ public class ProductSearchReq {
24 private Integer endTime; 24 private Integer endTime;
25 private Integer searchType; 25 private Integer searchType;
26 private String containYoho;//是否包含有货商品 26 private String containYoho;//是否包含有货商品
  27 + private String rankType;
27 28
28 @Override 29 @Override
29 public String toString() { 30 public String toString() {
@@ -234,6 +235,13 @@ public class ProductSearchReq { @@ -234,6 +235,13 @@ public class ProductSearchReq {
234 this.containYoho = containYoho; 235 this.containYoho = containYoho;
235 return this; 236 return this;
236 } 237 }
237 -  
238 - 238 +
  239 + public String getRankType() {
  240 + return rankType;
  241 + }
  242 +
  243 + public ProductSearchReq setRankType(String rankType) {
  244 + this.rankType = rankType;
  245 + return this;
  246 + }
239 } 247 }