| 
					
				 | 
			
			
				@@ -17944,63 +17944,42 @@ ORDER BY 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         [HttpPost] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        public async Task<IActionResult> encryptionClientInfo() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public IActionResult TimeTest() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             var jw = JsonView(false, "error"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _sqlSugar.BeginTran(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                var deleList = _sqlSugar.Queryable<Crm_DeleClient>().ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                foreach (var item in deleList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    EncryptionProcessor.EncryptProperties(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                var deleCount =  await _sqlSugar.Updateable<Crm_DeleClient>(deleList). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                         UpdateColumns(x => new  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                              x.FirstName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                              x.LastName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                              x.Phone, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                              x.Job, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                              x.Pinyin 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                         }).ExecuteCommandAsync(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var clientList = _sqlSugar.Queryable<Crm_NewClientData>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            .Select(x => new Crm_NewClientData 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                Id = x.Id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                Client = x.Client, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                Contact = x.Contact, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                Location = x.Location, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            .ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var ids =  clientList.Where(x => !string.IsNullOrEmpty(x.Client) &&  x.Client.Contains("重庆")).Select(x=>x.Id).ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                _sqlSugar.Queryable<Crm_NewClientData>().Where(x => ids.Contains(x.Id)).ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                var CertList = _sqlSugar.Queryable<Crm_CustomerCert>().ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                foreach (var item in CertList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    EncryptionProcessor.EncryptProperties(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                var CertCount = await _sqlSugar.Updateable(CertList). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                         UpdateColumns(x => new 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            x.CertNo 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                         }).ExecuteCommandAsync(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                Stopwatch stopwatch = new Stopwatch(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // 开始计时 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                stopwatch.Start(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                var CompanyList = _sqlSugar.Queryable<Crm_CustomerCompany>().ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                foreach (var item in CompanyList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                foreach (var item in clientList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    EncryptionProcessor.EncryptProperties(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    EncryptionProcessor.DecryptProperties(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                var CompanyCount = await _sqlSugar.Updateable(CompanyList). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                         UpdateColumns(x => new 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                             x.CompanyFullName 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                         }).ExecuteCommandAsync(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                _sqlSugar.CommitTran(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                stopwatch.Stop(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 jw.Code = 200; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                jw.Data = new 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    deleCount, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    CertCount, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    CompanyCount 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                jw.Data = stopwatch.ElapsedMilliseconds; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                jw.Msg = "运算耗时: " + stopwatch.ElapsedMilliseconds + " 毫秒,解密条数: " + clientList.Count; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             catch (Exception ex) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 jw.Code = 400; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 jw.Msg = ex.Message; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                _sqlSugar.RollbackTran(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return Ok(jw); 
			 |