Authored by hugufei

拆包

... ... @@ -4,6 +4,8 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.yoho.search.aop.downgrade.PersionalRateLimit;
import com.yoho.search.service.scene.shopbrand.RecommendBrandShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
... ... @@ -21,6 +23,8 @@ public class BrandController {
@Autowired
private BrandService brandService;
@Autowired
private RecommendBrandShopService recommendBrandShopService;
/**
* 获取品牌列表[不包含全球购]
... ... @@ -109,6 +113,17 @@ public class BrandController {
return brandService.aggBrand(paramMap);
}
/**
* 为用户推荐品牌-按相关性聚合8个品牌出来
*/
@PersionalRateLimit(isOrderUseable = false)
@RequestMapping(method = RequestMethod.GET, value = "/productindex/aggRecommendBrand")
@ResponseBody
public SearchApiResult recommendBrand(HttpServletRequest request) {
Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
return recommendBrandShopService.aggRecommendBrand(paramMap);
}
@RequestMapping(value = "/brand/{brandId}")
@ResponseBody
... ...
package com.yoho.search.restapi.shopbrand;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.yoho.search.aop.downgrade.PersionalRateLimit;
import com.yoho.search.common.utils.HttpServletRequestUtils;
import com.yoho.search.models.SearchApiResult;
import com.yoho.search.service.scene.shopbrand.RecommendBrandShopService;
@Controller
public class ShopBrandRecommendController {
@Autowired
private RecommendBrandShopService recommendBrandShopService;
/**
* 为用户推荐店铺-按相关性聚合出店铺,支持分页查找
*/
@PersionalRateLimit(isOrderUseable = false)
@RequestMapping(method = RequestMethod.GET, value = "/productindex/recommendShop")
@ResponseBody
public SearchApiResult recommendShop(HttpServletRequest request) {
Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
return recommendBrandShopService.aggRecommendShop(paramMap);
}
/**
* 为用户推荐品牌-按相关性聚合8个品牌出来
*/
@PersionalRateLimit(isOrderUseable = false)
@RequestMapping(method = RequestMethod.GET, value = "/productindex/aggRecommendBrand")
@ResponseBody
public SearchApiResult recommendBrand(HttpServletRequest request) {
Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
return recommendBrandShopService.aggRecommendBrand(paramMap);
}
}
... ... @@ -4,6 +4,8 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.yoho.search.aop.downgrade.PersionalRateLimit;
import com.yoho.search.service.scene.shopbrand.RecommendBrandShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
... ... @@ -28,6 +30,8 @@ public class ShopsController {
private ShopListService shopListService;
@Autowired
private BrandWithShopsService brandWithShopsService;
@Autowired
private RecommendBrandShopService recommendBrandShopService;
/**
* 按关键字搜出一个符合条件的品牌[待删除]
... ... @@ -95,4 +99,15 @@ public class ShopsController {
Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
return shopsService.group_shops(paramMap);
}
/**
* 为用户推荐店铺-按相关性聚合出店铺,支持分页查找
*/
@PersionalRateLimit(isOrderUseable = false)
@RequestMapping(method = RequestMethod.GET, value = "/productindex/recommendShop")
@ResponseBody
public SearchApiResult recommendShop(HttpServletRequest request) {
Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
return recommendBrandShopService.aggRecommendShop(paramMap);
}
}
... ...