<?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.ConversationUserRelDao">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ads.business.entity.ConversationUserRel">
        <id column="id" property="id"/>
        <result column="chat_id" property="chatId"/>
        <result column="open_conversation_id" property="openConversationId"/>
        <result column="user_id" property="userId"/>
        <result column="phone" property="phone"/>
        <result column="user_name" property="userName"/>
        <result column="avatar" property="avatar"/>
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, chat_id, open_conversation_id, user_id, phone, user_name, avatar
    </sql>

    <select id="getByChatId" resultType="com.ads.business.service.model.response.ConversationUserRelResponse">
         select user_id,
                user_name,
                avatar
         from    hsay_conversation_user_rel
         ${ew.customSqlSegment}
    </select>

</mapper>
