فهرست منبع

处理V2通知的问题。

Li 2 سال پیش
والد
کامیت
046ed97ec5

+ 1 - 1
TEAMModelBI/Controllers/BINormal/BatchAreaController.cs

@@ -827,7 +827,7 @@ namespace TEAMModelBI.Controllers.BINormal
                 string partitionCode = "DelBeforeCopyAbility-mark";
                 string partitionCode = "DelBeforeCopyAbility-mark";
                 //v2通知
                 //v2通知
                 Teacher targetTeacher = await cosmosClient.GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemAsync<Teacher>($"{_tmdId}", new PartitionKey($"Base"));
                 Teacher targetTeacher = await cosmosClient.GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemAsync<Teacher>($"{_tmdId}", 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", "账号名称" }, { "schooName", "学校名称" }, { "schoolId", $"学校id" }, { "tmdid", "账号id" } }, _option.Location, _configuration, _dingDing, _environment.ContentRootPath);
+                _coreAPIHttpService.PushNotify(new List<IdNameCode> { new IdNameCode { id = targetTeacher.id, name = targetTeacher.name, code = targetTeacher.lang } }, "copy-file_area", Constant.NotifyType_IES5_Management, new Dictionary<string, object> { { "tmdname", $"{_tmdName}" } }, _option.Location, _configuration, _dingDing, _environment.ContentRootPath);
 
 
                 //执行复制操作
                 //执行复制操作
                 BatchCopyFile batchCopyFile = new();
                 BatchCopyFile batchCopyFile = new();

+ 3 - 2
TEAMModelBI/Controllers/BISchool/BatchSchoolController.cs

@@ -137,6 +137,7 @@ namespace TEAMModelBI.Controllers.BISchool
                 List<BISchool> cutArea = new();
                 List<BISchool> cutArea = new();
                 List<string> upSc = new();
                 List<string> upSc = new();
                 StringBuilder stringBuilder = new($"{_tmdName}【{_tmdId}】使用批量创校功能:");
                 StringBuilder stringBuilder = new($"{_tmdName}【{_tmdId}】使用批量创校功能:");
+                StringBuilder vsSql = new();
                 StringBuilder noticeDD = new();  //创校信息通知
                 StringBuilder noticeDD = new();  //创校信息通知
                 var cosmosClient = _azureCosmos.GetCosmosClient();
                 var cosmosClient = _azureCosmos.GetCosmosClient();
                 var tableClient = _azureStorage.GetCloudTableClient();
                 var tableClient = _azureStorage.GetCloudTableClient();
@@ -210,7 +211,7 @@ namespace TEAMModelBI.Controllers.BISchool
                                 scale = bischool.size >= 300 ? 500 : 0,
                                 scale = bischool.size >= 300 ? 500 : 0,
                                 createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
                                 createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
                             };
                             };
-
+                            vsSql.Append($"{upSchool.name}【{upSchool.id}】,");
                             stringBuilder.Append($"创建学校:{upSchool.name}【{upSchool.id}】");
                             stringBuilder.Append($"创建学校:{upSchool.name}【{upSchool.id}】");
                             noticeDD.Append($"{upSchool.name}【{upSchool.id}】 \r 学校管理员信息:");
                             noticeDD.Append($"{upSchool.name}【{upSchool.id}】 \r 学校管理员信息:");
                             upSc.Add(upSchool.id);
                             upSc.Add(upSchool.id);
