修改同步niagara賬號

This commit is contained in:
dev02 2023-01-04 16:19:23 +08:00
parent 18426a3624
commit ce738a64f4

View File

@ -923,7 +923,7 @@ namespace FrontendWebApi.ApiControllers
try
{
//await backendRepository.ExecuteSql("update userinfo deleted = 1 where deleted = 0");
await backendRepository.ExecuteSql("update userinfo deleted = 1 where deleted = 0");
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 });
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
{
//產生一組GUID
var guid = Guid.NewGuid(); //角色GUID
Dictionary<string, object> role = new Dictionary<string, object>();
role = new Dictionary<string, object>()
Dictionary<string, object> user = new Dictionary<string, object>();
user = new Dictionary<string, object>()
{
{ "@role_guid", guid},
{ "@userinfo_guid", guid},
{ "@full_name", acc.Account},
{ "@account", acc.Account},
{ "@role_guid", "F127F501-A7BB-4C46-AB82-0809C1C8D2C1"},
@ -951,7 +951,7 @@ namespace FrontendWebApi.ApiControllers
{ "@created_at", DateTime.Now}
};
await backendRepository.AddOneByCustomTable(role, "role");
await backendRepository.AddOneByCustomTable(user, "userinfo");
}
}
}