<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" trace="false">
    <bm:fields>
        <bm:field name="max_date" databaseType="DATE" datatype="java.util.Date"/>
        <bm:field name="max_date_format" databaseType="VARCHAR2" datatype="java.lang.String"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    NVL(MAX(r.last_update_date),to_date('19400101','yyyymmdd')) AS max_date,
                    to_char(NVL(MAX(r.last_update_date),to_date('19400101','yyyymmdd')),'YYYY-MM-DD hh24:mi:ss') AS max_date_format
                 FROM
                    zj_wfl_instance_node_recipient r
                WHERE
                    r.user_id = ${/session/@user_id}
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
