public ActionResult _ListUsersTags(string spaceKey) { //取所有用户标签 TagService tagService = new TagService(TenantTypeIds.Instance().User()); IDictionary<TagGroup, List<string>> tagsInGroupDict = new Dictionary<TagGroup, List<string>>(); IEnumerable<TagGroup> tagGroups = tagService.GetGroups(); if (tagGroups != null) { foreach (TagGroup tagGroup in tagGroups) { tagsInGroupDict[tagGroup] = tagService.GetTopTagsOfGroup(tagGroup.GroupId, 20).ToList(); } } int count = userProfileSettings.MaxPersonTag; if (tagGroups != null) ViewData["tagGroupsCount"] = tagGroups.ToList().Count; ViewData["count"] = count; return View(tagsInGroupDict); }