|
@@ -40,9 +40,12 @@ namespace TEAMModelOS.Controllers
|
|
|
private readonly NotificationService _notificationService;
|
|
|
private readonly AzureServiceBusFactory _azureServiceBus;
|
|
|
private readonly CoreAPIHttpService _coreAPIHttpService;
|
|
|
- public SchoolTeacherController(CoreAPIHttpService coreAPIHttpService,AzureServiceBusFactory azureServiceBus,AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage, IOptionsSnapshot<Option> option, IConfiguration configuration, NotificationService notificationService)
|
|
|
+
|
|
|
+ private readonly DingDing _dingDing;
|
|
|
+ public SchoolTeacherController(DingDing dingDing,CoreAPIHttpService coreAPIHttpService,AzureServiceBusFactory azureServiceBus,AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage, IOptionsSnapshot<Option> option, IConfiguration configuration, NotificationService notificationService)
|
|
|
{
|
|
|
- _azureCosmos = azureCosmos;
|
|
|
+ _dingDing=dingDing;
|
|
|
+ _azureCosmos = azureCosmos;
|
|
|
_azureStorage = azureStorage;
|
|
|
_option = option?.Value;
|
|
|
_configuration = configuration;
|
|
@@ -67,109 +70,90 @@ namespace TEAMModelOS.Controllers
|
|
|
//string status_str = (request.TryGetProperty("join_status", out JsonElement status_json)) ? status_json.ToString() : "join";
|
|
|
//資料取得
|
|
|
List<ScTeacher> teachers = new List<ScTeacher>();
|
|
|
- await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<ScTeacher>
|
|
|
- (queryText: $"SELECT c.subjectIds, c.id, c.name, c.picture ,c.status, c.job, c.createTime, ARRAY_LENGTH(c.permissions) as permissionCount,c.permissions,c.roles , c.size FROM c",
|
|
|
+ try {
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<ScTeacher>
|
|
|
+ (queryText: $"SELECT c.subjectIds, c.id, c.name, c.picture ,c.status, c.job, c.createTime, ARRAY_LENGTH(c.permissions) as permissionCount,c.permissions,c.roles , c.size FROM c",
|
|
|
requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Teacher-{school_code}") }))
|
|
|
- {
|
|
|
- if ($"{item.createTime}".Length > 10) {
|
|
|
- item.createTime = item.createTime / 1000;
|
|
|
- }
|
|
|
- teachers.Add(item);
|
|
|
- }
|
|
|
-
|
|
|
- if (teachers.IsNotEmpty()) {
|
|
|
- List<IdNameCode> groupLists = new List<IdNameCode>();
|
|
|
- await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<IdNameCode>
|
|
|
- (queryText: $"SELECT c.id, c.name, m.id as code FROM c join m in c.members where c.type='research' and m.id in ({string.Join(",",teachers.Select(x=>$"'{x.id}'"))}) ",
|
|
|
- requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"GroupList-{school_code}") }))
|
|
|
- {
|
|
|
- groupLists.Add(item);
|
|
|
- }
|
|
|
- if (groupLists.IsNotEmpty()) {
|
|
|
- teachers.ForEach(x => {
|
|
|
- List<IdNameCode> codes = groupLists.FindAll(g => g.code.Equals(x.id));
|
|
|
- if (codes.IsNotEmpty())
|
|
|
- {
|
|
|
- x.groups = codes;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- Azure.Response response = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).ReadItemStreamAsync($"{school_code}", new PartitionKey("TeacherImport"));
|
|
|
- IEnumerable<string> ids =null;
|
|
|
- List<CoreUser> coreUsers = new List<CoreUser>();
|
|
|
- if (response.Status == 200) {
|
|
|
- TeacherImport teacherImport = JsonDocument.Parse(response.Content).RootElement.ToObject<TeacherImport>();
|
|
|
- var idsIn = teacherImport.teachers.Where(x => !string.IsNullOrWhiteSpace(x.id));
|
|
|
- //id是空 其他不是空的
|
|
|
- var tmdidsi = teacherImport.teachers.Where(x => string.IsNullOrWhiteSpace(x.id) && !string.IsNullOrWhiteSpace(x.tmdid)).Select(z => z.tmdid);
|
|
|
- var phonesi = teacherImport.teachers.Where(x => string.IsNullOrWhiteSpace(x.id) && !string.IsNullOrWhiteSpace(x.phone)).Select(z => z.phone);
|
|
|
- var emailsi = teacherImport.teachers.Where(x => string.IsNullOrWhiteSpace(x.id) && !string.IsNullOrWhiteSpace(x.email)).Select(z => z.email);
|
|
|
- List<string> skeys = new List<string>();
|
|
|
- if (idsIn.Any()) {
|
|
|
- skeys.AddRange(idsIn.Select(x=>x.id));
|
|
|
- }
|
|
|
- if (tmdidsi.Any())
|
|
|
- {
|
|
|
- skeys.AddRange(tmdidsi);
|
|
|
- }
|
|
|
- if (phonesi.Any())
|
|
|
{
|
|
|
- skeys.AddRange(phonesi);
|
|
|
- }
|
|
|
- if (emailsi.Any())
|
|
|
- {
|
|
|
- skeys.AddRange(emailsi);
|
|
|
+ if ($"{item.createTime}".Length > 10)
|
|
|
+ {
|
|
|
+ item.createTime = item.createTime / 1000;
|
|
|
+ }
|
|
|
+ teachers.Add(item);
|
|
|
}
|
|
|
- if (skeys.Any())
|
|
|
+
|
|
|
+ if (teachers.IsNotEmpty())
|
|
|
{
|
|
|
- try
|
|
|
+ List<IdNameCode> groupLists = new List<IdNameCode>();
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<IdNameCode>
|
|
|
+ (queryText: $"SELECT c.id, c.name, m.id as code FROM c join m in c.members where c.type='research' and m.id in ({string.Join(",", teachers.Select(x => $"'{x.id}'"))}) ",
|
|
|
+ requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"GroupList-{school_code}") }))
|
|
|
{
|
|
|
- var content = new StringContent(skeys.ToJsonString(), Encoding.UTF8, "application/json");
|
|
|
- string json = await _coreAPIHttpService.GetUserInfos(content);
|
|
|
- if (!string.IsNullOrWhiteSpace(json))
|
|
|
- {
|
|
|
- coreUsers = json.ToObject<List<CoreUser>>();
|
|
|
- ids = coreUsers.Select(x => x.id);
|
|
|
- }
|
|
|
+ groupLists.Add(item);
|
|
|
}
|
|
|
- catch (Exception ex)
|
|
|
+ if (groupLists.IsNotEmpty())
|
|
|
{
|
|
|
- //await _dingDing.SendBotMsg($"{_option.Location},导入名单时,查验key信息错误{ex.Message}\n{ex.StackTrace}\n{skeys.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
|
|
|
+ teachers.ForEach(x => {
|
|
|
+ List<IdNameCode> codes = groupLists.FindAll(g => g.code.Equals(x.id));
|
|
|
+ if (codes.IsNotEmpty())
|
|
|
+ {
|
|
|
+ x.groups = codes;
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
- if (coreUsers.Any())
|
|
|
+ Azure.Response response = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).ReadItemStreamAsync($"{school_code}", new PartitionKey("TeacherImport"));
|
|
|
+ IEnumerable<string> ids = null;
|
|
|
+ List<CoreUser> coreUsers = new List<CoreUser>();
|
|
|
+ if (response.Status == 200)
|
|
|
{
|
|
|
- teacherImport.teachers.ForEach(t =>
|
|
|
+ TeacherImport teacherImport = JsonDocument.Parse(response.Content).RootElement.ToObject<TeacherImport>();
|
|
|
+ var idsIn = teacherImport.teachers.Where(x => !string.IsNullOrWhiteSpace(x.id));
|
|
|
+ //id是空 其他不是空的
|
|
|
+ var tmdidsi = teacherImport.teachers.Where(x => string.IsNullOrWhiteSpace(x.id) && !string.IsNullOrWhiteSpace(x.tmdid)).Select(z => z.tmdid);
|
|
|
+ var phonesi = teacherImport.teachers.Where(x => string.IsNullOrWhiteSpace(x.id) && !string.IsNullOrWhiteSpace(x.phone)).Select(z => z.phone);
|
|
|
+ var emailsi = teacherImport.teachers.Where(x => string.IsNullOrWhiteSpace(x.id) && !string.IsNullOrWhiteSpace(x.email)).Select(z => z.email);
|
|
|
+ List<string> skeys = new List<string>();
|
|
|
+ if (idsIn.Any())
|
|
|
+ {
|
|
|
+ skeys.AddRange(idsIn.Select(x => x.id));
|
|
|
+ }
|
|
|
+ if (tmdidsi.Any())
|
|
|
+ {
|
|
|
+ skeys.AddRange(tmdidsi);
|
|
|
+ }
|
|
|
+ if (phonesi.Any())
|
|
|
+ {
|
|
|
+ skeys.AddRange(phonesi);
|
|
|
+ }
|
|
|
+ if (emailsi.Any())
|
|
|
{
|
|
|
- if (!string.IsNullOrWhiteSpace(t.id))
|
|
|
+ skeys.AddRange(emailsi);
|
|
|
+ }
|
|
|
+ if (skeys.Any())
|
|
|
+ {
|
|
|
+ try
|
|
|
{
|
|
|
- CoreUser coreUser = coreUsers.Find(x => x.searchKey.Equals(t.id) || x.id.Equals(t.id));
|
|
|
- if (coreUser != null)
|
|
|
- {
|
|
|
- t.id = coreUser.id;
|
|
|
- t.name = coreUser.name;
|
|
|
- t.picture = coreUser.picture;
|
|
|
- t.tmdid = coreUser.id;
|
|
|
- if (!string.IsNullOrWhiteSpace(coreUser.mobile))
|
|
|
- {
|
|
|
- t.phone = coreUser.mobile;
|
|
|
- }
|
|
|
- if (!string.IsNullOrWhiteSpace(coreUser.mail))
|
|
|
- {
|
|
|
- t.email = coreUser.mail;
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
+ var content = new StringContent(skeys.ToJsonString(), Encoding.UTF8, "application/json");
|
|
|
+ string json = await _coreAPIHttpService.GetUserInfos(content);
|
|
|
+ if (!string.IsNullOrWhiteSpace(json))
|
|
|
{
|
|
|
- t.id = null;
|
|
|
+ coreUsers = json.ToObject<List<CoreUser>>();
|
|
|
+ ids = coreUsers.Select(x => x.id);
|
|
|
}
|
|
|
}
|
|
|
- if (string.IsNullOrWhiteSpace(t.id))
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ //await _dingDing.SendBotMsg($"{_option.Location},导入名单时,查验key信息错误{ex.Message}\n{ex.StackTrace}\n{skeys.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (coreUsers.Any())
|
|
|
+ {
|
|
|
+ teacherImport.teachers.ForEach(t =>
|
|
|
{
|
|
|
- if (!string.IsNullOrWhiteSpace(t.tmdid))
|
|
|
+ if (!string.IsNullOrWhiteSpace(t.id))
|
|
|
{
|
|
|
- CoreUser coreUser = coreUsers.Find(x => x.id.Equals(t.tmdid));
|
|
|
+ CoreUser coreUser = coreUsers.Find(x => x.searchKey.Equals(t.id) || x.id.Equals(t.id));
|
|
|
if (coreUser != null)
|
|
|
{
|
|
|
t.id = coreUser.id;
|
|
@@ -185,12 +169,16 @@ namespace TEAMModelOS.Controllers
|
|
|
t.email = coreUser.mail;
|
|
|
}
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ t.id = null;
|
|
|
+ }
|
|
|
}
|
|
|
if (string.IsNullOrWhiteSpace(t.id))
|
|
|
{
|
|
|
- if (!string.IsNullOrWhiteSpace(t.phone))
|
|
|
+ if (!string.IsNullOrWhiteSpace(t.tmdid))
|
|
|
{
|
|
|
- CoreUser coreUser = coreUsers.Find(x => x.mobile.Equals(t.phone));
|
|
|
+ CoreUser coreUser = coreUsers.Find(x => x.id.Equals(t.tmdid));
|
|
|
if (coreUser != null)
|
|
|
{
|
|
|
t.id = coreUser.id;
|
|
@@ -207,41 +195,93 @@ namespace TEAMModelOS.Controllers
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- if (string.IsNullOrWhiteSpace(t.id))
|
|
|
- {
|
|
|
- if (!string.IsNullOrWhiteSpace(t.email))
|
|
|
+ if (string.IsNullOrWhiteSpace(t.id))
|
|
|
{
|
|
|
- CoreUser coreUser = coreUsers.Find(x =>!string.IsNullOrWhiteSpace(x.mail) && x.mail.Equals(t.email));
|
|
|
- if (coreUser != null)
|
|
|
+ if (!string.IsNullOrWhiteSpace(t.phone))
|
|
|
{
|
|
|
- t.id = coreUser.id;
|
|
|
- t.name = coreUser.name;
|
|
|
- t.picture = coreUser.picture;
|
|
|
- t.tmdid = coreUser.id;
|
|
|
- if (!string.IsNullOrWhiteSpace(coreUser.mobile))
|
|
|
+ CoreUser coreUser = coreUsers.Find(x => x.mobile.Equals(t.phone));
|
|
|
+ if (coreUser != null)
|
|
|
{
|
|
|
- t.phone = coreUser.mobile;
|
|
|
+ t.id = coreUser.id;
|
|
|
+ t.name = coreUser.name;
|
|
|
+ t.picture = coreUser.picture;
|
|
|
+ t.tmdid = coreUser.id;
|
|
|
+ if (!string.IsNullOrWhiteSpace(coreUser.mobile))
|
|
|
+ {
|
|
|
+ t.phone = coreUser.mobile;
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrWhiteSpace(coreUser.mail))
|
|
|
+ {
|
|
|
+ t.email = coreUser.mail;
|
|
|
+ }
|
|
|
}
|
|
|
- if (!string.IsNullOrWhiteSpace(coreUser.mail))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (string.IsNullOrWhiteSpace(t.id))
|
|
|
+ {
|
|
|
+ if (!string.IsNullOrWhiteSpace(t.email))
|
|
|
+ {
|
|
|
+ CoreUser coreUser = coreUsers.Find(x => !string.IsNullOrWhiteSpace(x.mail) && x.mail.Equals(t.email));
|
|
|
+ if (coreUser != null)
|
|
|
{
|
|
|
- t.email = coreUser.mail;
|
|
|
+ t.id = coreUser.id;
|
|
|
+ t.name = coreUser.name;
|
|
|
+ t.picture = coreUser.picture;
|
|
|
+ t.tmdid = coreUser.id;
|
|
|
+ if (!string.IsNullOrWhiteSpace(coreUser.mobile))
|
|
|
+ {
|
|
|
+ t.phone = coreUser.mobile;
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrWhiteSpace(coreUser.mail))
|
|
|
+ {
|
|
|
+ t.email = coreUser.mail;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- if (!string.IsNullOrWhiteSpace(t.id))
|
|
|
- {
|
|
|
- var tch = teachers.Find(x => x.id.Equals(t.id));
|
|
|
- if (tch == null)
|
|
|
+ if (!string.IsNullOrWhiteSpace(t.id))
|
|
|
+ {
|
|
|
+ var tch = teachers.Find(x => x.id.Equals(t.id));
|
|
|
+ if (tch == null)
|
|
|
+ {
|
|
|
+ tch = new ScTeacher
|
|
|
+ {
|
|
|
+ id = t.id,
|
|
|
+ iname = t.iname,
|
|
|
+ name = t.name,
|
|
|
+ picture = t.picture,
|
|
|
+ status = "import",
|
|
|
+ createTime = t.time,
|
|
|
+ permissionCount = 0,
|
|
|
+ size = 0,
|
|
|
+ permissions = new List<string>(),
|
|
|
+ roles = new List<string>(),
|
|
|
+ subjectIds = new List<string>(),
|
|
|
+ groups = new List<IdNameCode>(),
|
|
|
+ note = t.note,
|
|
|
+ phone = t.phone,
|
|
|
+ email = t.email,
|
|
|
+ };
|
|
|
+ teachers.Add(tch);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ tch.iname = t.iname;
|
|
|
+ tch.note = t.note;
|
|
|
+ tch.phone = t.phone;
|
|
|
+ tch.email = t.email;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
- tch = new ScTeacher
|
|
|
+ //teachers.Add();
|
|
|
+ var tch = new ScTeacher
|
|
|
{
|
|
|
id = t.id,
|
|
|
+ picture = t.picture,
|
|
|
iname = t.iname,
|
|
|
name = t.name,
|
|
|
- picture = t.picture,
|
|
|
status = "import",
|
|
|
createTime = t.time,
|
|
|
permissionCount = 0,
|
|
@@ -256,18 +296,15 @@ namespace TEAMModelOS.Controllers
|
|
|
};
|
|
|
teachers.Add(tch);
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- tch.iname = t.iname;
|
|
|
- tch.note = t.note;
|
|
|
- tch.phone = t.phone;
|
|
|
- tch.email = t.email;
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
+ });
|
|
|
+ await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).ReplaceItemAsync(teacherImport, $"{school_code}", new PartitionKey("TeacherImport"));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var noids = teacherImport.teachers.Where(x => string.IsNullOrWhiteSpace(x.id));
|
|
|
+ foreach (var t in noids)
|
|
|
{
|
|
|
- //teachers.Add();
|
|
|
- var tch = new ScTeacher
|
|
|
+ teachers.Add(new ScTeacher
|
|
|
{
|
|
|
id = t.id,
|
|
|
picture = t.picture,
|
|
@@ -284,70 +321,49 @@ namespace TEAMModelOS.Controllers
|
|
|
note = t.note,
|
|
|
phone = t.phone,
|
|
|
email = t.email,
|
|
|
- };
|
|
|
- teachers.Add(tch);
|
|
|
+ });
|
|
|
}
|
|
|
- });
|
|
|
- await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).ReplaceItemAsync(teacherImport, $"{school_code}", new PartitionKey("TeacherImport"));
|
|
|
+ }
|
|
|
}
|
|
|
- else {
|
|
|
- var noids = teacherImport.teachers.Where(x => string.IsNullOrWhiteSpace(x.id));
|
|
|
- foreach (var t in noids)
|
|
|
+ IEnumerable<string> coreids = null;
|
|
|
+ coreids = teachers.Where(z => !string.IsNullOrWhiteSpace(z.id)).Select(x => x.id);
|
|
|
+ List<CoreUser> users = new List<CoreUser>();
|
|
|
+ if (coreids != null && coreids.Any())
|
|
|
+ {
|
|
|
+ try
|
|
|
{
|
|
|
- teachers.Add(new ScTeacher
|
|
|
+ var content = new StringContent(coreids.ToJsonString(), Encoding.UTF8, "application/json");
|
|
|
+ string json = await _coreAPIHttpService.GetUserInfos(content);
|
|
|
+ if (!string.IsNullOrWhiteSpace(json))
|
|
|
{
|
|
|
- id = t.id,
|
|
|
- picture = t.picture,
|
|
|
- iname = t.iname,
|
|
|
- name = t.name,
|
|
|
- status = "import",
|
|
|
- createTime = t.time,
|
|
|
- permissionCount = 0,
|
|
|
- size = 0,
|
|
|
- permissions = new List<string>(),
|
|
|
- roles = new List<string>(),
|
|
|
- subjectIds = new List<string>(),
|
|
|
- groups = new List<IdNameCode>(),
|
|
|
- note = t.note,
|
|
|
- phone = t.phone,
|
|
|
- email = t.email,
|
|
|
- });
|
|
|
+ users = json.ToObject<List<CoreUser>>();
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
- IEnumerable<string> coreids = null;
|
|
|
- coreids = teachers.Where(z => !string.IsNullOrWhiteSpace(z.id)).Select(x => x.id);
|
|
|
- List<CoreUser> users = new List<CoreUser>();
|
|
|
- if (coreids != null && coreids.Any()) {
|
|
|
- try
|
|
|
- {
|
|
|
- var content = new StringContent(coreids.ToJsonString(), Encoding.UTF8, "application/json");
|
|
|
- string json = await _coreAPIHttpService.GetUserInfos(content);
|
|
|
- if (!string.IsNullOrWhiteSpace(json))
|
|
|
+ catch (Exception ex)
|
|
|
{
|
|
|
- users = json.ToObject<List<CoreUser>>();
|
|
|
+ //await _dingDing.SendBotMsg($"{_option.Location},导入名单时,查验key信息错误{ex.Message}\n{ex.StackTrace}\n{skeys.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
|
|
|
}
|
|
|
}
|
|
|
- catch (Exception ex)
|
|
|
+ if (users.Any())
|
|
|
{
|
|
|
- //await _dingDing.SendBotMsg($"{_option.Location},导入名单时,查验key信息错误{ex.Message}\n{ex.StackTrace}\n{skeys.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
|
|
|
- }
|
|
|
- }
|
|
|
- if (users.Any()) {
|
|
|
- teachers.ForEach(x => {
|
|
|
- if (!string.IsNullOrWhiteSpace(x.id)) {
|
|
|
- CoreUser coreUser = users.Find(u => u.id.Equals(x.id));
|
|
|
- if (coreUser != null)
|
|
|
- {
|
|
|
- x.phone = coreUser.mobile;
|
|
|
- x.email = coreUser.mail;
|
|
|
- }
|
|
|
- else
|
|
|
+ teachers.ForEach(x => {
|
|
|
+ if (!string.IsNullOrWhiteSpace(x.id))
|
|
|
{
|
|
|
- x.status = "delete";
|
|
|
+ CoreUser coreUser = users.Find(u => u.id.Equals(x.id));
|
|
|
+ if (coreUser != null)
|
|
|
+ {
|
|
|
+ x.phone = coreUser.mobile;
|
|
|
+ x.email = coreUser.mail;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ x.status = "delete";
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } catch (Exception ex) {
|
|
|
+ await _dingDing.SendBotMsg($"{_option.Location},{ex.Message}\n{ex.StackTrace}", GroupNames.醍摩豆服務運維群組);
|
|
|
}
|
|
|
return Ok(new { teachers });
|
|
|
}
|