From 33e4dd1c5af5b8913ef94cb9bc7b94f2b62e373c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Wed, 5 Jun 2024 09:52:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8F=9C=E5=8D=95=E6=98=AF?= =?UTF-8?q?=E5=90=A6dc=E5=90=8E=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/common/core/domain/entity/SysMenu.java | 11 +++++++++++ .../resources/mapper/system/SysMenuMapper.xml | 15 +++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java index e07e6b94..9983ed1a 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java @@ -66,6 +66,17 @@ public class SysMenu extends BaseEntity /** 子菜单 */ private List children = new ArrayList(); + /** 菜单区分标识*/ + private Long distinguish; + + public Long getDistinguish() { + return distinguish; + } + + public void setDistinguish(Long distinguish) { + this.distinguish = distinguish; + } + public Long getMenuId() { return menuId; diff --git a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml index cdd15167..9f1d22b1 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml @@ -25,10 +25,12 @@ + + - select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time + select distinguish, menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time from sys_menu @@ -41,6 +43,9 @@ AND visible = #{visible} + + AND distinguish=#{distinguish} + AND status = #{status} @@ -49,7 +54,7 @@ @@ -69,6 +74,9 @@ AND m.status = #{status} + + + AND m.distinguish = #{distinguish} order by m.parent_id, m.order_num @@ -143,6 +151,7 @@ icon = #{icon}, remark = #{remark}, update_by = #{updateBy}, + distinguish = #{distinguish}, update_time = sysdate() where menu_id = #{menuId} @@ -166,6 +175,7 @@ icon, remark, create_by, + distinguish, create_time )values( #{menuId}, @@ -184,6 +194,7 @@ #{icon}, #{remark}, #{createBy}, + #{distinguish}, sysdate() )