李昊 4 年之前
父节点
当前提交
0c14c3d6f9

+ 6 - 2
gx_api/GxPress/Model/GxPress.Entity/User.cs

@@ -198,12 +198,16 @@ namespace GxPress.Entity
         [DataColumn]
         public bool IsRenewal { get; set; }
         /// <summary>
+        /// 续费次数
+        /// </summary>
+        /// <value></value>
+        [DataColumn]
+        public int RenewalCount { get; set; }
+        /// <summary>
         /// 备注
         /// </summary>
         /// <value></value>
         public string Remark { get; set; }
-
-
         /// <summary>
         /// 是否冻结 
         /// </summary>

+ 17 - 0
gx_api/GxPress/Model/GxPress.Request/User/UserRequest.cs

@@ -238,5 +238,22 @@ namespace GxPress.Request.User
         /// </summary>
         /// <value></value>
         public int IsVip { get; set; }
+        /// <summary>
+        /// 开始累计价格
+        /// </summary>
+        /// <value></value>
+        public decimal BeginAccumulativePrice { get; set; }
+        /// <summary>
+        /// 结束累计价格
+        /// </summary>
+        /// <value></value>
+        public decimal EndAccumulativePrice { get; set; }
+
+        /// <summary>
+        /// 续费次数
+        /// </summary>
+        /// <value></value>
+       
+        public int RenewalCount { get; set; }
     }
 }

+ 6 - 0
gx_api/GxPress/Model/GxPress.Result/User/UserDetail.cs

@@ -185,6 +185,12 @@ namespace GxPress.Result.User
         /// </summary>
         /// <value></value>
         public int VipStatus { get; set; }
+
+        /// <summary>
+        /// 续费次数
+        /// </summary>
+        /// <value></value>
+        public int RenewalCount { get; set; }
     }
 }
 

+ 7 - 0
gx_api/GxPress/Repository/GxPress.Repository.Implement/UserRepository.cs

@@ -907,6 +907,13 @@ namespace GxPress.Repository.Implement
                 query.Where(nameof(User.IsFreeze), request.IsFreeze == 1);
             if (request.IsVip > 0)
                 query.Where(nameof(User.IsVip), request.IsVip == 1);
+            if (request.BeginAccumulativePrice > 0 || request.EndAccumulativePrice > 0)
+            {
+                query.Where(nameof(User.AccumulativePrice), ">=", request.BeginAccumulativePrice);
+                query.Where(nameof(User.AccumulativePrice), "<=", request.EndAccumulativePrice);
+            }
+            if (request.RenewalCount > 0)
+                query.Where(nameof(User.RenewalCount), request.RenewalCount);
             result.Total = await _repository.CountAsync(query);
             var items = await _repository.GetAllAsync(query.ForPage(request.Page, request.PerPage));
             result.Items = items.Select(n => _mapper.Map<UserDetail>(n));