<?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.ym.mec.biz.dal.dao.TempLittleArtistTrainingCampUserRelationDao">
    <resultMap id="BaseResultMap" type="com.ym.mec.biz.dal.entity.TempLittleArtistTrainingCampUserRelation">
        <id column="id_" jdbcType="INTEGER" property="id"/>
        <result column="activity_id_" jdbcType="INTEGER" property="activityId"/>
        <result column="user_id_" jdbcType="INTEGER" property="userId"/>
        <result column="im_group_id_" jdbcType="VARCHAR" property="imGroupId"/>
        <result column="state_" jdbcType="VARCHAR" property="state"/>
        <result column="create_time_" jdbcType="TIMESTAMP" property="createTime"/>
        <result column="apply_time_" jdbcType="TIMESTAMP" property="applyTime"/>
    </resultMap>

    <sql id="Base_Column_List">
        id_
        , activity_id_, user_id_, im_group_id_, state_, create_time_,apply_time_
    </sql>

    <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
            parameterType="com.ym.mec.biz.dal.entity.TempLittleArtistTrainingCampUserRelation">
        insert into temp_little_artist_training_camp_user_relation(activity_id_, user_id_, im_group_id_, state_,
        create_time_,apply_time_)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.activityId}, #{entity.userId}, #{entity.imGroupId}, #{entity.state}, #{entity.createTime},#{entity.applyTime})
        </foreach>
    </insert>

</mapper>
