From 6048a3833c25fa116bae4806011c6f1ee816e64a Mon Sep 17 00:00:00 2001 From: liguoyang Date: Fri, 6 Jun 2025 13:50:49 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=97=A0=E4=B8=BB=E9=94=AE=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=AE=9E=E4=BD=93=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/Dlhis.Sys/Identity/Services/Implements/RoleService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Src/Dlhis.Sys/Identity/Services/Implements/RoleService.cs b/Src/Dlhis.Sys/Identity/Services/Implements/RoleService.cs index efef85c0..bde06712 100644 --- a/Src/Dlhis.Sys/Identity/Services/Implements/RoleService.cs +++ b/Src/Dlhis.Sys/Identity/Services/Implements/RoleService.cs @@ -111,7 +111,12 @@ public class RoleService : IRoleService } else { - await _dbContext.DeleteReallyAsync(userRole); + if (userRole != null) + { + await _dbContext.Deleteable() + .Where(x => x.UserId == request.UserId) + .ExecuteCommandAsync(); + } } }