部门代码调整 新增部门查询子部门接口

This commit is contained in:
2022-12-01 09:43:47 +08:00
parent af68a790d8
commit 7e3f51a44f
9 changed files with 63 additions and 2 deletions

View File

@@ -86,4 +86,10 @@ public interface DeptFeignClient {
@GetMapping("/getDepSonIdByDeptId")
HttpResult<List<String>> getDepSonIdByDeptId(@RequestParam("deptId") String deptId);
/**
* 根据部门id获取直接子部门及自身
*/
@GetMapping("/getDirectSonSelf")
HttpResult<List<Dept>> getDirectSonSelf(@RequestParam("deptId") String deptId);
}

View File

@@ -93,6 +93,12 @@ public class DeptFeignClientFallbackFactory implements FallbackFactory<DeptFeign
log.error("{}异常,降级处理,异常为:{}","查询所有子孙部门异常",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<Dept>> getDirectSonSelf(String deptId) {
log.error("{}异常,降级处理,异常为:{}","查询所有子部门以及自身异常",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}