HiITEdenX 2 роки тому
батько
коміт
7410d83479

+ 14 - 13
TEAMModelOS.SDK/DI/CoreAPI/CoreAPIHttpService.cs

@@ -49,23 +49,23 @@ namespace TEAMModelOS.SDK
     }
     public class CoreAPIHttpService
     {
-        private readonly IWebHostEnvironment _environment;
+        //private readonly IWebHostEnvironment _environment;
         public bool check=true;
         private SnowflakeId _snowflakeId;
         private readonly HttpClient _httpClient;
         public readonly IOptionsMonitor<CoreAPIHttpServiceOptions> options;
-        private readonly IConfiguration _configuration;
-        private readonly DI.DingDing _dingDing;
-        public readonly Option _option;
-        public CoreAPIHttpService(IOptionsSnapshot<Option> option, DingDing dingDing,IConfiguration configuration,HttpClient httpClient, IOptionsMonitor<CoreAPIHttpServiceOptions> optionsMonitor, IWebHostEnvironment environment,SnowflakeId snowflakeId)
+        //private readonly IConfiguration _configuration;
+       // private readonly DI.DingDing _dingDing;
+        //public readonly Option _option;
+        public CoreAPIHttpService(HttpClient httpClient, IOptionsMonitor<CoreAPIHttpServiceOptions> optionsMonitor,  SnowflakeId snowflakeId)
         {
             _httpClient = httpClient;
             options = optionsMonitor;
-            _environment = environment;
+            //_environment = environment;
             _snowflakeId= snowflakeId;
-            _option = option?.Value;
-            _configuration = configuration;
-            _dingDing = dingDing;
+            //_option = option?.Value;
+            //_configuration = configuration;
+            //_dingDing = dingDing;
 
         }
         /*
@@ -108,7 +108,8 @@ namespace TEAMModelOS.SDK
         /// <param name="_configuration"></param>
         /// <param name="_dingDing"></param>
         /// <returns></returns>
-        public   void PushNotify(List<IdNameCode> toTeachers ,  string notifyCode,string notifyType,Dictionary<string, object> replaceData) {
+        public   void PushNotify(List<IdNameCode> toTeachers ,  string notifyCode,string notifyType,Dictionary<string, object> replaceData, 
+            string location, IConfiguration _configuration, DI.DingDing _dingDing,string rootPath) {
             /*
              * IES5_Management  shift-assist_school  DelBeforeCopyAbility-mark_start  copyAbility-mark_finish  copyAbility-mark_start 
              *                  transfer-admin_school invite-join_school invite_school  request_school request-join_school remove_school  scan-join_school
@@ -126,17 +127,17 @@ namespace TEAMModelOS.SDK
                 "data":""action":{"type":"click\link","tokenbindtype":1,"url":"http://xxxx"}"
             }
             */
-            string lang = _option.Location.Contains("China") ? "zh-cn" : "en-us";
+            string lang = location.Contains("China") ? "zh-cn" : "en-us";
             toTeachers.FindAll(x => string.IsNullOrWhiteSpace(x.code)||(!x.code.Equals("zh-cn")&& !x.code.Equals("zh-tw")&& !x.code.Equals("en-us"))).ForEach(x => { x.code = lang; });
             var groups = toTeachers.GroupBy(x => x.code).Select(x => new { x.Key, list = x.ToList() });
             var clientID = _configuration.GetValue<string>("HaBookAuth:CoreService:clientID");
             var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
             var url = _configuration.GetValue<string>("HaBookAuth:CoreAPI");
-            var token = CoreTokenExtensions.CreateAccessToken(clientID, clientSecret,_option.Location).Result;
+            var token = CoreTokenExtensions.CreateAccessToken(clientID, clientSecret,location).Result;
             _httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {token.AccessToken}");
             foreach (var group in groups)
             {
-                string path = $"{_environment.ContentRootPath}/Lang/{group.Key}.json";
+                string path = $"{rootPath}/Lang/{group.Key}.json";
                 var sampleJson = File.ReadAllBytes(path).AsSpan();
                 Utf8JsonReader reader = new Utf8JsonReader(sampleJson);
                 if (JsonDocument.TryParseValue(ref reader, out JsonDocument jsonDoc) && jsonDoc.RootElement.TryGetProperty(notifyCode, out JsonElement json )) {

+ 14 - 0
TEAMModelOS/Controllers/Client/HiTAControlller.cs

@@ -20,6 +20,7 @@ using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.DI.CoreAPI;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Models;
+using TEAMModelOS.SDK.Models.Dtos;
 using TEAMModelOS.SDK.Models.Service;
 using TEAMModelOS.SDK.Services;
 using static TEAMModelOS.SDK.Services.BlobService;
@@ -40,7 +41,9 @@ namespace TEAMModelOS.Controllers.Client
         private readonly NotificationService _notificationService;
         private readonly IPSearcher _searcher;
         private readonly HttpTrigger _httpTrigger;
+        private readonly CoreAPIHttpService _coreAPIHttpService;
         public HiTAControlller(
+            CoreAPIHttpService coreAPIHttpService,
             AzureStorageFactory azureStorage,
             AzureRedisFactory azureRedis,
             AzureCosmosFactory azureCosmos,
@@ -58,6 +61,7 @@ namespace TEAMModelOS.Controllers.Client
             _notificationService = notificationService;
             _searcher = searcher;
             _httpTrigger = httpTrigger;
+            _coreAPIHttpService = coreAPIHttpService;
         }
 
         public class HiTAJoinSchool
@@ -212,6 +216,16 @@ namespace TEAMModelOS.Controllers.Client
             var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
             var location = _option.Location;
             var code = await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
+
+            string tsql = $"select c.id, c.name ,c.lang as code from c where c.id in ({string.Join(",", ids.Select(x => $"'{x}'"))})";
+            List<IdNameCode> idNameCodes = new List<IdNameCode>();
+            await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher)
+                .GetItemQueryIterator<IdNameCode>(queryText: tsql, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey("Base") }))
+            {
+                idNameCodes.Add(item);
+            }
+            _coreAPIHttpService.PushNotify(idNameCodes, $"{bizcode}_school", Constant.NotifyType_IES5_Management,
+                      new Dictionary<string, object> { { "tmdname", name }, { "schooName", schoolInfo.name } }, _option.Location, _configuration, _dingDing);
             return Ok(new { schoolTeacher.roles, schoolTeacher.status, school = $"{school}", schoolInfo.name, schoolInfo.picture });
         }
 

