<?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.ag.log.mapper.TopicUserColMapper">

    <resultMap id="BaseResultMap" type="com.ag.log.TopicUserCol">
            <id property="id" column="ID" jdbcType="VARCHAR"/>
            <result property="userId" column="USER_ID" jdbcType="VARCHAR"/>
            <result property="userName" column="USER_NAME" jdbcType="VARCHAR"/>
            <result property="topicRespId" column="TOPIC_RESP_ID" jdbcType="VARCHAR"/>
            <result property="topicRespName" column="TOPIC_RESP_NAME" jdbcType="VARCHAR"/>
            <result property="createdBy" column="CREATED_BY" jdbcType="VARCHAR"/>
            <result property="createdOn" column="CREATED_ON" jdbcType="TIMESTAMP"/>
            <result property="updatedBy" column="UPDATED_BY" jdbcType="VARCHAR"/>
            <result property="updatedOn" column="UPDATED_ON" jdbcType="TIMESTAMP"/>
    </resultMap>

    <sql id="Base_Column_List">
        ID,USER_ID,USER_NAME,
        TOPIC_RESP_ID,TOPIC_RESP_NAME,CREATED_BY,
        CREATED_ON,UPDATED_BY,UPDATED_ON
    </sql>

    <delete id="deleteByUserIds" parameterType="List">
        DELETE FROM  TOPIC_USER_COL WHERE CONCAT(USER_ID,'#',USER_NAME)  IN
        <foreach close=")" collection="list" item="item" open="(" separator=",">
            #{item}
        </foreach>
    </delete>
</mapper>
