shenyijian
2023-11-16 ae0db4ad3e552385ae8d3629dd9c594d9e3c7309
src/main/java/com/dji/sample/media/dao/IFileMapper.xml
@@ -58,16 +58,14 @@
        <if test="param.endTime !=null and param.endTime !=null">
            AND DATE_FORMAT(FROM_UNIXTIME(j.create_time/1000,'%Y-%m-%d'),'%Y-%m-%d')   &lt;= DATE_FORMAT(#{param.endTime},'%Y-%m-%d')
        </if>
        <if test="param.sort eq 2">
            and j.collect_status = 1
        </if>
        <if test="param.sort eq 3">
            and m.collect_status = 1
        </if>
        <if test="param.waylineFileId != null and param.waylineFileId != ''">
            and w.wayline_id = #{param.waylineFileId}
        </if>
        GROUP BY m.job_id
        ORDER BY
        <if test="param.sort eq 2">j.collect_status = 1 desc,</if>
        <if test="param.sort eq 3">m.collect_status = 1 desc,</if>
        j.create_time desc
    </select>
    <select id="mediaDetail" resultType="com.dji.sample.media.model.MediaJobDTO">
        SELECT
@@ -84,5 +82,6 @@
        <if test="jobId != null and jobId != ''">
            and m.job_id = #{jobId}
        </if>
        ORDER BY type = '视频' DESC
    </select>
</mapper>