반응형

DAO는 파라미터, 리턴 값 모두 HashMap<String, String> 으로 한다.


    <!-- 타겟팅 전체 대상자 수 조회 및 쿼리 -->

    <parameterMap id="paramMap" type="hashmap">

    <parameter property="v_in_dimen_val1" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" />

    <parameter property="v_in_dimen_val2" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" />

    <parameter property="v_in_dimen_val3" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" /> 

<parameter property="v_in_where" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" /> 

<parameter property="v_out_cnt" mode="OUT" jdbcType="VARCHAR" javaType="string" />

<parameter property="v_out_query" mode="OUT" jdbcType="VARCHAR" javaType="string" />

    <parameter property="v_in_target_id" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" />

    <parameter property="v_in_query" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" />

<parameter property="v_out_save_yn" mode="OUT" jdbcType="VARCHAR" javaType="string" />

<parameter property="v_out_save_cnt" mode="OUT" jdbcType="VARCHAR" javaType="string" />

    </parameterMap>

    <select id="execTargetMemberCount" statementType="CALLABLE" parameterType="hashmap">

    {

     call SP_SCENARIO_TARGET_COUNT

     (

         #{v_in_dimen_val1, mode=IN, jdbcType=VARCHAR, javaType=string}

        ,#{v_in_dimen_val2, mode=IN, jdbcType=VARCHAR, javaType=string} 

        ,#{v_in_dimen_val3, mode=IN, jdbcType=VARCHAR, javaType=string}  

        ,#{v_in_where, mode=IN, jdbcType=VARCHAR, javaType=string}

        ,#{v_out_cnt, mode=OUT, jdbcType=VARCHAR, javaType=string}

        ,#{v_out_query, mode=OUT, jdbcType=VARCHAR, javaType=string}

     )

    }

    </select>

    <select id="execTargetMemberInsert" statementType="CALLABLE" parameterType="hashmap">

    {

     call SP_SCENARIO_TARGET_SAVE

     (

         #{v_in_target_id, mode=IN, jdbcType=VARCHAR, javaType=string}

        ,#{v_in_query, mode=IN, jdbcType=VARCHAR, javaType=string}

        ,#{v_out_save_yn, mode=OUT, jdbcType=VARCHAR, javaType=string} 

        ,#{v_out_save_cnt, mode=OUT, jdbcType=VARCHAR, javaType=string}  

     )

    }

    </select>

반응형

WRITTEN BY
데르벨준

,