簡體   English   中英

如何調用在MyBatis中返回Oracle記錄類型的Oracle函數

[英]How to call Oracle function which return Oracle record type in MyBatis

我在包裝規格中有記錄類型:

 TYPE Payment_Capabilities IS RECORD(
    pp_partial_payment NUMBER(1) DEFAULT 0,
    co_advance_payment NUMBER(1) DEFAULT 0,
    dp_deposit_payment NUMBER(1) DEFAULT 0,
    dr_deposit_repay   NUMBER(1) DEFAULT 0,
    wp_wallet_payment  NUMBER(1) DEFAULT 0,
    wr_wallet_repay    NUMBER(1) DEFAULT 0,
    ss_prepaid_payment NUMBER(1) DEFAULT 0);

和返回此類型的函數。 我正在使用MyBatis與Spring集成。 如何調用(使用MyBatis XML Mapper)此函數並將結果映射到POJO對象?

<select id="identifyPaymentCapabilities" parameterType="PaymentCapabilities" statementType="CALLABLE">
    DECLARE
        v_payment_capabilities APS.Payment_Capabilities;
    BEGIN
        v_payment_capabilities := APS.get_payment_capabilities(#{customerId, javaType=Integer, jdbcType=NUMERIC, mode=IN});

        #{partialPaymentPP, javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.pp_partial_payment;
        #{advancePaymentCO, javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.co_advance_payment;
        #{depositPaymentDP, javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.dp_deposit_payment;
        #{depositRepayDR,   javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.dr_deposit_repay;
        #{walletPaymentWP,  javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.wp_wallet_payment;
        #{walletRepayWR,    javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.wr_wallet_repay;
        #{prepaidPaymentSS, javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.ss_prepaid_payment;
    END;
</select>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM