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.
40 lines
1.2 KiB
40 lines
1.2 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="org.dromara.sample.wayline.mapper.IAiCompareMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<select id="listMediaFile" resultType="org.dromara.sample.wayline.model.dto.AiCompareMediaFileDTO">
|
|
SELECT
|
|
ai.id as compareId,
|
|
mf.file_index,
|
|
mf.file_id,
|
|
mf.file_name,
|
|
mf.object_key,
|
|
mf.job_id,
|
|
mfi.file_id AS mateFileId,
|
|
mfi.file_name AS mateFileName,
|
|
mfi.object_key AS mateObjectKey,
|
|
mfi.file_index AS mateFileIndex,
|
|
mfi.create_time AS mateFileDate
|
|
FROM
|
|
media_file mf
|
|
JOIN media_file mfi ON mf.file_index = mfi.file_index
|
|
JOIN ai_compare ai ON ai.template_id = mfi.job_id
|
|
WHERE
|
|
mf.file_status = mfi.file_status
|
|
AND mf.file_id != mfi.file_id
|
|
AND mf.file_index = mfi.file_index
|
|
AND mf.file_type = 'jpeg'
|
|
AND mfi.file_type = 'jpeg'
|
|
AND mf.job_id = #{jobId}
|
|
AND ai.id = #{compareId}
|
|
ORDER BY
|
|
mf.file_index,
|
|
mf.file_status;
|
|
</select>
|
|
</mapper>
|
|
|