diff --git a/FrontendWebApi/ApiControllers/UserController.cs b/FrontendWebApi/ApiControllers/UserController.cs index 3378667..8da4553 100644 --- a/FrontendWebApi/ApiControllers/UserController.cs +++ b/FrontendWebApi/ApiControllers/UserController.cs @@ -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("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 role = new Dictionary(); - role = new Dictionary() + Dictionary user = new Dictionary(); + user = new Dictionary() { - { "@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"); } } }