+ 19 - 0
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -29,6 +29,7 @@ using HTEXLib.COMM.Helpers;
 using Microsoft.AspNetCore.Authorization;
 using System.Net.Http;
 using TEAMModelOS.SDK.DI.CoreAPI;
+using TEAMModelOS.SDK.Models.Dtos;
 
 namespace TEAMModelOS.Controllers
 {
@@ -2895,6 +2896,15 @@ namespace TEAMModelOS.Controllers
                                         var location = _option.Location;
                                         await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
                                         await client.GetContainer(Constant.TEAMModelOS, "Teacher").ReplaceItemAsync(scoring, scoring.id, new PartitionKey(scoring.code));
+                                        string sql = $"select c.id, c.name ,c.lang as code from c where c.id in ({string.Join(",", ids.Select(x => $"'{x}'"))})";
+                                        List<IdNameCode> idNameCodes = new List<IdNameCode>();
+                                        await foreach (var idNameCode in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher)
+                                            .GetItemQueryIterator<IdNameCode>(queryText: sql, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey("Base") }))
+                                        {
+                                            idNameCodes.Add(idNameCode);
+                                        }
+                                        _coreAPIHttpService.PushNotify(idNameCodes, $"{bizcode}_school", Constant.NotifyType_IES5_Task,
+                                                  new Dictionary<string, object> { { "tmdname", name }, { "schooName", schname } }, _option.Location, _configuration, _dingDing);
                                         return Ok(new { msg = "需要仲裁", code = 2 });
                                     }
                                     if (item.scores.Count > 0)
@@ -3051,6 +3061,15 @@ namespace TEAMModelOS.Controllers
                 var location = _option.Location;
                 await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
 
+                string sql = $"select c.id, c.name ,c.lang as code from c where c.id in ({string.Join(",", ids.Select(x => $"'{x}'"))})";
+                List<IdNameCode> idNameCodes = new List<IdNameCode>();
+                await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher)
+                    .GetItemQueryIterator<IdNameCode>(queryText: sql, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey("Base") }))
+                {
+                    idNameCodes.Add(item);
+                }
+                _coreAPIHttpService.PushNotify(idNameCodes, $"{bizcode}_school", Constant.NotifyType_IES5_Task,
+                          new Dictionary<string, object> { { "tmdname", name }, { "schooName", schname } }, _option.Location, _configuration, _dingDing);
                 /* scoring.type = 2;
                  scoring.err = err.GetString();*/
             }

