1.app远程接口代码提交

This commit is contained in:
wr
2023-11-09 16:49:02 +08:00
parent 2f674a1f53
commit b657c31e4b
35 changed files with 598 additions and 14 deletions

View File

@@ -125,4 +125,12 @@ public interface DeptFeignClient {
*/
@GetMapping("/getDepSonDetailIdByDeptId")
HttpResult<List<DeptDTO>> getDepSonDetailByDeptId(@RequestParam("deptId") String deptId);
/**
* 根据部门id查询当前部门所有父级部门id
* @param deptId
* @return
*/
@GetMapping("/getUpByDeptIds")
HttpResult<List<String>> getUpByDeptIds(@RequestParam("deptId") String deptId);
}

View File

@@ -64,4 +64,12 @@ public interface UserFeignClient {
*/
@PostMapping("/userByIdList")
HttpResult<List<User>> getUserByIdList(@RequestBody List<String> ids);
/**
* 根据部门ids查询用户信息
* @param deptId
* @return
*/
@GetMapping("/getUserByDeptIds")
HttpResult<List<User>> getUserByDeptIds(@RequestBody List<String> deptId);
}

View File

@@ -122,6 +122,12 @@ public class DeptFeignClientFallbackFactory implements FallbackFactory<DeptFeign
log.error("{}异常,降级处理,异常为:{}","查询前部门的的下级子部门list(如果没子部门就是返回当前部门)",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<String>> getUpByDeptIds(String deptId) {
log.error("{}异常,降级处理,异常为:{}","根据部门id查询当前部门所有父级部门id",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}

View File

@@ -66,6 +66,12 @@ public class UserFeignClientFallbackFactory implements FallbackFactory<UserFeign
log.error("{}异常,降级处理,异常为:{}","根据用户id集合查询用户信息",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<User>> getUserByDeptIds(List<String> deptId) {
log.error("{}异常,降级处理,异常为:{}","根据部门ids查询用户信息",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}