FirstPageSceneController.java 1.32 KB
package com.yoho.search.restapi.scene;

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.pages.FirstPageSceneService;
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 javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * 首页-猜你喜欢个性化接口
 *
 * @author gufei.hu
 */
@Controller
public class FirstPageSceneController {

    @Autowired
    private FirstPageSceneService firstPageSceneService;

    /**
     * 首页-猜你喜欢个性化接口
     *
     * @return
     */
    @PersionalRateLimit(isOrderUseable = true)
    @RequestMapping(method = RequestMethod.GET, value = "/firstPage/guessLike/productList")
    @ResponseBody
    public SearchApiResult firstPageProductList(HttpServletRequest request) {
        Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
        return firstPageSceneService.productList(paramMap);
    }

}