<?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="org.ruoyi.system.mapper.CoverPromptAudioMapper">

    <select id="selectLatestVoByUserId" resultType="org.ruoyi.system.domain.vo.cover.CoverPromptAudioVo">
        SELECT
            user_id,
            cover_id,
            prompt_audio_url
        FROM
            chat_cover_prompt_audio
        WHERE
            cover_id = ( SELECT cover_id FROM chat_cover_prompt_audio WHERE user_id = #{userId} ORDER BY create_time DESC LIMIT 1 )
    </select>
</mapper>
