<?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="vip.xiaonuo.disk.mapper.FileMapper">

    <insert id="batchInsertFile" parameterType="java.util.List">
        INSERT ignore INTO file (USER_ID, FILE_NAME,TIME_STAMP_NAME, FILE_URL,
        FILE_PATH, EXTEND_NAME, UPLOAD_TIME, FILE_SIZE, IS_DIR)
        VALUES
        <foreach collection="list" item="file" index="index" separator=",">
        (#{file.userId}, #{file.fileName},#{file.timeStampName},
         #{file.fileUrl}, #{file.filePath}, #{file.extendName}, #{file.uploadTime},
         #{file.fileSize}, #{file.isDir})
        </foreach>
    </insert>


</mapper>
