package com.boman.system.api;

import com.boman.domain.constant.ServiceNameConstants;
import com.boman.domain.SysDept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author shiqian
 * @date 2021年04月07日 10:31
 **/
@FeignClient(contextId = "remoteDeptService", value = ServiceNameConstants.SYSTEM_SERVICE)
public interface RemoteDeptService {

    /**
     * 功能描述: 根据id查找
     *
     * @param id deptId
     * @return com.boman.domain.dto.AjaxResult
     */
    @GetMapping(value = "/dept/getById/{id}")
    SysDept getById(@PathVariable("id") Long id);

    /**
     * 功能描述: 拿到部门下所有的部门, 包含传过来的deptId
     *
     * @param deptId deptId
     * @return com.boman.domain.dto.AjaxResult
     */
    @GetMapping("/dept/list/children/depts/{deptId}")
    List<SysDept> listChildrenDepts(@PathVariable(value = "deptId") Long deptId);
}

