Authored by mali

现货寄存的商品列表

... ... @@ -5,6 +5,7 @@ import java.util.Calendar;
import java.util.Map;
import java.util.UUID;
import com.yohobuy.ufo.model.enums.PoolIDConfigEnum;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
... ... @@ -271,45 +272,17 @@ public class ProductSearchController {
@IgnoreSession
@Cachable(expire = 60)
public ApiResponse searchDepositProductList(
@RequestParam(value = "type", required = false)Integer type,
@RequestParam(value = "order", required = false)String order,
@RequestParam(value = "product_id", required = false)String id,
@RequestParam(value = "productPool", required = false) String productPool,
@RequestParam(value = "sort", required = false)String sort,
@RequestParam(value = "brand", required = false)String brand,
@RequestParam(value = "series", required = false)String series,
@RequestParam(value = "gender", required = false) String gender,
@RequestParam(value = "size", required = false) String size,
@RequestParam(value = "isSoonSale", required = false) String isSoonSale,
@RequestParam(value = "query", required = false)String query,
@RequestParam(value = "limit", required = false)Integer limit,
@RequestParam(value = "page", required = false)Integer page,
@RequestParam(value = "app_version", required = false)String appVersion
@RequestParam(value = "page", required = false)Integer page
) {
if (type != null) {
Map<Integer,Integer> poolConfig = ufoServiceCaller.call("ufo.resource.goodsPool", Map.class);
if (type == 0) {
productPool = String.valueOf(poolConfig.get(2));
order = "pools.order_by:desc";
} else if (type == 1) {
productPool = String.valueOf(poolConfig.get(4));
order = "pools.order_by:desc";
} else if (type == 2) {
isSoonSale = "Y";
}
}
if (StringUtils.isNotBlank(productPool)
&& StringUtils.isBlank(query)
&& StringUtils.isBlank(order)) {
order = "pools.order_by:desc"; // 如果走商品池接口,默认走排序倒序接口
}
SortIdLevel sortIdLevel = productSearchService.getSortLevelById(sort);
ProductSearchReq req = new ProductSearchReq().setOrder(order).setId(id).setPool(productPool).setBrand(brand).setMidSort(sortIdLevel.getMidSortId()).setMaxSort(sortIdLevel.getMaxSortId())
.setSeries(series).setGender(gender).setSize(size).setIsSoonSale(isSoonSale).setViewNum(limit).setPage(page).setIsIdFilter(type).setSearchType(type);
Map<Integer,Integer> poolConfig = ufoServiceCaller.call("ufo.resource.goodsPool", Map.class);
String productPool = String.valueOf(poolConfig.get(PoolIDConfigEnum.DEPOSIT_GOODS.getConfigId()));
String order = "pools.order_by:desc"; // 如果走商品池接口,默认走排序倒序接口
ProductSearchReq req = new ProductSearchReq().setOrder(order).setPool(productPool).setViewNum(limit).setPage(page);
searchHelpService.setQuery(query, req);
//设置是否包含有货商品
searchHelpService.setContainYoho(appVersion, req);
LOG.info("in method=ufo.product.search.list req={}", req.toString());
LOG.info("in method=ufo.product.search.deposit req={}", req.toString());
JSONObject resp = productSearchService.searchProductList(req);
if (resp != null) {
... ...
... ... @@ -134,7 +134,7 @@ public class ProductSearchServiceImpl implements ProductSearchService {
@Override
public JSONObject searchProductList(ProductSearchReq req) {
SearchParam searchParam = new SearchParam().buildPageSearchParam(req);
// type:0,推荐;1,热销;
// searchType:0,推荐;1,热销;
// 2,即将发售; *
// 3,品类; 4,品牌;5,系列;
// 6,搜索
... ...