Browse Source

新增菜单是否dc后端

develop
王兴琳 6 months ago
parent
commit
33e4dd1c5a
  1. 11
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
  2. 15
      ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml

11
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java

@ -66,6 +66,17 @@ public class SysMenu extends BaseEntity
/** 子菜单 */
private List<SysMenu> children = new ArrayList<SysMenu>();
/** 菜单区分标识*/
private Long distinguish;
public Long getDistinguish() {
return distinguish;
}
public void setDistinguish(Long distinguish) {
this.distinguish = distinguish;
}
public Long getMenuId()
{
return menuId;

15
ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml

@ -25,10 +25,12 @@
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="remark" column="remark" />
<result property="remark" column="remark" />
<result property="distinguish" column="distinguish" />
</resultMap>
<sql id="selectMenuVo">
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
</sql>
@ -41,6 +43,9 @@
<if test="visible != null and visible != ''">
AND visible = #{visible}
</if>
<if test="distinguish != null and distinguish != ''">
AND distinguish=#{distinguish}
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
@ -49,7 +54,7 @@
</select>
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.distinguish, m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
order by m.parent_id, m.order_num
</select>
@ -69,6 +74,9 @@
</if>
<if test="status != null and status != ''">
AND m.status = #{status}
</if>
<if test="distinguish != null and distinguish != ''">
AND m.distinguish = #{distinguish}
</if>
order by m.parent_id, m.order_num
</select>
@ -143,6 +151,7 @@
<if test="icon !=null and icon != ''">icon = #{icon},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="distinguish != null and distinguish != ''">distinguish = #{distinguish},</if>
update_time = sysdate()
</set>
where menu_id = #{menuId}
@ -166,6 +175,7 @@
<if test="icon != null and icon != ''">icon,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="distinguish != null">distinguish,</if>
create_time
)values(
<if test="menuId != null and menuId != 0">#{menuId},</if>
@ -184,6 +194,7 @@
<if test="icon != null and icon != ''">#{icon},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="distinguish != null ">#{distinguish},</if>
sysdate()
)
</insert>

Loading…
Cancel
Save