|
@@ -517,8 +517,24 @@ namespace TEAMModelOS.Controllers
|
|
|
var client = _azureCosmos.GetCosmosClient();
|
|
|
if (!json.TryGetProperty("ids", out JsonElement ids)) return BadRequest();
|
|
|
json.TryGetProperty("schoolId", out JsonElement schoolId);
|
|
|
+ json.TryGetProperty("groupNames", out JsonElement groupNames);
|
|
|
+ List<Dictionary<string, List<string>>> groupLists = null;
|
|
|
+ if (groupNames.ValueKind.Equals(JsonValueKind.Array)) {
|
|
|
+ groupLists = groupNames.ToObject<List<Dictionary<string, List<string>>>>();
|
|
|
+ }
|
|
|
+ List<(string pId, List<string> gid)> ps = new List<(string pId, List<string> gid)>();
|
|
|
+ if ( groupLists.Count > 0)
|
|
|
+ {
|
|
|
+ foreach (var gp in groupLists)
|
|
|
+ {
|
|
|
+ foreach (KeyValuePair<string, List<string>> pp in gp)
|
|
|
+ {
|
|
|
+ ps.Add((pp.Key, pp.Value));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
List<string> listids = ids.ToObject<List<string>>();
|
|
|
- (List < RMember > members,List < RGroupList > groups) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, listids, $"{schoolId}");
|
|
|
+ (List < RMember > members,List < RGroupList > groups) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, listids, $"{schoolId}", ps);
|
|
|
return Ok(new { groups, members });
|
|
|
}
|
|
|
/// <summary>
|