@@ -470,7 +471,7 @@ namespace TEAMModelBI.Controllers.BISchool
 
 
                 //v2通知
                 //v2通知
                 Teacher targetTeacher = await cosmosClient.GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemAsync<Teacher>($"{_tmdId}", new PartitionKey($"Base"));
                 Teacher targetTeacher = await cosmosClient.GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemAsync<Teacher>($"{_tmdId}", 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", $"{_tmdName}" }, { "schooName", "学校名称" }, { "schoolId", $"学校id" }, { "tmdid", "账号id" } }, _option.Location, _configuration, _dingDing, _environment.ContentRootPath);
+                _coreAPIHttpService.PushNotify(new List<IdNameCode> { new IdNameCode { id = targetTeacher.id, name = targetTeacher.name, code = targetTeacher.lang } }, "create-school", Constant.NotifyType_IES5_Management, new Dictionary<string, object> { { "tmdname", $"{_tmdName}" }, { "schooName", $"{vsSql}" } }, _option.Location, _configuration, _dingDing, _environment.ContentRootPath);
 
 
                 //保存操作记录
                 //保存操作记录
                 await AzureStorageBlobExtensions.SaveBILog(blobClient, tableClient, "school-batchAdd", stringBuilder?.ToString(), _dingDing, httpContext: HttpContext);
                 await AzureStorageBlobExtensions.SaveBILog(blobClient, tableClient, "school-batchAdd", stringBuilder?.ToString(), _dingDing, httpContext: HttpContext);

+ 2 - 2
TEAMModelBI/Lang/en-us.json

@@ -17,6 +17,6 @@
   "submitanswer-private_homework": [ "Homework submission notice", "{tmdname} has submitted a homework({homeworkName})" ],
   "submitanswer-private_homework": [ "Homework submission notice", "{tmdname} has submitted a homework({homeworkName})" ],
   "expire-school_lessonRecord": [ "Lesson record expiration notice", "Your lesson record, {lessonName}, on {schoolName} will expire at {expireTime}" ],
   "expire-school_lessonRecord": [ "Lesson record expiration notice", "Your lesson record, {lessonName}, on {schoolName} will expire at {expireTime}" ],
   "expire-private_lessonRecord": [ "Lesson record expiration notice", "Your lesson record, {lessonName} will expire at {expireTime}" ],
   "expire-private_lessonRecord": [ "Lesson record expiration notice", "Your lesson record, {lessonName} will expire at {expireTime}" ],
-  "create-school": [ "Create schools in batches", "{tmdname}You successfully created schools in batch with Bi" ],
-  "copy-file_area": [ "Batch copy file start", "{tmdname}您用BI创区成功开始复制区域文件" ]
+  "create-school": [ "Create schools in batches", "{tmdname}You successfully created schools in batch with BI! List of schools:{schools}" ],
+  "copy-file_area": [ "Batch copy file start", "{tmdname}You have successfully started copying regional files with BI " ]
 }
 }

+ 1 - 1
TEAMModelBI/Lang/zh-cn.json

@@ -17,6 +17,6 @@
   "submitanswer-private_homework": [ "作业提交通知", "{tmdname}已提交作业,作业名称({homeworkName})" ],
   "submitanswer-private_homework": [ "作业提交通知", "{tmdname}已提交作业,作业名称({homeworkName})" ],
   "expire-school_lessonRecord": [ "课例到期通知", "您在{schoolName}的课例将在{expireTime}到期,课例名称:{lessonName}" ],
   "expire-school_lessonRecord": [ "课例到期通知", "您在{schoolName}的课例将在{expireTime}到期,课例名称:{lessonName}" ],
   "expire-private_lessonRecord": [ "课例到期通知", "您的课例将在{expireTime}到期,课例名称:{lessonName}" ],
   "expire-private_lessonRecord": [ "课例到期通知", "您的课例将在{expireTime}到期,课例名称:{lessonName}" ],
-  "create-school": [ "批量创建学校", "{tmdname}您用BI批量创建学校成功" ],
+  "create-school": [ "批量创建学校", "{tmdname}您用BI批量创建学校成功!学校列表:{schools}" ],
   "copy-file_area": [ "批复制文件开始", "{tmdname}您用BI创区成功开始复制区域文件" ]
   "copy-file_area": [ "批复制文件开始", "{tmdname}您用BI创区成功开始复制区域文件" ]
 }
 }

+ 1 - 1
TEAMModelBI/Lang/zh-tw.json

@@ -17,6 +17,6 @@
   "submitanswer-private_homework": [ "作業提交通知", "{tmdname}已提交作業,作業名稱({homeworkName})" ],
   "submitanswer-private_homework": [ "作業提交通知", "{tmdname}已提交作業,作業名稱({homeworkName})" ],
   "expire-school_lessonRecord": [ "課例到期通知", "您在{schoolName}的課例將在{expireTime}到期,課例名稱:{lessonName}" ],
   "expire-school_lessonRecord": [ "課例到期通知", "您在{schoolName}的課例將在{expireTime}到期,課例名稱:{lessonName}" ],
   "expire-private_lessonRecord": [ "課例到期通知", "您的課例將在{expireTime}到期,課例名稱:{lessonName}" ],
   "expire-private_lessonRecord": [ "課例到期通知", "您的課例將在{expireTime}到期,課例名稱:{lessonName}" ],
-  "create-school": [ "批量創建學校", "{tmdname}您用BI批量創建學校成功" ],
+  "create-school": [ "批量創建學校", "{tmdname}您用BI批量創建學校成功!學校列表:{schools}" ],
   "copy-file_area": [ "批復制文件開始", "{tmdname}您用BI创区成功开始复制区域文件" ]
   "copy-file_area": [ "批復制文件開始", "{tmdname}您用BI创区成功开始复制区域文件" ]
 }
 }