|
@@ -36,8 +36,9 @@ namespace TEAMModelOS.Controllers
|
|
private readonly Option _option;
|
|
private readonly Option _option;
|
|
private readonly AzureStorageFactory _azureStorage;
|
|
private readonly AzureStorageFactory _azureStorage;
|
|
private readonly AzureRedisFactory _azureRedis;
|
|
private readonly AzureRedisFactory _azureRedis;
|
|
|
|
+ private readonly CoreAPIHttpService _coreAPIHttpService;
|
|
public IConfiguration _configuration { get; set; }
|
|
public IConfiguration _configuration { get; set; }
|
|
- public AreaController(AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing,
|
|
|
|
|
|
+ public AreaController(CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing,
|
|
IOptionsSnapshot<Option> option, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis, IConfiguration configuration)
|
|
IOptionsSnapshot<Option> option, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis, IConfiguration configuration)
|
|
{
|
|
{
|
|
_azureCosmos = azureCosmos;
|
|
_azureCosmos = azureCosmos;
|
|
@@ -48,6 +49,7 @@ namespace TEAMModelOS.Controllers
|
|
_azureStorage = azureStorage;
|
|
_azureStorage = azureStorage;
|
|
_azureRedis = azureRedis;
|
|
_azureRedis = azureRedis;
|
|
_configuration = configuration;
|
|
_configuration = configuration;
|
|
|
|
+ _coreAPIHttpService = coreAPIHttpService;
|
|
}
|
|
}
|
|
|
|
|
|
/// <param name="request"></param>
|
|
/// <param name="request"></param>
|
|
@@ -451,7 +453,7 @@ namespace TEAMModelOS.Controllers
|
|
{
|
|
{
|
|
var sJson = await JsonDocument.ParseAsync(aresponse.ContentStream);
|
|
var sJson = await JsonDocument.ParseAsync(aresponse.ContentStream);
|
|
Study study = sJson.ToObject<Study>();
|
|
Study study = sJson.ToObject<Study>();
|
|
- (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, study.tchLists, study.school);
|
|
|
|
|
|
+ (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, study.tchLists, study.school);
|
|
teac = tchList;
|
|
teac = tchList;
|
|
var query = $"select value(c) from c where c.pId = '{id}'";
|
|
var query = $"select value(c) from c where c.pId = '{id}'";
|
|
foreach ((string code, string name) in baseIds)
|
|
foreach ((string code, string name) in baseIds)
|
|
@@ -614,7 +616,7 @@ namespace TEAMModelOS.Controllers
|
|
{
|
|
{
|
|
JsonElement account = accounts.Current;
|
|
JsonElement account = accounts.Current;
|
|
List<string> tcs = account.GetProperty("tchLists").ToObject<List<string>>();
|
|
List<string> tcs = account.GetProperty("tchLists").ToObject<List<string>>();
|
|
- (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, tcs, code);
|
|
|
|
|
|
+ (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, tcs, code);
|
|
// (List<TmdInfo> tmdInfos, List<ClassListInfo> classInfos) = await TriggerStuActivity.GetTchList(client, _dingDing, ids, $"{school}");
|
|
// (List<TmdInfo> tmdInfos, List<ClassListInfo> classInfos) = await TriggerStuActivity.GetTchList(client, _dingDing, ids, $"{school}");
|
|
//(List<TmdInfo> tchList, _) = await TriggerStuActivity.GetTchList(client, _dingDing, tcs, code);
|
|
//(List<TmdInfo> tchList, _) = await TriggerStuActivity.GetTchList(client, _dingDing, tcs, code);
|
|
recordUrl.Add((code, name, account.GetProperty("recordUrl").GetString(), tchList.Count));
|
|
recordUrl.Add((code, name, account.GetProperty("recordUrl").GetString(), tchList.Count));
|
|
@@ -707,7 +709,7 @@ namespace TEAMModelOS.Controllers
|
|
{
|
|
{
|
|
JsonElement account = accounts.Current;
|
|
JsonElement account = accounts.Current;
|
|
List<string> tcs = account.GetProperty("tchLists").ToObject<List<string>>();
|
|
List<string> tcs = account.GetProperty("tchLists").ToObject<List<string>>();
|
|
- (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, tcs, code);
|
|
|
|
|
|
+ (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, tcs, code);
|
|
// (List<TmdInfo> tmdInfos, List<ClassListInfo> classInfos) = await TriggerStuActivity.GetTchList(client, _dingDing, ids, $"{school}");
|
|
// (List<TmdInfo> tmdInfos, List<ClassListInfo> classInfos) = await TriggerStuActivity.GetTchList(client, _dingDing, ids, $"{school}");
|
|
//(List<TmdInfo> tchList, _) = await TriggerStuActivity.GetTchList(client, _dingDing, tcs, code);
|
|
//(List<TmdInfo> tchList, _) = await TriggerStuActivity.GetTchList(client, _dingDing, tcs, code);
|
|
|
|
|