<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzs.member.account.mapper.CuMemberRechargeDetailMapper">

    <insert id="batchSaveMemberRechargeDetail" parameterType="com.hzs.common.domain.member.account.CuMemberRechargeDetail">
        insert into CU_MEMBER_RECHARGE_DETAIL (PK_ID, RECHARGE_CODE, PAYMENT_METHOD, PAYMENT_AMOUNT,PK_CREATOR,PAYMENT_BALANCE,PAYMENT_BEFORE_BALANCE)
        SELECT cu_member_recharge_detail_seq.nextval,d.* FROM
        (
        <foreach collection="cuMemberRechargeDetails" item="item" separator="UNION ALL">
            SELECT #{item.rechargeCode},#{item.paymentMethod},#{item.paymentAmount}
            ,#{item.pkCreator},#{item.paymentBalance},#{item.paymentBeforeBalance}
            FROM dual
        </foreach>
        ) d
    </insert>

</mapper>
