新增查询挡墙部门直属下级部门(没有下级部门返回当前部门)接口
This commit is contained in:
@@ -18,7 +18,9 @@ import java.util.List;
|
||||
* @date 2022/1/11
|
||||
* 部门相关业务对外接口
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.USER, path = "/dept", fallbackFactory = DeptFeignClientFallbackFactory.class)
|
||||
@FeignClient(value = ServerInfo.USER,
|
||||
// url = "http://127.0.0.1:10201",
|
||||
path = "/dept", fallbackFactory = DeptFeignClientFallbackFactory.class)
|
||||
public interface DeptFeignClient {
|
||||
|
||||
/**
|
||||
@@ -103,4 +105,14 @@ public interface DeptFeignClient {
|
||||
*/
|
||||
@GetMapping("/getRootDept")
|
||||
HttpResult<Dept> getRootDept();
|
||||
|
||||
/**
|
||||
* @Description: 获取当前部门的的下级子部门list,如果没子部门就是返回当前部门
|
||||
* @Param: [deptId]
|
||||
* @return: com.njcn.common.pojo.response.HttpResult<java.util.List<com.njcn.user.pojo.po.Dept>>
|
||||
* @Author: clam
|
||||
* @Date: 2023/1/10
|
||||
*/
|
||||
@GetMapping("/getDepSonDetailIdByDeptId")
|
||||
HttpResult<List<DeptDTO>> getDepSonDetailByDeptId(@RequestParam("deptId")String deptId) ;
|
||||
}
|
||||
|
||||
@@ -111,6 +111,12 @@ public class DeptFeignClientFallbackFactory implements FallbackFactory<DeptFeign
|
||||
log.error("{}异常,降级处理,异常为:{}","查询根部门异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
@Override
|
||||
public HttpResult<List<DeptDTO>> getDepSonDetailByDeptId(String deptId) {
|
||||
log.error("{}异常,降级处理,异常为:{}","查询前部门的的下级子部门list,(如果没子部门就是返回当前部门)",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user