1
13693261870
2024-09-10 9ec7cc0254126fc72f8cb5bdcf79fef9a61230e9
se-modules/se-system/src/main/resources/mapper/system/SysMenuMapper.xml
@@ -59,19 +59,27 @@
   <select id="selectMenuListByUserId" parameterType="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, m.mark
      from sys_menu m
      left join sys_role_menu rm on m.menu_id = rm.menu_id
      left join sys_user_role ur on rm.role_id = ur.role_id
      left join sys_role ro on ur.role_id = ro.role_id
      where ur.user_id = #{params.userId}
      <if test="menuName != null and menuName != ''">
            AND m.menu_name like concat('%', #{menuName}, '%')
      </if>
      <if test="visible != null and visible != ''">
            AND m.visible = #{visible}
      </if>
      <if test="status != null and status != ''">
            AND m.status = #{status}
      </if>
         left join sys_role_menu rm on m.menu_id = rm.menu_id
         left join sys_user_role ur on rm.role_id = ur.role_id
         left join sys_role ro on ur.role_id = ro.role_id
      -- where ur.user_id = #{params.userId}
      <where>
         <if test="userId != null">
            ur.user_id = #{userId}
         </if>
         <if test="menuName != null and menuName != ''">
            AND m.menu_name like concat('%', #{menuName}, '%')
         </if>
         <if test="visible != null and visible != ''">
            AND m.visible = #{visible}
         </if>
         <if test="status != null and status != ''">
            AND m.status = #{status}
         </if>
         <if test="mark != null and mark != ''">
            AND m.mark = #{mark}
         </if>
      </where>
      order by m.parent_id, m.order_num
   </select>
@@ -83,7 +91,7 @@
          left join sys_role ro on ur.role_id = ro.role_id
          left join sys_user u on ur.user_id = u.user_id
      where m.menu_type in ('M', 'C') and m.status = 0 and ro.status = 0
         <if test="userId != null and userId != ''">
         <if test="userId != null">
            and u.user_id = #{userId}
         </if>
         <if test="mark != null and mark != ''">