From b5bc0d6eb2d2e55ea830a1b286252b9754cbf8e9 Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期三, 21 八月 2024 11:21:04 +0800 Subject: [PATCH] 更新主从表添加、修改、删除时对从表的对应操作 --- WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_MenuRepository.cs | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_MenuRepository.cs b/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_MenuRepository.cs index e58f5a0..4ecf724 100644 --- a/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_MenuRepository.cs +++ b/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_MenuRepository.cs @@ -1,4 +1,5 @@ -锘縰sing System; +锘縰sing SqlSugar; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; @@ -105,7 +106,7 @@ { //娌℃湁redis/memory缂撳瓨瑙掕壊鐨勭増鏈彿鎴栦笌褰撳墠鏈嶅姟鍣ㄧ殑瑙掕壊鐗堟湰鍙蜂笉鍚屾椂锛屽埛鏂扮紦瀛� - List<Permissions> _permissions = QueryTabs<Sys_Menu, Sys_RoleAuth, Permissions>((a, b) => new object[] { a.MenuId, b.MenuId }, (a, b) => new Permissions { MenuId = a.MenuId, ParentId = a.ParentId, TableName = (a.TableName ?? "").ToLower(), MenuAuth = a.Auth, UserAuth = b.AuthValue ?? "", MenuType = a.MenuType ?? 0 }, x => true); + List<Permissions> _permissions = QueryTabs<Sys_Menu, Sys_RoleAuth, Permissions>((a, b) => new object[] { JoinType.Inner, a.MenuId == b.MenuId }, (a, b) => new Permissions { MenuId = a.MenuId, ParentId = a.ParentId, TableName = (a.TableName ?? "").ToLower(), MenuAuth = a.Auth, UserAuth = b.AuthValue ?? "", MenuType = a.MenuType ?? 0 }, (a, b) => b.RoleId == roleId, x => true); ActionToArray(_permissions); -- Gitblit v1.9.3