Authored by hugufei

rename

1 -package com.yoho.search.restapi.scene;  
2 -  
3 -import java.util.Map;  
4 -  
5 -import javax.servlet.http.HttpServletRequest;  
6 -  
7 -import com.yoho.search.service.scene.web.WebNewShelveService;  
8 -import org.springframework.beans.factory.annotation.Autowired;  
9 -import org.springframework.stereotype.Controller;  
10 -import org.springframework.web.bind.annotation.RequestMapping;  
11 -import org.springframework.web.bind.annotation.RequestMethod;  
12 -import org.springframework.web.bind.annotation.ResponseBody;  
13 -  
14 -import com.yoho.search.aop.downgrade.PersionalRateLimit;  
15 -import com.yoho.search.common.utils.HttpServletRequestUtils;  
16 -import com.yoho.search.models.SearchApiResult;  
17 -import com.yoho.search.service.scene.web.WebProductListService;  
18 -  
19 -@Controller  
20 -public class WebProductListController {  
21 -  
22 - @Autowired  
23 - private WebProductListService webProductListService;  
24 - @Autowired  
25 - private WebNewShelveService webNewShelveService;  
26 -  
27 - /**  
28 - * pc-商品列表  
29 - *  
30 - * @return  
31 - */  
32 - @PersionalRateLimit(isOrderUseable = true)  
33 - @RequestMapping(method = RequestMethod.GET, value = "/web/productList")  
34 - @ResponseBody  
35 - public SearchApiResult webProductList(HttpServletRequest request) {  
36 - Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);  
37 - return webProductListService.webProductList(paramMap);  
38 - }  
39 -  
40 - /**  
41 - * pc-首页最新上架  
42 - *  
43 - * @return  
44 - */  
45 - @RequestMapping(method = RequestMethod.GET, value = "/new-shelve")  
46 - @ResponseBody  
47 - public SearchApiResult webNewShelve(HttpServletRequest request) {  
48 - Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);  
49 - return webNewShelveService.webNewShelveProductList(paramMap);  
50 - }  
51 -  
52 - /**  
53 - * pc-首页最新上架  
54 - *  
55 - * @return  
56 - */  
57 - @RequestMapping(method = RequestMethod.GET, value = "/web/newShelveBatch")  
58 - @ResponseBody  
59 - public SearchApiResult webNewShelveBatch(HttpServletRequest request) {  
60 - Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);  
61 - return webNewShelveService.webNewShelveBatchProductList(paramMap);  
62 - }  
63 -  
64 -} 1 +package com.yoho.search.restapi.scene;
  2 +
  3 +import java.util.Map;
  4 +
  5 +import javax.servlet.http.HttpServletRequest;
  6 +
  7 +import com.yoho.search.service.scene.web.WebNewShelveService;
  8 +import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.stereotype.Controller;
  10 +import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RequestMethod;
  12 +import org.springframework.web.bind.annotation.ResponseBody;
  13 +
  14 +import com.yoho.search.aop.downgrade.PersionalRateLimit;
  15 +import com.yoho.search.common.utils.HttpServletRequestUtils;
  16 +import com.yoho.search.models.SearchApiResult;
  17 +import com.yoho.search.service.scene.web.WebProductListService;
  18 +
  19 +@Controller
  20 +public class WebSceneController {
  21 +
  22 + @Autowired
  23 + private WebProductListService webProductListService;
  24 + @Autowired
  25 + private WebNewShelveService webNewShelveService;
  26 +
  27 + /**
  28 + * pc-商品列表
  29 + *
  30 + * @return
  31 + */
  32 + @PersionalRateLimit(isOrderUseable = true)
  33 + @RequestMapping(method = RequestMethod.GET, value = "/web/productList")
  34 + @ResponseBody
  35 + public SearchApiResult webProductList(HttpServletRequest request) {
  36 + Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
  37 + return webProductListService.webProductList(paramMap);
  38 + }
  39 +
  40 + /**
  41 + * pc-首页最新上架
  42 + *
  43 + * @return
  44 + */
  45 + @RequestMapping(method = RequestMethod.GET, value = "/new-shelve")
  46 + @ResponseBody
  47 + public SearchApiResult webNewShelve(HttpServletRequest request) {
  48 + Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
  49 + return webNewShelveService.webNewShelveProductList(paramMap);
  50 + }
  51 +
  52 + /**
  53 + * pc-首页最新上架
  54 + *
  55 + * @return
  56 + */
  57 + @RequestMapping(method = RequestMethod.GET, value = "/web/newShelveBatch")
  58 + @ResponseBody
  59 + public SearchApiResult webNewShelveBatch(HttpServletRequest request) {
  60 + Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
  61 + return webNewShelveService.webNewShelveBatchProductList(paramMap);
  62 + }
  63 +
  64 +}