+ 4 - 0
TEAMModelOS/Controllers/Common/HomeworkController.cs

@@ -803,6 +803,10 @@ namespace TEAMModelOS.Controllers.Learn
                                     var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
                                     var location = _option.Location;
                                     var code = await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
+                                  Teacher teacherData= await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemAsync<Teacher>(homework.creatorId, new PartitionKey("Base"));
+                                    _coreAPIHttpService.PushNotify(new List<IdNameCode> { 
+                                        new IdNameCode { id = teacherData.id,name=teacherData.name,code=teacherData.lang} }, "submitanswer_homework", Constant.NotifyType_IES5_Course,
+                               new Dictionary<string, object> { { "tmdname", name }, { "homeworkName", homework.name } }, _option.Location, _configuration, _dingDing,"");
                                 }
                                 //TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO 写入方便教师查看的作答记录
                                 try

+ 14 - 2
TEAMModelOS/Controllers/School/CorrectController.cs

@@ -27,6 +27,7 @@ using TEAMModelOS.SDK.Models.Service;
 using Microsoft.Extensions.Configuration;
 using HTEXLib.COMM.Helpers;
 using TEAMModelOS.SDK.DI.CoreAPI;
+using TEAMModelOS.SDK.Models.Dtos;
 
 namespace TEAMModelOS.Controllers
 {
@@ -46,8 +47,8 @@ namespace TEAMModelOS.Controllers
         private readonly AzureStorageFactory _azureStorage;
         private readonly IConfiguration _configuration;
         private readonly NotificationService _notificationService;
-
-        public CorrectController(AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option, IConfiguration configuration, NotificationService notificationService,
+        private readonly CoreAPIHttpService _coreAPIHttpService;
+        public CorrectController(CoreAPIHttpService coreAPIHttpService,AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option, IConfiguration configuration, NotificationService notificationService,
             AzureRedisFactory azureRedis, AzureStorageFactory azureStorage)
         {
             _azureCosmos = azureCosmos;
@@ -59,6 +60,7 @@ namespace TEAMModelOS.Controllers
             _azureStorage = azureStorage;
             _configuration = configuration;
             _notificationService = notificationService;
+            _coreAPIHttpService = coreAPIHttpService;
         }
 
         ///<summary>
@@ -245,6 +247,16 @@ namespace TEAMModelOS.Controllers
                 var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
                 var location = _option.Location;
                 await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
+
+                string sql = $"select c.id, c.name ,c.lang as code from c where c.id in ({string.Join(",", ids.Select(x => $"'{x}'"))})";
+                List<IdNameCode> idNameCodes = new List<IdNameCode>();
+                await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher)
+                    .GetItemQueryIterator<IdNameCode>(queryText: sql, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey("Base") }))
+                {
+                    idNameCodes.Add(item);
+                }
+                _coreAPIHttpService.PushNotify(idNameCodes, $"{bizcode}_school", Constant.NotifyType_IES5_Task,
+                                 new Dictionary<string, object> { { "tmdname", name }, { "schooName", schname } }, _option.Location, _configuration, _dingDing,"");
                 return Ok(new { vote = request });
             }
             catch (Exception e)

+ 13 - 5
TEAMModelOS/Controllers/School/SchoolController.cs

@@ -27,6 +27,7 @@ using System.Net.Http.Json;
 using HTEXLib.COMM.Helpers;
 using System.IdentityModel.Tokens.Jwt;
 using TEAMModelOS.SDK.DI.CoreAPI;
+using Azure.Storage.Blobs.Models;
 
 namespace TEAMModelOS.Controllers
 {
@@ -1573,7 +1574,7 @@ namespace TEAMModelOS.Controllers
                         }
 
                     }
-                    List<string> inviteids = new List<string>();
+                    List<IdNameCode> inviteids = new List<IdNameCode>();
                     School schoolBase = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).ReadItemAsync<School>($"{_schoolId}", new PartitionKey("Base"));
                     if (coreUsers.Any())
                     {
@@ -1667,12 +1668,13 @@ namespace TEAMModelOS.Controllers
                                         pk = "Teacher",
                                         code = $"Teacher-{_schoolId}"
                                     };
