Showing
1 changed file
with
3 additions
and
7 deletions
@@ -84,7 +84,7 @@ public class ProductSearchServiceImpl implements ProductSearchService { | @@ -84,7 +84,7 @@ public class ProductSearchServiceImpl implements ProductSearchService { | ||
84 | 84 | ||
85 | @Override | 85 | @Override |
86 | public JSONObject searchProductList(ProductSearchReq req) { | 86 | public JSONObject searchProductList(ProductSearchReq req) { |
87 | - SearchParam searchParam = new SearchParam().buildPageSearchParam(req); | 87 | + SearchParam searchParam = new SearchParam().buildPageSearchParam(req).setShowChannel(req.getBusinessClient()); |
88 | /*if (req.getMidSort() == null && req.getMidSort() == null) { | 88 | /*if (req.getMidSort() == null && req.getMidSort() == null) { |
89 | searchParam.setXianYuSort(req.getBusinessClient(), configReader); | 89 | searchParam.setXianYuSort(req.getBusinessClient(), configReader); |
90 | }*/ | 90 | }*/ |
@@ -115,16 +115,12 @@ public class ProductSearchServiceImpl implements ProductSearchService { | @@ -115,16 +115,12 @@ public class ProductSearchServiceImpl implements ProductSearchService { | ||
115 | url = ProductSearchConstants.FAVORITE_PRODUCT_LIST_URL; | 115 | url = ProductSearchConstants.FAVORITE_PRODUCT_LIST_URL; |
116 | } else if (StringUtils.isNotBlank(req.getQuery()) | 116 | } else if (StringUtils.isNotBlank(req.getQuery()) |
117 | || (req.getSearchType() != null && req.getSearchType() == 6)) { | 117 | || (req.getSearchType() != null && req.getSearchType() == 6)) { |
118 | - | ||
119 | - searchParam.setShowChannel(req.getBusinessClient()); | ||
120 | url = ProductSearchConstants.PRODUCT_SEARCH_QUERY_URL; | 118 | url = ProductSearchConstants.PRODUCT_SEARCH_QUERY_URL; |
121 | } else if (StringUtils.isNotBlank(req.getPool()) | 119 | } else if (StringUtils.isNotBlank(req.getPool()) |
122 | || (req.getSearchType() != null && (req.getSearchType() == 0 || req.getSearchType() == 1))) { | 120 | || (req.getSearchType() != null && (req.getSearchType() == 0 || req.getSearchType() == 1))) { |
123 | - searchParam.setShowChannel(req.getBusinessClient()); | ||
124 | url = ProductSearchConstants.PRODUCT_POOL_URL; | 121 | url = ProductSearchConstants.PRODUCT_POOL_URL; |
125 | - } else { | ||
126 | - searchParam.setShowChannel(req.getBusinessClient()); | ||
127 | } | 122 | } |
123 | + | ||
128 | JSONObject data = searchAssistService.search(searchParam.getParam(), url); | 124 | JSONObject data = searchAssistService.search(searchParam.getParam(), url); |
129 | // 将图片的相对路径转成绝对路径 | 125 | // 将图片的相对路径转成绝对路径 |
130 | if (null != data) { | 126 | if (null != data) { |
@@ -336,7 +332,7 @@ public class ProductSearchServiceImpl implements ProductSearchService { | @@ -336,7 +332,7 @@ public class ProductSearchServiceImpl implements ProductSearchService { | ||
336 | Product product = productHelpService.selectByIdCache(productId); | 332 | Product product = productHelpService.selectByIdCache(productId); |
337 | if (product != null) { | 333 | if (product != null) { |
338 | ProductSearchReq req = new ProductSearchReq().setNot_id(productId + "").setMidSort(product.getMidSortId() + "").setBrand(product.getBrandId() + "").setQuery(product.getProductName()); | 334 | ProductSearchReq req = new ProductSearchReq().setNot_id(productId + "").setMidSort(product.getMidSortId() + "").setBrand(product.getBrandId() + "").setQuery(product.getProductName()); |
339 | - SearchParam searchParam = new SearchParam().buildSearchParam(req); | 335 | + SearchParam searchParam = new SearchParam().buildSearchParam(req).setShowChannel(businessClient); |
340 | 336 | ||
341 | JSONObject data = searchAssistService.search(searchParam.getParam(), ProductSearchConstants.PRODUCT_RECOMMEND_LIST_URL); | 337 | JSONObject data = searchAssistService.search(searchParam.getParam(), ProductSearchConstants.PRODUCT_RECOMMEND_LIST_URL); |
342 | if(data != null && !CollectionUtils.isEmpty(data.getJSONArray("product_list"))) { | 338 | if(data != null && !CollectionUtils.isEmpty(data.getJSONArray("product_list"))) { |
-
Please register or login to post a comment