| 
					
					
					
				 | 
				@ -1,4 +1,5 @@ | 
			
		
		
	
		
			
				 | 
				 | 
				using System; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				using Microsoft.Extensions.Configuration; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				using System; | 
			
		
		
	
		
			
				 | 
				 | 
				using System.Collections.Generic; | 
				 | 
				 | 
				using System.Collections.Generic; | 
			
		
		
	
		
			
				 | 
				 | 
				using System.Linq; | 
				 | 
				 | 
				using System.Linq; | 
			
		
		
	
		
			
				 | 
				 | 
				using System.Text; | 
				 | 
				 | 
				using System.Text; | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -24,16 +25,20 @@ namespace Shentun.Peis.Data | 
			
		
		
	
		
			
				 | 
				 | 
				    { | 
				 | 
				 | 
				    { | 
			
		
		
	
		
			
				 | 
				 | 
				        protected ICurrentUser CurrentUser { get; } | 
				 | 
				 | 
				        protected ICurrentUser CurrentUser { get; } | 
			
		
		
	
		
			
				 | 
				 | 
				        protected ICurrentTenant CurrentTenant { get; } | 
				 | 
				 | 
				        protected ICurrentTenant CurrentTenant { get; } | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        private readonly IConfiguration _configuration; | 
			
		
		
	
		
			
				 | 
				 | 
				        protected IClock Clock { get; } | 
				 | 
				 | 
				        protected IClock Clock { get; } | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				        public CustomerAuditPropertySetter( | 
				 | 
				 | 
				        public CustomerAuditPropertySetter( | 
			
		
		
	
		
			
				 | 
				 | 
				            ICurrentUser currentUser, | 
				 | 
				 | 
				            ICurrentUser currentUser, | 
			
		
		
	
		
			
				 | 
				 | 
				            ICurrentTenant currentTenant, | 
				 | 
				 | 
				            ICurrentTenant currentTenant, | 
			
		
		
	
		
			
				 | 
				 | 
				            IClock clock) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            IClock clock, | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            IConfiguration configuration) | 
			
		
		
	
		
			
				 | 
				 | 
				        { | 
				 | 
				 | 
				        { | 
			
		
		
	
		
			
				 | 
				 | 
				            CurrentUser = currentUser; | 
				 | 
				 | 
				            CurrentUser = currentUser; | 
			
		
		
	
		
			
				 | 
				 | 
				            CurrentTenant = currentTenant; | 
				 | 
				 | 
				            CurrentTenant = currentTenant; | 
			
		
		
	
		
			
				 | 
				 | 
				            Clock = clock; | 
				 | 
				 | 
				            Clock = clock; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            _configuration = configuration; | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				        } | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				        public void SetCreationProperties(object targetObject) | 
				 | 
				 | 
				        public void SetCreationProperties(object targetObject) | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -71,10 +76,12 @@ namespace Shentun.Peis.Data | 
			
		
		
	
		
			
				 | 
				 | 
				        { | 
				 | 
				 | 
				        { | 
			
		
		
	
		
			
				 | 
				 | 
				            if (!CurrentUser.Id.HasValue) | 
				 | 
				 | 
				            if (!CurrentUser.Id.HasValue) | 
			
		
		
	
		
			
				 | 
				 | 
				            { | 
				 | 
				 | 
				            { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                var defaultCreatorId = _configuration.GetValue<string>("AdminId"); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				                #region 无登录操作
 | 
				 | 
				 | 
				                #region 无登录操作
 | 
			
		
		
	
		
			
				 | 
				 | 
				                if (targetObject is IMayHaveCreator mayHaveCreatorObjectNoLogin) | 
				 | 
				 | 
				                if (targetObject is IMayHaveCreator mayHaveCreatorObjectNoLogin) | 
			
		
		
	
		
			
				 | 
				 | 
				                { | 
				 | 
				 | 
				                { | 
			
		
		
	
		
			
				 | 
				 | 
				                    ObjectHelper.TrySetProperty(mayHaveCreatorObjectNoLogin, x => x.CreatorId, () => Guid.Parse("3a0c4180-107c-0c89-b25b-0bd34666dcec")); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                    ObjectHelper.TrySetProperty(mayHaveCreatorObjectNoLogin, x => x.CreatorId, () => Guid.Parse(defaultCreatorId)); | 
			
		
		
	
		
			
				 | 
				 | 
				                } | 
				 | 
				 | 
				                } | 
			
		
		
	
		
			
				 | 
				 | 
				                #endregion
 | 
				 | 
				 | 
				                #endregion
 | 
			
		
		
	
		
			
				 | 
				 | 
				                return; | 
				 | 
				 | 
				                return; | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -135,9 +142,9 @@ namespace Shentun.Peis.Data | 
			
		
		
	
		
			
				 | 
				 | 
				            { | 
				 | 
				 | 
				            { | 
			
		
		
	
		
			
				 | 
				 | 
				                //modificationAuditedObject.LastModifierId = null;
 | 
				 | 
				 | 
				                //modificationAuditedObject.LastModifierId = null;
 | 
			
		
		
	
		
			
				 | 
				 | 
				                //return;
 | 
				 | 
				 | 
				                //return;
 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                var defaultCreatorId = _configuration.GetValue<string>("AdminId"); | 
			
		
		
	
		
			
				 | 
				 | 
				                #region 无登录操作
 | 
				 | 
				 | 
				                #region 无登录操作
 | 
			
		
		
	
		
			
				 | 
				 | 
				                modificationAuditedObject.LastModifierId = Guid.Parse("3a0c4180-107c-0c89-b25b-0bd34666dcec"); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                modificationAuditedObject.LastModifierId = Guid.Parse(defaultCreatorId); | 
			
		
		
	
		
			
				 | 
				 | 
				                return; | 
				 | 
				 | 
				                return; | 
			
		
		
	
		
			
				 | 
				 | 
				                #endregion
 | 
				 | 
				 | 
				                #endregion
 | 
			
		
		
	
		
			
				 | 
				 | 
				            } | 
				 | 
				 | 
				            } | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
					
				 | 
				
  |