|
|
package com.yoho.search.restapi.sapp;
|
|
|
package com.yoho.search.restapi.miniapp;
|
|
|
|
|
|
import com.yoho.search.common.downgrade.persional.PersionalRateLimit;
|
|
|
import com.yoho.search.common.utils.HttpServletRequestUtils;
|
|
|
import com.yoho.search.models.SearchApiResult;
|
|
|
import com.yoho.search.service.scene.FuzzySceneService;
|
|
|
import com.yoho.search.service.scene.sapp.SappFuzzySceneService;
|
|
|
import com.yoho.search.service.scene.miniapp.MiniappFuzzySceneService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
...
|
...
|
@@ -15,10 +14,10 @@ import javax.servlet.http.HttpServletRequest; |
|
|
import java.util.Map;
|
|
|
|
|
|
@Controller
|
|
|
public class SappProductListController {
|
|
|
public class MiniappProductListController {
|
|
|
|
|
|
@Autowired
|
|
|
private SappFuzzySceneService sappFuzzySceneService;
|
|
|
private MiniappFuzzySceneService miniappFuzzySceneService;
|
|
|
|
|
|
/**
|
|
|
* 小程序模糊搜索列表
|
...
|
...
|
@@ -26,11 +25,11 @@ public class SappProductListController { |
|
|
* @return
|
|
|
*/
|
|
|
@PersionalRateLimit(isOrderUseable = true)
|
|
|
@RequestMapping(method = RequestMethod.GET, value = "/sapp/fuzzy/productList")
|
|
|
@RequestMapping(method = RequestMethod.GET, value = "/miniapp/fuzzy/productList")
|
|
|
@ResponseBody
|
|
|
public SearchApiResult sappFuzzyProductList(HttpServletRequest request) {
|
|
|
public SearchApiResult miniappFuzzyProductList(HttpServletRequest request) {
|
|
|
Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
|
|
|
SearchApiResult searchApiResult = sappFuzzySceneService.productList(paramMap);
|
|
|
SearchApiResult searchApiResult = miniappFuzzySceneService.productList(paramMap);
|
|
|
return searchApiResult;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -40,11 +39,11 @@ public class SappProductListController { |
|
|
* @return
|
|
|
*/
|
|
|
@PersionalRateLimit(isOrderUseable = false)
|
|
|
@RequestMapping(method = RequestMethod.GET, value = "/sapp/fuzzy/aggregations")
|
|
|
@RequestMapping(method = RequestMethod.GET, value = "/miniapp/fuzzy/aggregations")
|
|
|
@ResponseBody
|
|
|
public SearchApiResult sappFuzzyAggregations(HttpServletRequest request) {
|
|
|
public SearchApiResult miniappFuzzyAggregations(HttpServletRequest request) {
|
|
|
Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
|
|
|
return sappFuzzySceneService.aggregations(paramMap);
|
|
|
return miniappFuzzySceneService.aggregations(paramMap);
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|