构建用户树形结构

This commit is contained in:
2026-05-19 21:25:07 +08:00
parent 28c57666d7
commit e84ef0f244
4 changed files with 170 additions and 2 deletions

View File

@@ -120,4 +120,16 @@ public class LbDepartmentUserController {
}
return ResponseEntity.badRequest().body(result);
}
@GetMapping("/tree")
@Operation(summary = "部门用户树形结构")
public ResponseEntity<Map<String, Object>> tree(
@Parameter(description = "租户id", required = true) @RequestParam String tenantId) {
Map<String, Object> result = lbDepartmentUserService.getDepartmentUserTree(tenantId);
Boolean success = (Boolean) result.get("success");
if (success != null && success) {
return ResponseEntity.ok(result);
}
return ResponseEntity.badRequest().body(result);
}
}