|
@@ -4,13 +4,18 @@
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.xjrsoft.module.system.mapper.XjrMenuGroupMapper">
|
|
|
<select id="getMenuList" parameterType="com.xjrsoft.module.system.dto.XjrMenuGroupMenuListDto" resultType="com.xjrsoft.module.system.vo.XjrMenuGroupMenuListVo">
|
|
|
- SELECT id, name,(
|
|
|
+ SELECT id, NAME,(
|
|
|
SELECT COUNT(*) FROM xjr_menu_group WHERE delete_mark = 0 AND xjr_menu_group_set_id = #{dto.xjrMenuGroupSetId}
|
|
|
AND xjr_menu_id = xjr_menu.id
|
|
|
) AS is_selected,
|
|
|
- (SELECT COUNT(*) FROM xjr_menu_group WHERE delete_mark = 0 AND xjr_menu_group_set_id != #{dto.xjrMenuGroupSetId}
|
|
|
- AND xjr_menu_id = xjr_menu.id) as is_used FROM xjr_menu WHERE system_id = 1726806691140907010
|
|
|
+ (
|
|
|
+ SELECT COUNT(*) FROM xjr_menu_group a1
|
|
|
+ INNER JOIN xjr_menu_group_set a2 ON a1.xjr_menu_group_set_id = a2.id
|
|
|
+ WHERE a1.delete_mark = 0 AND a2.id != #{dto.xjrMenuGroupSetId} AND a2.role_id = #{dto.roleId}
|
|
|
+ AND a2.delete_mark = 0
|
|
|
+ AND a1.xjr_menu_id = xjr_menu.id
|
|
|
+ ) AS is_used FROM xjr_menu WHERE system_id = 1726806691140907010
|
|
|
AND delete_mark = 0 AND enabled_mark = 1
|
|
|
- and system_type = 'system_app'
|
|
|
+ AND system_type = 'system_app'
|
|
|
</select>
|
|
|
</mapper>
|