xiaoyong931011
2023-10-10 6a99e83107428159d321c1b77cb994e0b2f92fe5
src/main/resources/mapper/modules/ChatUserMapper.xml
@@ -7,7 +7,10 @@
        a.user_id userId,
        a.nick_name nickName,
        a.chat_no chatNo,
        a.phone phone,
        a.status status,
        a.invite_id inviteId,
        a.is_robot isRobot,
        date_format(a.create_time, '%Y-%m-%d %H:%m:%s') createTime,
        IFNULL(sum(b.total_amount), 0) totalAmount,
        IFNULL(sum(b.ava_amount), 0) avaAmount
@@ -18,8 +21,8 @@
                <if test="record.nickName != null and record.nickName != ''">
                    and a.nick_name like CONCAT('%', CONCAT(#{record.nickName}, '%'))
                </if>
                <if test="record.chatNo != null and record.chatNo != ''">
                    and a.chat_no = #{record.chatNo}
                <if test="record.inviteId != null and record.inviteId != ''">
                    and a.invite_id = #{record.inviteId}
                </if>
                <if test="record.status != null and record.status != ''">
                    and a.status = #{record.status}
@@ -154,4 +157,11 @@
        update chat_amount_flow set state = #{state} where user_id = #{userId} and relation_id = #{id}
    </update>
    <update id="updateIsRobotByUserId">
        update chat_user
        set
            is_robot = #{isRobot}
        where user_id = #{userId}
    </update>
</mapper>