同步用户并构建上级链条

This commit is contained in:
2026-05-19 17:56:46 +08:00
parent 893af21ce2
commit 1313269710
10 changed files with 338 additions and 14 deletions

View File

@@ -108,4 +108,16 @@ public class LbDepartmentUserController {
}
return ResponseEntity.badRequest().body(result);
}
@PostMapping("/syncFromLbUser")
@Operation(summary = "从lb_user同步到部门用户并构建上级链条")
public ResponseEntity<Map<String, Object>> syncFromLbUser(
@Parameter(description = "租户id", required = true) @RequestParam String tenantId) {
Map<String, Object> result = lbDepartmentUserService.syncFromLbUser(tenantId);
Boolean success = (Boolean) result.get("success");
if (success != null && success) {
return ResponseEntity.ok(result);
}
return ResponseEntity.badRequest().body(result);
}
}