RemoteDeptService.java 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package com.boman.system.api;
  2. import com.boman.domain.constant.ServiceNameConstants;
  3. import com.boman.domain.SysDept;
  4. import org.springframework.cloud.openfeign.FeignClient;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.PathVariable;
  7. import java.util.List;
  8. /**
  9. * @author shiqian
  10. * @date 2021年04月07日 10:31
  11. **/
  12. @FeignClient(contextId = "remoteDeptService", value = ServiceNameConstants.SYSTEM_SERVICE)
  13. public interface RemoteDeptService {
  14. /**
  15. * 功能描述: 根据id查找
  16. *
  17. * @param id deptId
  18. * @return com.boman.domain.dto.AjaxResult
  19. */
  20. @GetMapping(value = "/dept/getById/{id}")
  21. SysDept getById(@PathVariable("id") Long id);
  22. /**
  23. * 功能描述: 拿到部门下所有的部门, 包含传过来的deptId
  24. *
  25. * @param deptId deptId
  26. * @return com.boman.domain.dto.AjaxResult
  27. */
  28. @GetMapping("/dept/list/children/depts/{deptId}")
  29. List<SysDept> listChildrenDepts(@PathVariable(value = "deptId") Long deptId);
  30. @GetMapping("/dept/parentId/{parentId}")
  31. List<SysDept> getByParentId(@PathVariable("parentId") Long parentId);
  32. /**
  33. * 根据部门名称获取该用户属于哪一个部门(疫苗新增/修改时使用)
  34. * @param deptName
  35. * @return
  36. */
  37. @GetMapping("/dept/selectByDeptName/{deptName}")
  38. List<SysDept> selectByDeptName(@PathVariable("deptName") String deptName);
  39. /**
  40. * 根据区划id去找部门id(只适用于村级以上的部门查询)
  41. * @param areaId
  42. * @return
  43. */
  44. @GetMapping("/dept/selectByAreaId/{areaId}")
  45. List<SysDept> selectByAreaId(@PathVariable("areaId") String areaId);
  46. }