瀏覽代碼

处理学校下拉加载的问题

Li 2 年之前
父節點
當前提交
7feafe11e8

+ 0 - 6
TEAMModelBI/Controllers/BISchool/BatchSchoolController.cs

@@ -577,8 +577,6 @@ namespace TEAMModelBI.Controllers.BISchool
 
                 if ($"{order}".Equals("desc"))
                     stringBuilder.Append(" order by c.createTime desc");
-                else
-                    stringBuilder.Append(" order by c.createTime asc");
 
                 if (!string.IsNullOrEmpty($"{tmdId}"))
                 {
@@ -815,8 +813,6 @@ namespace TEAMModelBI.Controllers.BISchool
 
                         if ($"{order}".Equals("desc"))
                             sqlTxt.Append(" order by c.createTime desc");
-                        else
-                            sqlTxt.Append(" order by c.createTime asc");
 
                         await foreach (var itemSchool in cosmosClient.GetContainer("TEAMModelOS", "School").GetItemQueryIterator<AssistSchool>(queryText: sqlTxt.ToString(), requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("Base") }))
                         {
@@ -828,8 +824,6 @@ namespace TEAMModelBI.Controllers.BISchool
                 {
                     if ($"{order}".Equals("desc"))
                         stringBuilder.Append(" order by c.createTime desc");
-                    else
-                        stringBuilder.Append(" order by c.createTime asc");
 
                     scCnt = await CommonFind.GetSqlValueCount(cosmosClient, "School", scCntSql.ToString(), "Base");
 

+ 2 - 2
TEAMModelBI/Controllers/BISchool/SchoolController.cs

@@ -805,7 +805,7 @@ namespace TEAMModelBI.Controllers.BISchool
                         {
                             id = $"{tmdId}",
                             code = $"Teacher-{schoolId}",
-                            roles = new List<string> { "admin", "teacher" },
+                            roles = new List<string> { "admin" },
                             job = "管理员",
                             name = $"{tmdName}",
                             picture = string.IsNullOrEmpty($"{picture}") ? "" : $"{picture}",
@@ -959,7 +959,7 @@ namespace TEAMModelBI.Controllers.BISchool
                             {
                                 id = $"{tmdId}",
                                 code = $"Teacher-{school.id}",
-                                roles = new List<string> { "admin", "teacher" },
+                                roles = new List<string> { "admin" },
                                 job = "管理员",
                                 name = $"{tmdName}",
                                 picture = string.IsNullOrEmpty($"{picture}") ? "" : $"{picture}",