<?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.tuoheng.admin.mapper.WorkOrderFileMapper">
    
    <resultMap type="com.tuoheng.admin.entity.WorkOrderFile" id="WorkOrderFileResult">
        <result property="tenantId"    column="tenant_id"    />
        <result property="workOrderId"    column="work_order_id"    />
        <result property="inspectionFileId"    column="inspection_file_id"    />
    </resultMap>

    <sql id="selectThWorkOrderFileVo">
        select tenant_id, work_order_id, inspection_file_id from th_work_order_file
    </sql>

    <!-- 批量新增数据 -->
    <insert id="insertBatch" parameterType="com.tuoheng.admin.entity.WorkOrderFile">
        insert into th_work_order_file (tenant_id, work_order_id, inspection_file_id)
        VALUES
        <foreach collection="list" item="item" index="index" separator=",">
            ( #{item.tenantId, jdbcType=INTEGER}, #{item.workOrderId, jdbcType=VARCHAR}, #{item.inspectionFileId, jdbcType=VARCHAR} )
        </foreach>
    </insert>

</mapper>