<?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.ads.business.dao.ConversationDao">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ads.business.entity.Conversation">
        <id column="chat_id" property="chatId"/>
        <result column="open_conversation_id" property="openConversationId"/>
        <result column="conversation_tag" property="conversationTag"/>
        <result column="conversation_name" property="conversationName"/>
        <result column="owner_id" property="ownerId"/>
        <result column="show_history_type" property="showHistoryType"/>
        <result column="searchable" property="searchable"/>
        <result column="validation_type" property="validationType"/>
        <result column="mention_all_authority" property="mentionAllAuthority"/>
        <result column="management_type" property="managementType"/>
        <result column="chat_banned_type" property="chatBannedType"/>
        <result column="status" property="status"/>
        <result column="conversation_icon" property="conversationIcon"/>
        <result column="create_time" property="createTime"/>
        <result column="create_user" property="createUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="update_user" property="updateUser"/>
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        chat_id, open_conversation_id, conversation_tag, conversation_name, owner_id, show_history_type, searchable, validation_type, mention_all_authority, management_type, chat_banned_type, status, conversation_icon, create_time, create_user, update_time, update_user
    </sql>

    <select id="findPage" resultType="com.ads.business.service.model.response.ConversationListResponse">
         select chat_id,
                conversation_name,
                owner_name,
                create_time
         from    hsay_conversation
         ${ew.customSqlSegment}
    </select>

</mapper>
