修改同步niagara賬號
This commit is contained in:
		
							parent
							
								
									18426a3624
								
							
						
					
					
						commit
						ce738a64f4
					
				| @ -923,7 +923,7 @@ namespace FrontendWebApi.ApiControllers | |||||||
| 
 | 
 | ||||||
|             try |             try | ||||||
|             { |             { | ||||||
|                 //await backendRepository.ExecuteSql("update userinfo deleted = 1 where deleted = 0"); |                 await backendRepository.ExecuteSql("update userinfo deleted = 1 where deleted = 0"); | ||||||
| 
 | 
 | ||||||
|                 if (post != null) |                 if (post != null) | ||||||
|                 { |                 { | ||||||
| @ -934,16 +934,16 @@ namespace FrontendWebApi.ApiControllers | |||||||
|                             var account = await frontendRepository.GetOneAsync<UserManagerList>("select * from userinfo where account = @account", new { @account = acc.Account }); |                             var account = await frontendRepository.GetOneAsync<UserManagerList>("select * from userinfo where account = @account", new { @account = acc.Account }); | ||||||
|                             if (account != null) |                             if (account != null) | ||||||
|                             { |                             { | ||||||
|                                 await backendRepository.ExecuteSql("update userinfo deleted = 0 where userinfo_guid = @guid", new { @guid = account.Userinfo_guid }); |                                 await backendRepository.ExecuteSql("update userinfo set deleted = 0 where userinfo_guid = @guid", new { @guid = account.Userinfo_guid }); | ||||||
|                             } |                             } | ||||||
|                             else |                             else | ||||||
|                             { |                             { | ||||||
|                                 //產生一組GUID |                                 //產生一組GUID | ||||||
|                                 var guid = Guid.NewGuid();  //角色GUID |                                 var guid = Guid.NewGuid();  //角色GUID | ||||||
|                                 Dictionary<string, object> role = new Dictionary<string, object>(); |                                 Dictionary<string, object> user = new Dictionary<string, object>(); | ||||||
|                                 role = new Dictionary<string, object>() |                                 user = new Dictionary<string, object>() | ||||||
|                                 { |                                 { | ||||||
|                                     { "@role_guid", guid}, |                                     { "@userinfo_guid", guid}, | ||||||
|                                     { "@full_name", acc.Account}, |                                     { "@full_name", acc.Account}, | ||||||
|                                     { "@account", acc.Account}, |                                     { "@account", acc.Account}, | ||||||
|                                     { "@role_guid", "F127F501-A7BB-4C46-AB82-0809C1C8D2C1"}, |                                     { "@role_guid", "F127F501-A7BB-4C46-AB82-0809C1C8D2C1"}, | ||||||
| @ -951,7 +951,7 @@ namespace FrontendWebApi.ApiControllers | |||||||
|                                     { "@created_at", DateTime.Now} |                                     { "@created_at", DateTime.Now} | ||||||
|                                 }; |                                 }; | ||||||
| 
 | 
 | ||||||
|                                 await backendRepository.AddOneByCustomTable(role, "role"); |                                 await backendRepository.AddOneByCustomTable(user, "userinfo"); | ||||||
|                             } |                             } | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user