...
|
...
|
@@ -84,7 +84,7 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
|
|
|
|
|
@Override
|
|
|
public JSONObject searchProductList(ProductSearchReq req) {
|
|
|
SearchParam searchParam = new SearchParam().buildPageSearchParam(req);
|
|
|
SearchParam searchParam = new SearchParam().buildPageSearchParam(req).setShowChannel(req.getBusinessClient());
|
|
|
/*if (req.getMidSort() == null && req.getMidSort() == null) {
|
|
|
searchParam.setXianYuSort(req.getBusinessClient(), configReader);
|
|
|
}*/
|
...
|
...
|
@@ -115,16 +115,12 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
|
|
url = ProductSearchConstants.FAVORITE_PRODUCT_LIST_URL;
|
|
|
} else if (StringUtils.isNotBlank(req.getQuery())
|
|
|
|| (req.getSearchType() != null && req.getSearchType() == 6)) {
|
|
|
|
|
|
searchParam.setShowChannel(req.getBusinessClient());
|
|
|
url = ProductSearchConstants.PRODUCT_SEARCH_QUERY_URL;
|
|
|
} else if (StringUtils.isNotBlank(req.getPool())
|
|
|
|| (req.getSearchType() != null && (req.getSearchType() == 0 || req.getSearchType() == 1))) {
|
|
|
searchParam.setShowChannel(req.getBusinessClient());
|
|
|
url = ProductSearchConstants.PRODUCT_POOL_URL;
|
|
|
} else {
|
|
|
searchParam.setShowChannel(req.getBusinessClient());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
JSONObject data = searchAssistService.search(searchParam.getParam(), url);
|
|
|
// 将图片的相对路径转成绝对路径
|
|
|
if (null != data) {
|
...
|
...
|
@@ -336,7 +332,7 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
|
|
Product product = productHelpService.selectByIdCache(productId);
|
|
|
if (product != null) {
|
|
|
ProductSearchReq req = new ProductSearchReq().setNot_id(productId + "").setMidSort(product.getMidSortId() + "").setBrand(product.getBrandId() + "").setQuery(product.getProductName());
|
|
|
SearchParam searchParam = new SearchParam().buildSearchParam(req);
|
|
|
SearchParam searchParam = new SearchParam().buildSearchParam(req).setShowChannel(businessClient);
|
|
|
|
|
|
JSONObject data = searchAssistService.search(searchParam.getParam(), ProductSearchConstants.PRODUCT_RECOMMEND_LIST_URL);
|
|
|
if(data != null && !CollectionUtils.isEmpty(data.getJSONArray("product_list"))) {
|
...
|
...
|
|