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 listChildrenDepts(@PathVariable(value = "deptId") Long deptId); @GetMapping("/dept/parentId/{parentId}") List getByParentId(@PathVariable("parentId") Long parentId); /** * 根据部门名称获取该用户属于哪一个部门(疫苗新增/修改时使用) * @param deptName * @return */ @GetMapping("/dept/selectByDeptName/{deptName}") List selectByDeptName(@PathVariable("deptName") String deptName); /** * 根据区划id去找部门id(只适用于村级以上的部门查询) * @param areaId * @return */ @GetMapping("/dept/selectByAreaId/{areaId}") List selectByAreaId(@PathVariable("areaId") String areaId); }