Authored by mali

现货寄存的商品列表

@@ -5,6 +5,7 @@ import java.util.Calendar; @@ -5,6 +5,7 @@ import java.util.Calendar;
5 import java.util.Map; 5 import java.util.Map;
6 import java.util.UUID; 6 import java.util.UUID;
7 7
  8 +import com.yohobuy.ufo.model.enums.PoolIDConfigEnum;
8 import org.apache.commons.lang3.StringUtils; 9 import org.apache.commons.lang3.StringUtils;
9 import org.slf4j.Logger; 10 import org.slf4j.Logger;
10 import org.slf4j.LoggerFactory; 11 import org.slf4j.LoggerFactory;
@@ -271,45 +272,17 @@ public class ProductSearchController { @@ -271,45 +272,17 @@ public class ProductSearchController {
271 @IgnoreSession 272 @IgnoreSession
272 @Cachable(expire = 60) 273 @Cachable(expire = 60)
273 public ApiResponse searchDepositProductList( 274 public ApiResponse searchDepositProductList(
274 - @RequestParam(value = "type", required = false)Integer type,  
275 - @RequestParam(value = "order", required = false)String order,  
276 - @RequestParam(value = "product_id", required = false)String id,  
277 - @RequestParam(value = "productPool", required = false) String productPool,  
278 - @RequestParam(value = "sort", required = false)String sort,  
279 - @RequestParam(value = "brand", required = false)String brand,  
280 - @RequestParam(value = "series", required = false)String series,  
281 - @RequestParam(value = "gender", required = false) String gender,  
282 - @RequestParam(value = "size", required = false) String size,  
283 - @RequestParam(value = "isSoonSale", required = false) String isSoonSale,  
284 @RequestParam(value = "query", required = false)String query, 275 @RequestParam(value = "query", required = false)String query,
285 @RequestParam(value = "limit", required = false)Integer limit, 276 @RequestParam(value = "limit", required = false)Integer limit,
286 - @RequestParam(value = "page", required = false)Integer page,  
287 - @RequestParam(value = "app_version", required = false)String appVersion 277 + @RequestParam(value = "page", required = false)Integer page
288 ) { 278 ) {
289 - if (type != null) {  
290 - Map<Integer,Integer> poolConfig = ufoServiceCaller.call("ufo.resource.goodsPool", Map.class);  
291 - if (type == 0) {  
292 - productPool = String.valueOf(poolConfig.get(2));  
293 - order = "pools.order_by:desc";  
294 - } else if (type == 1) {  
295 - productPool = String.valueOf(poolConfig.get(4));  
296 - order = "pools.order_by:desc";  
297 - } else if (type == 2) {  
298 - isSoonSale = "Y";  
299 - }  
300 - }  
301 - if (StringUtils.isNotBlank(productPool)  
302 - && StringUtils.isBlank(query)  
303 - && StringUtils.isBlank(order)) {  
304 - order = "pools.order_by:desc"; // 如果走商品池接口,默认走排序倒序接口  
305 - }  
306 - SortIdLevel sortIdLevel = productSearchService.getSortLevelById(sort);  
307 - ProductSearchReq req = new ProductSearchReq().setOrder(order).setId(id).setPool(productPool).setBrand(brand).setMidSort(sortIdLevel.getMidSortId()).setMaxSort(sortIdLevel.getMaxSortId())  
308 - .setSeries(series).setGender(gender).setSize(size).setIsSoonSale(isSoonSale).setViewNum(limit).setPage(page).setIsIdFilter(type).setSearchType(type); 279 + Map<Integer,Integer> poolConfig = ufoServiceCaller.call("ufo.resource.goodsPool", Map.class);
  280 + String productPool = String.valueOf(poolConfig.get(PoolIDConfigEnum.DEPOSIT_GOODS.getConfigId()));
  281 + String order = "pools.order_by:desc"; // 如果走商品池接口,默认走排序倒序接口
  282 +
  283 + ProductSearchReq req = new ProductSearchReq().setOrder(order).setPool(productPool).setViewNum(limit).setPage(page);
309 searchHelpService.setQuery(query, req); 284 searchHelpService.setQuery(query, req);
310 - //设置是否包含有货商品  
311 - searchHelpService.setContainYoho(appVersion, req);  
312 - LOG.info("in method=ufo.product.search.list req={}", req.toString()); 285 + LOG.info("in method=ufo.product.search.deposit req={}", req.toString());
313 286
314 JSONObject resp = productSearchService.searchProductList(req); 287 JSONObject resp = productSearchService.searchProductList(req);
315 if (resp != null) { 288 if (resp != null) {
@@ -134,7 +134,7 @@ public class ProductSearchServiceImpl implements ProductSearchService { @@ -134,7 +134,7 @@ public class ProductSearchServiceImpl implements ProductSearchService {
134 @Override 134 @Override
135 public JSONObject searchProductList(ProductSearchReq req) { 135 public JSONObject searchProductList(ProductSearchReq req) {
136 SearchParam searchParam = new SearchParam().buildPageSearchParam(req); 136 SearchParam searchParam = new SearchParam().buildPageSearchParam(req);
137 - // type:0,推荐;1,热销; 137 + // searchType:0,推荐;1,热销;
138 // 2,即将发售; * 138 // 2,即将发售; *
139 // 3,品类; 4,品牌;5,系列; 139 // 3,品类; 4,品牌;5,系列;
140 // 6,搜索 140 // 6,搜索