李昊 4 years ago
parent
commit
831b1d8458

+ 0 - 1
gx_api/GxPress/Api/GxPress.Api/AppControllers/SlideController.cs

@@ -1,4 +1,3 @@
-using System.Linq;
 using System.Threading.Tasks;
 using GxPress.Common.Page;
 using GxPress.Entity;

+ 11 - 8
gx_api/GxPress/Model/GxPress.EnumConst/VipTypeConst.cs

@@ -1,3 +1,5 @@
+using System.ComponentModel;
+
 namespace GxPress.EnumConst
 {
     /// <summary>
@@ -37,16 +39,17 @@ namespace GxPress.EnumConst
     /// </summary>
     public enum ResourceTypeConst
     {
+        [Description("文章")]
         Article = 1,
-        //书籍
+        [Description("书籍")]
         Book = 2,
-        //课程
+        [Description("课程")]
         Curriculum = 3,
-        //音频
+        [Description("音频")]
         Audio = 4,
-        //期刊
+        [Description("期刊")]
         Journal = 5,
-        //视频
+        [Description("视频")]
         Video = 6
 
     }
@@ -55,11 +58,11 @@ namespace GxPress.EnumConst
     /// </summary>
     public enum AttachTypeConst
     {
-        //名栏
+        [Description("名栏")]
         StarColumn = 1,
-        //公众号
+        [Description("公众号")]
         PublicNumber = 2,
-        //期刊
+        [Description("期刊")]
         Journal = 3
     }
 }

+ 3 - 3
gx_api/GxPress/Repository/GxPress.Repository.Implement/Media/MediaRepository.cs

@@ -155,10 +155,10 @@ namespace GxPress.Repository.Implement.Media
         {
             var result = new PagedList<Entity.tede2.Media.Media>();
             var query = Q.NewQuery();
-            if(!string.IsNullOrEmpty(request.KeyWord))
-               query.WhereLike(nameof(Entity.tede2.Media.Media.Title),$"%{request.KeyWord}%");
+            if (!string.IsNullOrEmpty(request.KeyWord))
+                query.WhereLike(nameof(Entity.tede2.Media.Media.Title), $"%{request.KeyWord}%");
             if (request.IsDelete > 0)
-                query.Where(nameof(Entity.tede2.Media.Media.IsDelete), request.IsDelete);
+                query.Where(nameof(Entity.tede2.Media.Media.IsDelete), request.IsDelete == 1);
             if (request.MediaType > 0)
                 query.Where(nameof(Entity.tede2.Media.Media.MediaType), request.MediaType);
             if (request.LibraryType > 0)