<?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.simuwang.base.mapper.PdfValuationRecordMapper">
    <resultMap id="BaseResultMap" type="com.simuwang.base.pojo.dos.PdfValuationRecordDO">
        <id column="id" property="id"/>
        <result column="fund_id" property="fundId"/>
        <result column="upload_date" property="uploadDate"/>
        <result column="file_name" property="fileName"/>
        <result column="pdf_url" property="pdfUrl"/>
        <result column="excel_url" property="excelUrl"/>
        <result column="from_email" property="fromEmail"/>
        <result column="is_success" property="isSuccess"/>
        <result column="reason" property="reason"/>
        <result column="isvalid" property="isvalid"/>
        <result column="creatorid" property="creatorId"/>
        <result column="createtime" property="createTime"/>
        <result column="updaterid" property="updaterId"/>
        <result column="updatetime" property="updateTime"/>
    </resultMap>

    <insert id="batchInsert" parameterType="com.simuwang.base.pojo.dos.PdfValuationRecordDO"
            useGeneratedKeys="true" keyProperty="id">
        insert into PPW_EMAIL.pdf_valuation_record ( fund_id, upload_date, file_name, pdf_url,
        excel_url,from_email,is_success,reason,
        creatorid, createtime, updaterid, updatetime, isvalid)
        values
        <foreach collection="itemDoList" index="index" item="itemDo" separator=",">
            (#{itemDo.fundId},#{itemDo.uploadDate},#{itemDo.fileName}, #{itemDo.pdfUrl},
            #{itemDo.excelUrl},#{itemDo.fromEmail},#{itemDo.isSuccess},#{itemDo.reason},
            #{itemDo.creatorId}, #{itemDo.createTime}, #{itemDo.updaterId}, #{itemDo.updateTime}, #{itemDo.isvalid})
        </foreach>
    </insert>

</mapper>