da_ky_sys_menu

This commit is contained in:
liang.chao 2025-12-09 14:47:43 +08:00
parent 047f9d8ab1
commit 00ec5e80f7
2 changed files with 20 additions and 20 deletions

View File

@ -30,7 +30,7 @@
<sql id="selectMenuVo">
select menu_id, menu_name, parent_id, order_num, path, component, `query`, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
from da_ky_sys_menu
from record_da_ky_sys_menu
</sql>
<select id="selectMenuList" parameterType="org.springblade.common.core.domain.entity.SysMenu" resultMap="SysMenuResult">
@ -51,13 +51,13 @@
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, 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 da_ky_sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
from record_da_ky_sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
order by m.parent_id, m.order_num
</select>
<select id="selectMenuListByUserId" parameterType="org.springblade.common.core.domain.entity.SysMenu" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, 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 da_ky_sys_menu m
from record_da_ky_sys_menu m
left join da_ky_sys_role_menu rm on m.menu_id = rm.menu_id
left join da_ky_sys_user_role ur on rm.role_id = ur.role_id
left join da_ky_sys_role ro on ur.role_id = ro.role_id
@ -76,7 +76,7 @@
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, 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 da_ky_sys_menu m
from record_da_ky_sys_menu m
left join da_ky_sys_role_menu rm on m.menu_id = rm.menu_id
left join da_ky_sys_user_role ur on rm.role_id = ur.role_id
left join da_ky_sys_role ro on ur.role_id = ro.role_id
@ -87,25 +87,25 @@
<select id="selectMenuListByRoleId" resultType="Long">
select m.menu_id
from da_ky_sys_menu m
from record_da_ky_sys_menu m
left join da_ky_sys_role_menu rm on m.menu_id = rm.menu_id
where rm.role_id = #{roleId}
<if test="menuCheckStrictly">
and m.menu_id not in (select m.parent_id from da_ky_sys_menu m inner join da_ky_sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
and m.menu_id not in (select m.parent_id from record_da_ky_sys_menu m inner join da_ky_sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
</if>
order by m.parent_id, m.order_num
</select>
<select id="selectMenuPerms" resultType="String">
select distinct m.perms
from da_ky_sys_menu m
from record_da_ky_sys_menu m
left join da_ky_sys_role_menu rm on m.menu_id = rm.menu_id
left join da_ky_sys_user_role ur on rm.role_id = ur.role_id
</select>
<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
select distinct m.perms
from da_ky_sys_menu m
from record_da_ky_sys_menu m
left join da_ky_sys_role_menu rm on m.menu_id = rm.menu_id
left join da_ky_sys_user_role ur on rm.role_id = ur.role_id
left join da_ky_sys_role r on r.role_id = ur.role_id
@ -114,7 +114,7 @@
<select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String">
select distinct m.perms
from da_ky_sys_menu m
from record_da_ky_sys_menu m
left join da_ky_sys_role_menu rm on m.menu_id = rm.menu_id
where m.status = '0' and rm.role_id = #{roleId}
</select>
@ -125,7 +125,7 @@
</select>
<select id="hasChildByMenuId" resultType="Integer">
select count(1) from da_ky_sys_menu where parent_id = #{menuId}
select count(1) from record_da_ky_sys_menu where parent_id = #{menuId}
</select>
<select id="checkMenuNameUnique" parameterType="org.springblade.common.core.domain.entity.SysMenu" resultMap="SysMenuResult">
@ -134,7 +134,7 @@
</select>
<update id="updateMenu" parameterType="org.springblade.common.core.domain.entity.SysMenu">
update da_ky_sys_menu
update record_da_ky_sys_menu
<set>
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
<if test="parentId != null">parent_id = #{parentId},</if>
@ -158,7 +158,7 @@
</update>
<insert id="insertMenu" parameterType="org.springblade.common.core.domain.entity.SysMenu">
insert into da_ky_sys_menu(
insert into record_da_ky_sys_menu(
<if test="menuId != null and menuId != 0">menu_id,</if>
<if test="parentId != null and parentId != 0">parent_id,</if>
<if test="menuName != null and menuName != ''">menu_name,</if>
@ -200,7 +200,7 @@
</insert>
<delete id="deleteMenuById" parameterType="Long">
delete from da_ky_sys_menu where menu_id = #{menuId}
delete from record_da_ky_sys_menu where menu_id = #{menuId}
</delete>
</mapper>

View File

@ -97,9 +97,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--查询业务模块-->
<select id="getModule" resultType="org.springblade.common.core.domain.entity.SysLogsVo">
select CONCAT(IFNULL(sm.menu_name,''),'->',IFNULL(sm2.menu_name,'')) module ,sm3.menu_name operateDetail
from da_ky_sys_menu sm
left join da_ky_sys_menu sm2 on sm2.parent_id=sm.menu_id and sm2.menu_type=1
left join da_ky_sys_menu sm3 on sm3.parent_id=sm2.menu_id and sm3.menu_type=2
from record_da_ky_sys_menu sm
left join record_da_ky_sys_menu sm2 on sm2.parent_id=sm.menu_id and sm2.menu_type=1
left join record_da_ky_sys_menu sm3 on sm3.parent_id=sm2.menu_id and sm3.menu_type=2
where sm3.component=#{module}
limit 1
</select>
@ -107,10 +107,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getLogsErrorModule" resultType="org.springblade.common.core.domain.entity.SysLogsMenuHead">
select sm.menu_name menuName,sm.menu_type menuType,sm2.menu_name menuName2,
sm3.menu_name menuName3,sm4.menu_name menuName4
FROM da_ky_sys_menu sm
left join da_ky_sys_menu sm2 on sm.parent_id=sm2.menu_id and sm2.visible=0
left join da_ky_sys_menu sm3 on sm2.parent_id=sm3.menu_id and sm3.visible=0
left join da_ky_sys_menu sm4 on sm3.parent_id=sm4.menu_id and sm4.visible=0
FROM record_da_ky_sys_menu sm
left join record_da_ky_sys_menu sm2 on sm.parent_id=sm2.menu_id and sm2.visible=0
left join record_da_ky_sys_menu sm3 on sm2.parent_id=sm3.menu_id and sm3.visible=0
left join record_da_ky_sys_menu sm4 on sm3.parent_id=sm4.menu_id and sm4.visible=0
where sm.perms=#{params}
limit 1
</select>