CrazyIter_Bin 1 éve
szülő
commit
6cb069a9bf

+ 2 - 2
TEAMModelOS.SDK/Models/Cosmos/Normal/ArtSetting.cs

@@ -17,7 +17,7 @@ namespace TEAMModelOS.SDK.Models
         public List<ArtKnowledge> knowledges { get; set; }= new List<ArtKnowledge>();
         public List<ArtQuota> quotas { get; set; } = new List<ArtQuota>();
 
-        public List<ArtReviewLevel> reviewLevel { get; set; } = new List<ArtReviewLevel>();
+        public List<ReviewLevel> reviewLevel { get; set; } = new List<ReviewLevel>();
         public List<MusicZystd> musicZystds { get; set; }
 
     }
@@ -41,7 +41,7 @@ namespace TEAMModelOS.SDK.Models
         public double param { get; set; }
         public double value { get; set; }
     }
-    public class ArtReviewLevel
+    public class ReviewLevel
     {
         public string code { get; set; }
         public List<double> value { get; set; } = new List<double>();

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/School/SchoolSetting.cs

@@ -36,6 +36,7 @@ namespace TEAMModelOS.SDK.Models
         public HashSet<string> lessonTag { get; set; } = new HashSet<string>();
         public LessonSetting lessonSetting { get; set; }= new LessonSetting();
         public OverallEducationSetting overallEducationSetting { get; set; } = new OverallEducationSetting();
+        public List<ReviewLevel> reviewLevel { get; set; } = new List<ReviewLevel>();
     }
     public class OverallEducationSetting
     {

+ 1 - 1
TEAMModelOS/Controllers/Normal/ArtSettingController.cs

@@ -260,7 +260,7 @@ namespace TEAMModelOS.Controllers
                         }
                         break;
                     case bool when $"{_opt}".Equals("UpsertReviewLevel", StringComparison.OrdinalIgnoreCase) && (json.TryGetProperty("reviewLevel", out JsonElement _reviewLevel)):
-                        List<ArtReviewLevel> reviewLevel = _reviewLevel.ToObject<List<ArtReviewLevel>>();
+                        List<ReviewLevel> reviewLevel = _reviewLevel.ToObject<List<ReviewLevel>>();
 
                         if (reviewLevel.IsNotEmpty())
                         {

+ 8 - 0
TEAMModelOS/Controllers/School/SchoolSettingController.cs

@@ -164,6 +164,14 @@ namespace TEAMModelOS.Controllers
                     LessonSetting lessonSetting = _lessonSetting.ToObject<LessonSetting>();
                     setting.lessonSetting = lessonSetting;
                     break;
+                case bool when $"{_opt}".Equals("UpsertReviewLevel", StringComparison.OrdinalIgnoreCase) && (json.TryGetProperty("reviewLevel", out JsonElement _reviewLevel)):
+                    List<ReviewLevel> reviewLevel = _reviewLevel.ToObject<List<ReviewLevel>>();
+
+                    if (reviewLevel.IsNotEmpty())
+                    {
+                        setting.reviewLevel = reviewLevel;
+                    }
+                    break;
                 default: break;
             }
             await client.GetContainer(Constant.TEAMModelOS, "School").ReplaceItemAsync<SchoolSetting>(setting,setting.id, partitionKey: new Azure.Cosmos.PartitionKey("SchoolSetting"));