xiaoyong931011
2021-05-28 5f01a837bd50d842201ec6d0ec459829758b6940
src/main/resources/mapper/otc/OtcMsgUserListDao.xml
@@ -8,11 +8,19 @@
               a.is_read isRead,
               a.target_id targetId,
               a.member_id memberId,
               a.last_msg_time lastMsgTime
               a.last_msg_time lastMsgTime,
               b.name nickname
        from otc_msg_user_list a
        left join member b on a.target_id = b.id
        <where>
            <if test="record!=null">
                    a.member_id = #{record.memberId}
                <if test="record.nickname != null and record.nickname == ''">
                    and b.name like concat('%',  #{record.nickname},'%')
                </if>
            </if>
            <if test="record!=null">
                a.member_id = #{record.memberId}
            </if>
        </where>
        order by a.create_time desc