Commit ca55bfb0 by chenweisong

更新

parent 235ee9b5
...@@ -34,13 +34,25 @@ public class UserController { ...@@ -34,13 +34,25 @@ public class UserController {
return users; return users;
} }
@ApiOperation(value = "根据组织id获取用户组", hidden = true) @ApiOperation(value = "根据组织id获取用户组")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "orgId", value = "机构id", paramType = "query", required = true, dataType = "long") @ApiImplicitParam(name = "orgId", value = "机构id", paramType = "query", required = true, dataType = "long")
}) })
@GetMapping(value = "/groups") @GetMapping(value = "/userGroups")
public List<Map> getUserGroups(long orgId) { public List<Map> getUserGroups(long orgId) {
List<Map> userGroups = feignAuthService.getUserGroups(0, orgId); List<Map> userGroups = feignAuthService.getUserGroups(0, orgId);
userGroups.forEach(group -> {
long groupId = Long.parseLong(group.get("id").toString());
List<Map> users = feignAuthService.getGroupUsers(0L, groupId);
List<Map> groupSubNodes = new ArrayList<>();
users.forEach(user -> {
Map node = new HashMap();
long userId = Long.parseLong(user.get("id").toString());
node.put("node", ImmutableMap.of("id", userId, "name", user.get("name").toString(), "orgId", orgId));
groupSubNodes.add(node);
});
group.put("subNodes", groupSubNodes);
});
return userGroups; return userGroups;
} }
...@@ -56,16 +68,16 @@ public class UserController { ...@@ -56,16 +68,16 @@ public class UserController {
/** /**
* tree structure * tree structure
* * <p>
* { * {
* node: {}, * node: {},
* subNodes: [ * subNodes: [
* { * {
* node: {}, * node: {},
* subNodes: * subNodes:
* [] * []
* } * }
* ] * ]
* } * }
*/ */
@ApiOperation(value = "获取补录范围用户树") @ApiOperation(value = "获取补录范围用户树")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment