田爽 vor 1 Jahr
Ursprung
Commit
f8032b7a54

+ 2 - 2
src/Hotline.Repository.SqlSugar/CallCenter/TrCallRecordRepository.cs

@@ -126,7 +126,7 @@ namespace Hotline.Repository.SqlSugar.CallCenter
         public async Task<object> GetCallList(DateTime beginDate, DateTime? endDate, int noConnectByeTimes, int effectiveTimes, int connectByeTimes, string type, string source ,int pageIndex, int pageSize)
         {
 	        endDate = endDate.Value.Date.AddDays(1).AddSeconds(-1);
-			var  total = 0;
+	        RefAsync<int> total = 0;
 			var res = await Db.Queryable<TrCallRecord>()
                 .Where(x => x.CreatedTime >= beginDate && x.CreatedTime <= endDate)
                 .Where(x => x.CallDirection == ECallDirection.In)
@@ -143,7 +143,7 @@ namespace Hotline.Repository.SqlSugar.CallCenter
 					CreatedTime = x.CreatedTime
 				})
                 .ToPageListAsync(pageIndex, pageSize, total);
-            return new { Data = res , Total = total};
+            return new { Data = res , Total = total.Value};
 		}
 
 		public async Task<List<CallHotLineDto>> GetCallHotLineList(DateTime beginDate, DateTime endDate,string lineNum, int noConnectByeTimes, int effectiveTimes, int connectByeTimes,int ringTims)