Authored by mali

24.0版本升级

@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 <properties> 18 <properties>
19 <qiniu.version>7.0.5</qiniu.version> 19 <qiniu.version>7.0.5</qiniu.version>
20 <project-name>yohoufo-fore</project-name> 20 <project-name>yohoufo-fore</project-name>
21 - <model.version>23.0-SNAPSHOT</model.version> 21 + <model.version>24.0-SNAPSHOT</model.version>
22 <lombok.version>1.16.16</lombok.version> 22 <lombok.version>1.16.16</lombok.version>
23 </properties> 23 </properties>
24 24
@@ -8,4 +8,9 @@ public interface ProductConstants { @@ -8,4 +8,9 @@ public interface ProductConstants {
8 * 出售二手品类的配置 8 * 出售二手品类的配置
9 */ 9 */
10 String SECONDHANDSORTS_ZK_CONFIG = "ufo.product.secondHandSorts"; 10 String SECONDHANDSORTS_ZK_CONFIG = "ufo.product.secondHandSorts";
  11 +
  12 + /**
  13 + * 出售二手品类的配置默认值
  14 + */
  15 + String SECONDHANDSORTS_INIT_CONFIG = "40";
11 } 16 }
@@ -88,7 +88,7 @@ public class ProductController { @@ -88,7 +88,7 @@ public class ProductController {
88 LOG.info("in method=ufo.product.data product_id={}", productId); 88 LOG.info("in method=ufo.product.data product_id={}", productId);
89 ProductDetailResp resp = productService.queryProductDetailById(productId); 89 ProductDetailResp resp = productService.queryProductDetailById(productId);
90 90
91 - String hasSecondHandSorts = configReader.getString(ProductConstants.SECONDHANDSORTS_ZK_CONFIG, "40"); // 通过配置品类 来限制哪些品类可以二手发布 91 + String hasSecondHandSorts = configReader.getString(ProductConstants.SECONDHANDSORTS_ZK_CONFIG, ProductConstants.SECONDHANDSORTS_INIT_CONFIG); // 通过配置品类 来限制哪些品类可以二手发布
92 if (StringUtils.isNotBlank(hasSecondHandSorts) && null != resp.getProduct_info()) { 92 if (StringUtils.isNotBlank(hasSecondHandSorts) && null != resp.getProduct_info()) {
93 String[] sorts = hasSecondHandSorts.split(","); 93 String[] sorts = hasSecondHandSorts.split(",");
94 ProductInfo p = resp.getProduct_info(); 94 ProductInfo p = resp.getProduct_info();
@@ -384,7 +384,7 @@ public class ProductSearchController { @@ -384,7 +384,7 @@ public class ProductSearchController {
384 ProductSearchReq req = new ProductSearchReq().setViewNum(limit).setPage(page).setBusinessClient(businessClient); 384 ProductSearchReq req = new ProductSearchReq().setViewNum(limit).setPage(page).setBusinessClient(businessClient);
385 searchHelpService.setQuery(query, req); 385 searchHelpService.setQuery(query, req);
386 386
387 - LOG.info("in method=ufo.product.search.list req={}", req.toString()); 387 + LOG.info("in method=ufo.product.search.secondSaleList req={}", req.toString());
388 JSONObject resp = productSearchService.searchSecondSaleProductList(req); 388 JSONObject resp = productSearchService.searchSecondSaleProductList(req);
389 389
390 return new ApiResponse.ApiResponseBuilder().code(200).message("Product List.").data(resp).build(); 390 return new ApiResponse.ApiResponseBuilder().code(200).message("Product List.").data(resp).build();
@@ -579,13 +579,13 @@ public class ProductSearchServiceImpl implements ProductSearchService { @@ -579,13 +579,13 @@ public class ProductSearchServiceImpl implements ProductSearchService {
579 */ 579 */
580 public JSONObject searchSecondSaleProductList(ProductSearchReq req) { 580 public JSONObject searchSecondSaleProductList(ProductSearchReq req) {
581 581
582 - String hasSecondHandSorts = configReader.getString(ProductConstants.SECONDHANDSORTS_ZK_CONFIG, "40"); // 通过配置品类 来限制哪些品类可以二手发布 582 + String hasSecondHandSorts = configReader.getString(ProductConstants.SECONDHANDSORTS_ZK_CONFIG,
  583 + ProductConstants.SECONDHANDSORTS_INIT_CONFIG); // 通过配置品类 来限制哪些品类可以二手发布
583 req.setMaxSort(hasSecondHandSorts); 584 req.setMaxSort(hasSecondHandSorts);
584 585
585 SearchParam searchParam = new SearchParam().buildPageSearchParam(req).setShowChannel(req.getBusinessClient()); 586 SearchParam searchParam = new SearchParam().buildPageSearchParam(req).setShowChannel(req.getBusinessClient());
586 - String url = ProductSearchConstants.PRODUCT_SEARCH_QUERY_URL;  
587 587
588 - JSONObject data = searchAssistService.search(searchParam.getParam(), url); 588 + JSONObject data = searchAssistService.search(searchParam.getParam(), ProductSearchConstants.PRODUCT_SEARCH_QUERY_URL);
589 if (null != data) { 589 if (null != data) {
590 searchAssistService.processProductList(data.getJSONArray("product_list")); 590 searchAssistService.processProductList(data.getJSONArray("product_list"));
591 searchAssistService.setRecId(data); 591 searchAssistService.setRecId(data);