-                                    inviteids.Add(t.id);
+                                  
                                     await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).CreateItemAsync(teacher, new PartitionKey(teacher.code));
                                     Azure.Response responseTeacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemStreamAsync(t.id, new PartitionKey("Base"));
                                     if (responseTeacher.Status == 200)
                                     {
                                         Teacher teacherBase = JsonDocument.Parse(responseTeacher.Content).RootElement.Deserialize<Teacher>();
+                                        inviteids.Add( new IdNameCode { id= teacherBase.id,name= teacherBase.name,code= teacherBase.lang});
                                         var school = teacherBase.schools?.Find(x => x.schoolId.Equals($"{_schoolId}"));
                                         if (teacherBase.schools.IsNotEmpty())
                                         {
@@ -1699,9 +1701,12 @@ namespace TEAMModelOS.Controllers
                                             code = "Base",
                                             pk = "Base",
                                             schools = new List<Teacher.TeacherSchool> {
-                                            new Teacher.TeacherSchool {schoolId= schoolBase.id,name= schoolBase.name,picture= schoolBase.picture, areaId= schoolBase.areaId,time=now,status= "invite" },
-                                        }
+                                                new Teacher.TeacherSchool {
+                                                    schoolId= schoolBase.id,
+                                                    name= schoolBase.name,picture= schoolBase.picture, areaId= schoolBase.areaId,time=now,status= "invite" },
+                                            }
                                         };
+                                        inviteids.Add(new IdNameCode { id = teacherBase.id, name = teacherBase.name, code = teacherBase.lang });
                                         await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).CreateItemAsync(teacherBase, new PartitionKey("Base"));
                                     }
 
@@ -1780,7 +1785,7 @@ namespace TEAMModelOS.Controllers
                             hubName = "hita",
                             type = "msg",
                             from = $"ies5:{_option.Location}:private",
-                            to = inviteids.Select(x => x).ToList(),
+                            to = inviteids.Select(x => x.id).ToList(),
                             label = $"{bizcode}_school",
                             body = new { location = _option.Location,
                                 biz = bizcode,
@@ -1798,6 +1803,9 @@ namespace TEAMModelOS.Controllers
                         var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
                         var location = _option.Location;
                         var code = await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
+
+                        _coreAPIHttpService.PushNotify(inviteids, $"remove_school", Constant.NotifyType_IES5_Management,
+                                     new Dictionary<string, object> { { "tmdname", adminName }, { "schooName", schoolBase.name } }, _option.Location, _configuration, _dingDing,"");
                     }
                     break;
             }

+ 16 - 4
TEAMModelOS/Controllers/School/SchoolTeacherController.cs

@@ -22,6 +22,8 @@ using TEAMModelOS.Filter;
 using HTEXLib.COMM.Helpers;
 using Microsoft.AspNetCore.Authorization;
 using TEAMModelOS.SDK.DI.CoreAPI;
