李昊 il y a 4 ans
Parent
commit
295e17d7f2

+ 11 - 1
gx_api/GxPress/Api/GxPress.Api/AdminControllers/AdminUserController.cs

@@ -265,7 +265,17 @@ namespace GxPress.Api.AdminControllers
         [HttpPost("vip")]
         public async Task<PagedList<UserDetail>> GetUserVipDetail(UserSearchVipRequest request)
         {
-            return await _userRepository.GetUserVipDetail(request);
+            var result = await _userRepository.GetUserVipDetail(request);
+            foreach (var item in result.Items)
+            {
+                if (item.IsRenewal)
+                    item.VipStatus = 1;
+                if (item.EndTime < DateTime.Now)
+                    item.VipStatus = 3;
+                else
+                    item.VipStatus = 2;
+            }
+            return result;
         }
     }
 }

+ 1 - 1
gx_api/GxPress/Model/GxPress.Entity/Slide.cs

@@ -30,7 +30,7 @@ namespace GxPress.Entity
         /// 媒体标题
         /// </summary>
         [DataColumn]
-        public int MediaTitle { get; set; }
+        public string MediaTitle { get; set; }
         /// <summary>
         /// 是否启用
         /// </summary>

+ 5 - 3
gx_api/GxPress/Model/GxPress.Result/User/UserDetail.cs

@@ -1,6 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
 namespace GxPress.Result.User
 {
@@ -113,7 +111,6 @@ namespace GxPress.Result.User
         /// 是否黑名单
         /// </summary>
         public bool IsBlack { get; set; }
-
         /// <summary>
         /// 二维码
         /// </summary>
@@ -183,6 +180,11 @@ namespace GxPress.Result.User
         /// </summary>
         /// <value></value>
         public DateTime? CreatedDate { get; set; }
+        /// <summary>
+        /// 1 自动续费 2 在费 3 到期
+        /// </summary>
+        /// <value></value>
+        public int VipStatus { get; set; }
     }
 }