Authored by zhaojun2

add 开关

... ... @@ -165,4 +165,11 @@ public class SearchDynamicConfigService {
return configReader.getBoolean("search.shop.group.new", true);
}
/**
* aggProductListByBrand新实现
*/
public boolean aggBrandProductNew() {
return configReader.getBoolean("search.agg.brand.product.new", true);
}
}
... ...
... ... @@ -4,6 +4,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.yoho.search.common.SearchDynamicConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
... ... @@ -25,6 +26,8 @@ public class AggProductListController {
@Autowired
private AggProductListService aggProductListService;
@Autowired
private SearchDynamicConfigService searchDynamicConfigService;
/**
* 聚合商品列表[按品牌或品类聚合-支持个性化且order无效]
... ... @@ -49,6 +52,9 @@ public class AggProductListController {
@ResponseBody
public SearchApiResult aggProductListByBrand(HttpServletRequest request) {
Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
if (searchDynamicConfigService.aggBrandProductNew()) {
return aggProductListService.aggProductListByBrandV2(paramMap);
}
return aggProductListService.aggProductListByBrand(paramMap);
}
... ...
... ... @@ -123,3 +123,5 @@ search.persional.rateLimit.productindex.aggRecommendBrand=100:2
search.tbl.use.new.index = true
search.shop.group.new=true
search.agg.brand.product.new=true
... ...