Authored by mali

24.0版本升级

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