| | |
| | | |
| | | <select id="listMenuIdByRoleId" resultType="Long"> |
| | | SELECT sm.menu_id FROM tz_sys_role_menu rm LEFT JOIN |
| | | tz_sys_menu sm ON rm.menu_id=sm.menu_id WHERE sm.app_type=#{appType} AND rm.role_id=#{roleId} |
| | | tz_sys_menu sm ON rm.menu_id=sm.menu_id WHERE rm.role_id=#{roleId} |
| | | AND (sm.app_type = #{appType} OR FIND_IN_SET(#{appType}, REPLACE(sm.app_type, ' ', '')) OR sm.app_type IS NULL OR sm.app_type = '') |
| | | </select> |
| | | |
| | | <!-- 查询用户的所有菜单 --> |
| | |
| | | WHERE ur.user_id = #{userId} and m.type != 2 |
| | | |
| | | <if test="appType!=null and appType!='' "> |
| | | AND app_type=#{appType} |
| | | AND (m.app_type = #{appType} OR FIND_IN_SET(#{appType}, REPLACE(m.app_type, ' ', '')) OR m.app_type IS NULL OR m.app_type = '') |
| | | </if> |
| | | |
| | | order by order_num |
| | |
| | | <select id="listMenu" resultType="com.yami.trading.sys.model.SysMenu"> |
| | | select * from tz_sys_menu where `type` != 2 |
| | | <if test="appType!=null and appType!='' "> |
| | | AND app_type=#{appType} |
| | | AND (app_type = #{appType} OR FIND_IN_SET(#{appType}, REPLACE(app_type, ' ', '')) OR app_type IS NULL OR app_type = '') |
| | | </if> |
| | | order by order_num |
| | | </select> |
| | |
| | | select menu_id ,parent_id ,`name` from tz_sys_menu where `type` != 2 |
| | | |
| | | <if test="appType!=null and appType!='' "> |
| | | AND app_type=#{appType} |
| | | AND (app_type = #{appType} OR FIND_IN_SET(#{appType}, REPLACE(app_type, ' ', '')) OR app_type IS NULL OR app_type = '') |
| | | </if> |
| | | |
| | | order by order_num |
| | |
| | | <select id="listMenuAndBtn" resultType="com.yami.trading.sys.model.SysMenu"> |
| | | select * from tz_sys_menu where |
| | | 1=1 |
| | | <if test="appType!=null and appType!='' "> |
| | | AND app_type=#{appType} |
| | | </if> |
| | | <if test="appType!=null and appType!='' "> |
| | | AND (app_type = #{appType} OR FIND_IN_SET(#{appType}, REPLACE(app_type, ' ', '')) OR app_type IS NULL OR app_type = '') |
| | | </if> |
| | | order by order_num |
| | | </select> |
| | | |
| | | <!-- 查询用户的所有菜单 --> |
| | | <select id="listMenuByUserId2" resultType="com.yami.trading.sys.model.SysMenu"> |
| | | SELECT DISTINCT m.menu_id AS menu_id,m.parent_id,m.app_type,m.name,url,m.type,m.icon,m.order_num FROM tz_sys_menu m where 1=1 |
| | | <if test="appType!=null and appType!='' ">AND app_type=#{appType}</if> |
| | | <if test="appType!=null and appType!='' ">AND (app_type = #{appType} OR FIND_IN_SET(#{appType}, REPLACE(app_type, ' ', '')) OR app_type IS NULL OR app_type = '')</if> |
| | | <if test="children != null and children.size()>0">and m.menu_id in |
| | | <foreach collection="children" item="item" index="index" open="(" close=")" separator=",">#{item}</foreach> |
| | | </if> |