<?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.common.mapper.AppLogMapper">

    <insert id="batchInsert" parameterType="list">
        INSERT INTO applog (
        es_index, es_type, es_id, es_score, dt_time, collect_time, log_type,
        trace_id, method, app_name, ip, class_name, env, content, thread_name,
        log_level, seq, indexed_at, log_date, created_at, updated_at
        ) VALUES
        <foreach collection="list" item="item" separator=",">
            (
            #{item.esIndex}, #{item.esType}, #{item.esId}, #{item.esScore}, #{item.dtTime},
            #{item.collectTime}, #{item.logType}, #{item.traceId}, #{item.method},
            #{item.appName}, #{item.ip}, #{item.className}, #{item.env}, #{item.content},
            #{item.threadName}, #{item.logLevel}, #{item.seq}, #{item.indexedAt},
            #{item.logDate}, #{item.createdAt}, #{item.updatedAt}
            )
        </foreach>
    </insert>

</mapper>