<?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.yami.shop.mp.comment.dao.WeixinMaterialMapper">
  <resultMap id="BaseResultMap" type="com.yami.shop.mp.comment.model.WeixinMaterial">
    <!--
      WARNING - @mbg.generated
    -->
    <result column="media_id" jdbcType="VARCHAR" property="mediaId" />
    <result column="media_type" jdbcType="VARCHAR" property="mediaType" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="media_name" jdbcType="VARCHAR" property="mediaName" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  </resultMap>
  <insert id="insertBatch">
    insert into tz_weixin_material (media_id,media_type,update_time,media_name,content)
    values
    <foreach collection="materials" item="material" separator=",">
      (#{material.mediaId},#{material.mediaType},#{material.updateTime},#{material.mediaName},#{material.content} )
    </foreach>
  </insert>
</mapper>