package com.house365.service.interfaces;

import com.house365.beans.vo.Department;
import com.house365.common.searchBeans.CommonSearchResponse;
import com.house365.common.searchBeans.QueryParams;
import com.house365.service.impl.DepartmentClientHystrix;
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 = DepartmentClientHystrix.class)
public interface DepartmentClient {

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

    @RequestMapping(method = RequestMethod.POST, value = "/department/list")
    CommonSearchResponse<Department> list(@RequestBody QueryParams queryParams);

}