|  |  |  | @ -41,7 +41,6 @@ namespace Sanhe.Abp.AuditLogging.Elasticsearch | 
			
		
	
		
			
				
					|  |  |  |  |             Logger = NullLogger<ElasticsearchAuditLogManager>.Instance; | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         public virtual async Task<long> GetCountAsync( | 
			
		
	
		
			
				
					|  |  |  |  |             DateTime? startTime = null, | 
			
		
	
		
			
				
					|  |  |  |  |             DateTime? endTime = null, | 
			
		
	
	
		
			
				
					|  |  |  | @ -213,13 +212,20 @@ namespace Sanhe.Abp.AuditLogging.Elasticsearch | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             var auditLog = await _converter.ConvertAsync(auditLogInfo); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             var response = await client.IndexAsync( | 
			
		
	
		
			
				
					|  |  |  |  |                 auditLog, | 
			
		
	
		
			
				
					|  |  |  |  |                 (x) => x.Index(CreateIndex()) | 
			
		
	
		
			
				
					|  |  |  |  |                         .Id(auditLog.Id), | 
			
		
	
		
			
				
					|  |  |  |  |                 cancellationToken); | 
			
		
	
		
			
				
					|  |  |  |  |             //var response = await client.IndexAsync( | 
			
		
	
		
			
				
					|  |  |  |  |             //    auditLog, | 
			
		
	
		
			
				
					|  |  |  |  |             //    (x) => x.Index(CreateIndex()) | 
			
		
	
		
			
				
					|  |  |  |  |             //            .Id(auditLog.Id), | 
			
		
	
		
			
				
					|  |  |  |  |             //    cancellationToken); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             // 使用 Bulk 命令传输可能存在参数庞大的日志结构 | 
			
		
	
		
			
				
					|  |  |  |  |             var response = await client.BulkAsync( | 
			
		
	
		
			
				
					|  |  |  |  |                 dsl => dsl.Index(CreateIndex()) | 
			
		
	
		
			
				
					|  |  |  |  |                           .Create<AuditLog>(ct => | 
			
		
	
		
			
				
					|  |  |  |  |                             ct.Id(auditLog.Id) | 
			
		
	
		
			
				
					|  |  |  |  |                               .Document(auditLog))); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             return response.Id; | 
			
		
	
		
			
				
					|  |  |  |  |             return response.Items?.FirstOrDefault()?.Id; | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         protected virtual List<Func<QueryContainerDescriptor<AuditLog>, QueryContainer>> BuildQueryDescriptor( | 
			
		
	
	
		
			
				
					|  |  |  | 
 |