You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.0 KiB

<?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.youlai.boot.mini.mapper.MiniStrayAnimalNoteMediaMapper">
<select id="getMediaCountByNoteIdAndType" resultType="java.lang.Integer">
SELECT
count(1)
FROM
mini_stray_animal_note_media
WHERE
note_id = #{noteId} AND media_type = #{mediaType}
</select>
1 month ago
<select id="getMediaByNoteIdAndType" resultType="com.youlai.boot.mini.model.vo.MiniStrayAnimalNoteMediaVO">
SELECT
uuid AS noteMediaUuid,
media_type,
source_url,
storage_key,
thumbnail_url,
width,
height,
duration
FROM
mini_stray_animal_note_media
WHERE
note_id = #{noteId} AND media_type = #{mediaType} AND is_deleted = 0
ORDER BY id desc
</select>
</mapper>