sys_page_menu.lwm 1.36 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hty
    $Date: 2018/5/29 11:41
    $Revision: 1.0 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    v.function_id,
                    v.function_code,
                    v.function_name,
                    v.menu_id,
                    v.parent_menu_id,
                    (select function_name from sys_role_menu_v where menu_id = v.parent_menu_id) parent_function_name,
                    (select function_name from sys_role_menu_v where menu_id = (
                    select
                        parent_menu_id
                    from
                        sys_role_menu_v
                    where
                        menu_id = v.parent_menu_id)) grand_parent_function_name,
                    (select nvl(sum(1),0) from sys_role_menu_v v1 where v1.parent_menu_id=v.menu_id) sub_menu_count
                FROM
                    sys_role_menu_v v
                WHERE
                    v.function_code = ${@function_code}
                    and v.role_id = ${/session/@role_id}
                ORDER BY
                    v.layout_sequence
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>