PressTestController.java 1.15 KB
package com.yoho.search.restapi;

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 com.yoho.search.models.SearchApiResult;
import com.yoho.search.service.press.PressTestService;

@Controller
public class PressTestController {

	@Autowired
	private PressTestService pressTestService;

	@RequestMapping(method = RequestMethod.GET, value = "/pressProductIndex")
	@ResponseBody
	public SearchApiResult pressProductIndex(String brandIds, String smallSortIds, int size, String order, boolean withRange) {
		return pressTestService.pressProductIndex(brandIds, smallSortIds, size, order, withRange);
	}

	@RequestMapping(method = RequestMethod.GET, value = "/pressProductBaseIndex")
	@ResponseBody
	public SearchApiResult pressProductBaseIndex(String brandIds, String smallSortIds, int size, String order, boolean withRange) {
		return pressTestService.pressProductBaseIndex(brandIds, smallSortIds, size, order, withRange);
	}

}