// Path: xbin-store-cloud-service-search-api/src/main/java/cn/binux/search/service/SearchService.java
// @FeignClient(value = "xbin-store-cloud-service-search",fallback = SearchServiceHystrix.class)
// public interface SearchService {
// 
//     //http://localhost:8512/search/SolrService/importAllItems/TztyomXxDyi92
//     /**
//      * 导入全部商品索引
//      *
//      * @return
//      */
//     @RequestMapping(value = "/importAllItems",method = RequestMethod.POST)
//     XbinResult importAllItems();
// 
//     //http://localhost:8512/search/SolrService/search/查询条件/1/60
//     /**
//      * 查询商品
//      * @param queryString 查询条件
//      * @param page 第几页
//      * @param rows 每页几条
//      * @return 返回商品Json
//      * @throws Exception
//      */
//     @RequestMapping(value = "/search",method = RequestMethod.POST)
//     SearchResult search(
//             @RequestParam("q")                  String queryString,
//             @RequestParam(name = "page",defaultValue = "1")   Integer page,
//             @RequestParam(name = "rows",defaultValue = "0")   Integer rows
//     );
// }


import cn.binux.pojo.SearchResult;
import cn.binux.search.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.io.UnsupportedEncodingException;
package cn.binux.search.controller;



/**
 * 搜索 Controller
 *
 * @author xubin.
 * @create 2017-05-04
 */

@Controller
@RefreshScope
public class SearchController {

    @Autowired
// Path: xbin-store-cloud-service-search-api/src/main/java/cn/binux/search/service/SearchService.java
// @FeignClient(value = "xbin-store-cloud-service-search",fallback = SearchServiceHystrix.class)
// public interface SearchService {
// 
//     //http://localhost:8512/search/SolrService/importAllItems/TztyomXxDyi92
//     /**
//      * 导入全部商品索引
//      *
//      * @return
//      */
//     @RequestMapping(value = "/importAllItems",method = RequestMethod.POST)
//     XbinResult importAllItems();
// 
//     //http://localhost:8512/search/SolrService/search/查询条件/1/60
//     /**
//      * 查询商品
//      * @param queryString 查询条件
//      * @param page 第几页
//      * @param rows 每页几条
//      * @return 返回商品Json
//      * @throws Exception
//      */
//     @RequestMapping(value = "/search",method = RequestMethod.POST)
//     SearchResult search(
//             @RequestParam("q")                  String queryString,
//             @RequestParam(name = "page",defaultValue = "1")   Integer page,
//             @RequestParam(name = "rows",defaultValue = "0")   Integer rows
//     );
// }


// Path: xbin-store-cloud-web-search/src/main/java/cn/binux/search/controller/SearchController.java
import cn.binux.pojo.SearchResult;
import cn.binux.search.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.io.UnsupportedEncodingException;

package cn.binux.search.controller;



/**
 * 搜索 Controller
 *
 * @author xubin.
 * @create 2017-05-04
 */

@Controller
@RefreshScope
public class SearchController {

    @Autowired
    private SearchService searchService;