+using DocumentFormat.OpenXml.Wordprocessing;
+using static TEAMModelOS.Controllers.FixDataController;
 
 namespace TEAMModelOS.Controllers
 {
@@ -583,13 +585,13 @@ namespace TEAMModelOS.Controllers
             {
 
                 List<KeyValuePair<string, int>> keys = new List<KeyValuePair<string, int>>();
-                List<TmdInfo> ids = new List<TmdInfo>();
+                List<IdNameCode> ids = new List<IdNameCode>();
                 foreach (var obj in user_list.EnumerateArray())
                 {
                     obj.TryGetProperty("id", out JsonElement id);
                     obj.TryGetProperty("name", out JsonElement name);
                     obj.TryGetProperty("picture", out JsonElement picture);
-                    TmdInfo tmd = new TmdInfo { id = $"{id}", name = $"{name}" };
+                    IdNameCode tmd = new IdNameCode { id = $"{id}", name = $"{name}" };
                     ids.Add(tmd);
                     //老師個人資料
                     var tresponse = await client.GetContainer(Constant.TEAMModelOS, "Teacher").ReadItemStreamAsync(id.ToString(), new PartitionKey("Base"));
@@ -597,7 +599,8 @@ namespace TEAMModelOS.Controllers
                     {
                         using var json = await JsonDocument.ParseAsync(tresponse.ContentStream);
                         Teacher teacher = json.ToObject<Teacher>();
-                        var school = teacher.schools.FirstOrDefault(x => x.schoolId.Equals(school_code.GetString(), StringComparison.OrdinalIgnoreCase));
+                        tmd.code = teacher.lang;
+                         var school = teacher.schools.FirstOrDefault(x => x.schoolId.Equals(school_code.GetString(), StringComparison.OrdinalIgnoreCase));
                         if (school != null)
                         {
                             school.time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
@@ -739,6 +742,9 @@ namespace TEAMModelOS.Controllers
                 var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
                 var location = _option.Location;
                 var code = await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
+
+                _coreAPIHttpService.PushNotify(ids, $"{bizcode}_school", Constant.NotifyType_IES5_Management,
+                                 new Dictionary<string, object> { { "tmdname", tname }, { "schooName", schname } }, _option.Location, _configuration, _dingDing, "");
                 return Ok(new { exist = keys });
             }
             catch (Exception ex)
@@ -905,7 +911,10 @@ namespace TEAMModelOS.Controllers
                 var clientID = _configuration.GetValue<string>("HaBookAuth:CoreService:clientID");
                 var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
                 var location = _option.Location;
-                var code = await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
+                var code = await _notificationService.SendNotification(clientID, clientSecret, location, url, notification); 
+
+                _coreAPIHttpService.PushNotify(new List<IdNameCode> { new IdNameCode { id = teacher.id, name=teacher.name, code= teacher.lang} }, $"{bizcode}_school", Constant.NotifyType_IES5_Management,
+                                 new Dictionary<string, object> { { "tmdname", tname }, { "schooName", schname } }, _option.Location, _configuration, _dingDing, "");
                 return Ok(new { });
             }
             catch (Exception ex)
@@ -1020,6 +1029,9 @@ namespace TEAMModelOS.Controllers
                     var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
                     var location = _option.Location;
                     var code = await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
+
+                    _coreAPIHttpService.PushNotify(new List<IdNameCode> { new IdNameCode { id = teacher.id, name = teacher.name, code = teacher.lang } }, $"remove_school", Constant.NotifyType_IES5_Management,
+                                     new Dictionary<string, object> { { "tmdname", tname }, { "schooName", schname } }, _option.Location, _configuration, _dingDing, "");
                 }
                 return Ok(new { });
             }

+ 10 - 5
TEAMModelOS/Controllers/Teacher/InitController.cs

@@ -267,7 +267,7 @@ namespace TEAMModelOS.Controllers
                                 }
                                 Teacher targetTeacher = await client.GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemAsync<Teacher>($"{_targetTecher}", new PartitionKey($"Base"));
                                 _coreAPIHttpService.PushNotify(new List<IdNameCode> { new IdNameCode { id= targetTeacher.id,name= targetTeacher.name,code=targetTeacher.lang} }, "transfer-admin_school", Constant.NotifyType_IES5_Management,
-                                    new Dictionary<string, object> { { "tmdname", name },{ "schooName", schoolBase.name } });
+                                    new Dictionary<string, object> { { "tmdname", name },{ "schooName", schoolBase.name } }, _option.Location, _configuration, _dingDing, "");
                                 _ = _azureStorage.SaveLog("transfer-admin-role", new { request, userid, name, school, schoolName = schoolBase.name, targetTecher = _targetTecher, }.ToJsonString(), bizId: $"{userid}-{schoolBase.id}-{_targetTecher}", httpContext: HttpContext, dingDing: _dingDing, scope: "school");
                                 return Ok(new { status = 1 });
                             }
@@ -1171,11 +1171,16 @@ namespace TEAMModelOS.Controllers
                         var val = await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
                     }
                     if (teachers.IsNotEmpty()) {
-                        //string sql = $"select c.id, c.name ,c.lang as code from c where c.id in ({string.Join(",",teachers.Select(x=>$"'{x.id}'"))})";
-                        //_coreAPIHttpService.PushNotify(new List<IdNameCode> { new IdNameCode { id = targetTeacher.id, name = targetTeacher.name, code = targetTeacher.lang } }, $"{code}_school", Constant.NotifyType_IES5_Management,
-                        //          new Dictionary<string, object> { { "tmdname", name }, { "schooName", schoolBase.name } });
+                        string sql = $"select c.id, c.name ,c.lang as code from c where c.id in ({string.Join(",", teachers.Select(x => $"'{x.id}'"))})";
+                        List<IdNameCode> idNameCodes = new List<IdNameCode>();
+                        await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher)
+                            .GetItemQueryIterator<IdNameCode>(queryText: sql, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey("Base") })) 
+                        {
+                            idNameCodes.Add(item);
+                        }
+                        _coreAPIHttpService.PushNotify(idNameCodes, $"{code}_school", Constant.NotifyType_IES5_Management,
+                                  new Dictionary<string, object> { { "tmdname", name }, { "schooName", schoolBase.name } }, _option.Location,_configuration,_dingDing, "") ;
                     }
-                      
                     return Ok(new { stauts = 1 });
                 }
             }