...
|
...
|
@@ -11,8 +11,10 @@ import java.util.Map; |
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.yoho.core.config.ConfigReader;
|
|
|
import com.yohobuy.ufo.model.promotion.response.CouponInfo;
|
|
|
import com.yohoufo.common.ApiResponse;
|
|
|
import com.yohoufo.common.constant.BusinessClientEnum;
|
|
|
import com.yohoufo.dal.product.BrandMapper;
|
|
|
import org.apache.commons.collections.MapUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
...
|
...
|
@@ -81,6 +83,9 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
|
|
@Autowired
|
|
|
private ProductMapper productMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private ConfigReader configReader;
|
|
|
|
|
|
|
|
|
public static final String PRODUCT_LIST_URL = "/yohosearch/ufo/productList.json";
|
|
|
|
...
|
...
|
@@ -437,9 +442,11 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public SearchBrandListResp searchBrandList() {
|
|
|
public SearchBrandListResp searchBrandList(String businessClient) {
|
|
|
SearchBrandListResp resp = new SearchBrandListResp();
|
|
|
SearchParam searchParam = new SearchParam();
|
|
|
searchParam.setXianYuSort(businessClient, configReader); // 如果是闲鱼请求,则设置大品类
|
|
|
|
|
|
JSONObject data = search(searchParam.getParam(), BRAND_LIST_URL);
|
|
|
if(data != null && !CollectionUtils.isEmpty(data.getJSONArray("brand_list"))) {
|
|
|
resp = JSON.toJavaObject(data, SearchBrandListResp.class);
|
...
|
...
|
|