李昊 4 years ago
parent
commit
8205763712

+ 6 - 0
gx_api/GxPress/Model/GxPress.Entity/tede2/Media/Media.cs

@@ -267,5 +267,11 @@ namespace GxPress.Entity.tede2.Media
         /// <value></value>
         [DataColumn]
         public decimal CommentScore { get; set; }
+        /// <summary>
+        /// 是否习题
+        /// </summary>
+        /// <value></value>
+        [DataColumn]
+        public bool IsExercises { get; set; }
     }
 }

+ 5 - 0
gx_api/GxPress/Model/GxPress.Result/Media/MediaResult.cs

@@ -364,6 +364,11 @@ namespace GxPress.Result.Media
         /// </summary>
         /// <value></value>
         public List<BookCatalogResult> BookCatalogResults { get; set; }
+        /// <summary>
+        /// 是否习题 1 是 2否
+        /// </summary>
+        /// <value></value>
+        public int IsExercises { get; set; }
     }
     /// <summary>
     /// 书籍目录

+ 2 - 0
gx_api/GxPress/Repository/GxPress.Repository.Implement/Media/MediaRepository.cs

@@ -363,6 +363,8 @@ namespace GxPress.Repository.Implement.Media
                         model.JournalsYear = result.JournalsYear;
                     if (result.JournalsCategory > 0)
                         model.JournalsCategory = result.JournalsCategory;
+                    if (result.IsExercises > 0)
+                        model.IsExercises = result.IsExercises == 1;
                     await _repository.UpdateAsync(model);
                     if (result.MediaLibraryResults != null && result.MediaLibraryResults.Count > 0)
                     {