KKSU
2023-11-07 10ad2e710d2bd52aac31d5d63a7bb6beae76b6a8
src/main/resources/mapper/modules/ChatUserMapper.xml
@@ -32,6 +32,9 @@
                <if test="record.status != null and record.status != ''">
                    and a.status = #{record.status}
                </if>
                <if test="record.isRobot != null">
                    and a.is_robot = #{record.isRobot}
                </if>
            </if>
        </where>
        group by a.user_id
@@ -452,5 +455,29 @@
        where user_id = #{userId}
    </update>
    <delete  id="deleteMsgByCreateTime">
        DELETE from chat_msg where create_time &lt; #{dateTime}
    </delete>
    <select id="selectChatRedBagByCreateTime" resultType="java.lang.Long">
        select id
        from chat_red_bag
        where create_time &lt; #{dateTime} order By create_time desc limit 1
    </select>
    <delete  id="deleteChatRedBagById">
        DELETE from chat_red_bag where id &lt; #{id}
    </delete>
    <select id="selectChatRedBagRecordByRebBagId" resultType="java.lang.Long">
        select id
        from chat_red_bag_record
        where red_bag_id = #{id}
    </select>
    <delete  id="deleteChatRedBagRecordById">
        DELETE from chat_red_bag_record where id &lt; #{id}
    </delete>
</mapper>