sys_role_flag.lwm 1.23 KB
Newer Older
liyuan.chen's avatar
liyuan.chen committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author:
    $Date: 2020-05-11
    $Revision: 1.0  
    $Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:fields>
        <bm:field name="role_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ROLE_CODE"/>
    </bm:fields>

    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
liyuan.chen's avatar
liyuan.chen committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
            	 Select nvl(decode(${/session/@user_id},
                        10413,
                        'NO',
                        (Select decode(t.role_code,
                                       '0014',
                                       'YES',
                                       '0013',
                                       'YES',
                                       '0017',
                                       'YES',
                                       'HAND',
                                       'YES',
                                       'N')
                           From sys_role t
                          Where t.role_id = ${/session/@role_id})), 'N') as role_code
            From dual
liyuan.chen's avatar
liyuan.chen committed
32 33 34 35
    		]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>