From ce738a64f494d5029d914cfc1b46ced9fb5b9500 Mon Sep 17 00:00:00 2001 From: dev02 Date: Wed, 4 Jan 2023 16:19:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8C=E6=AD=A5niagara?= =?UTF-8?q?=E8=B3=AC=E8=99=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/UserController.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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"); } } }