...
|
...
|
@@ -5,6 +5,9 @@ import java.util.Map; |
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
import com.yoho.search.service.list.FuzzySceneProductListService;
|
|
|
import org.apache.commons.collections.MapUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
...
|
...
|
@@ -26,6 +29,8 @@ public class ProductListController { |
|
|
private IProductListService productListService;
|
|
|
@Autowired
|
|
|
private ProductListSwitchService productListSwitchService;
|
|
|
@Autowired
|
|
|
private FuzzySceneProductListService fuzzySceneProductListService;
|
|
|
|
|
|
/**
|
|
|
* 获取商品列表-支持个性化降级
|
...
|
...
|
@@ -37,8 +42,12 @@ public class ProductListController { |
|
|
@ResponseBody
|
|
|
public SearchApiResult productList(HttpServletRequest request) {
|
|
|
Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
|
|
|
if(StringUtils.isNotBlank(MapUtils.getString(paramMap,"query"))){
|
|
|
return fuzzySceneProductListService.productList(paramMap);
|
|
|
}else{
|
|
|
return productListSwitchService.productList(paramMap);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* post的方式获取商品列表-不支持个性化
|
...
|
...
|
|