UfoSecondhandController.java 1.13 KB
package com.yoho.search.restapi.ufo;

import com.yoho.search.common.utils.HttpServletRequestUtils;
import com.yoho.search.models.SearchApiResult;
import com.yoho.search.service.scene.ufo.UfoBrandListService;
import com.yoho.search.service.scene.ufo.UfoSecondhandService;
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 org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@RestController
public class UfoSecondhandController {

    @Autowired
    private UfoSecondhandService ufoSecondhandService;

    @RequestMapping(method = RequestMethod.GET, value = "/ufo/secondhand/productList")
    public SearchApiResult secondhandProductList(HttpServletRequest request) {
        Map<String, String> paramMap = HttpServletRequestUtils.transParamType(request);
        return ufoSecondhandService.secondHandProductList(paramMap);
    }
}