ActivityConroller.java 1.1 KB
package com.yoho.search.restapi;

import com.yoho.search.common.utils.HttpServletRequestUtils;
import com.yoho.search.models.SearchApiResult;
import com.yoho.search.service.scene.activity.ActivityService;
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;

@Controller
public class ActivityConroller {

    @Autowired
    private ActivityService activityService;

    /**
     * 活动推荐店铺
     *
     * @param request
     * @return
     */
    @RequestMapping(method = RequestMethod.GET, value = "/activity/recommendShop")
    @ResponseBody
    public SearchApiResult recommendShop(HttpServletRequest request) {
        Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
        return activityService.recommendShop(paramMap);
    }

}