package com.house365.service.interfaces;

import com.house365.beans.vo.User;
import com.house365.common.searchBeans.CommonSearchResponse;
import com.house365.common.searchBeans.QueryParams;
import com.house365.service.impl.UserClientHystrix;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Date: 2017/1/9</p>
 *
 * @author XN
 * @version 1.0
 */
@FeignClient(value = "wechat-service", fallback = UserClientHystrix.class)
public interface UserClient {

    @RequestMapping(method = RequestMethod.GET, value = "/user/get/{id}")
    User selectByPrimaryKey(@PathVariable("id") Integer id);

    @RequestMapping(value = "/user/list")
    CommonSearchResponse<User> list(@RequestBody QueryParams queryParams);

}