吉安感知网项目-后端
linwei
2026-01-27 074d6df1043d26ce751f7a7f76b73582f24bfaff
drone-ops/drone-resource/src/main/java/org/sxkj/resource/mapper/AttachMapper.xml
@@ -22,32 +22,22 @@
    <!--自定义分页查询-->
    <select id="selectAttachPage" resultType="org.sxkj.resource.vo.AttachVO">
        select * from blade_attach where is_deleted = 0
        <if test="attach.nickName != null and attach.nickName != ''">
            AND (nick_name LIKE CONCAT('%', #{attach.nickName}, '%') OR name LIKE CONCAT('%', #{attach.nickName}, '%'))
        </if>
        select
            ba.*,
            bd.dept_name,
            ifnull(ba.nick_name,ba.original_name) nickName
        from
            blade_attach ba
        left join
                blade_dept bd on ba.create_dept = bd.id
        where
            ba.is_deleted = 0
        <if test="attach.originalName!=null and attach.originalName!=''">
            and original_name like concat('%',#{attach.originalName},'%')
        </if>
        <if test="attach.extension!=null and attach.extension!=''">
            and extension like concat('%',#{attach.extension},'%')
        </if>
        <if test="attach.startTime!=null and attach.startTime!=''">
            and date_format(create_time,'%Y-%m-%d') &gt;= #{attach.startTime}
        </if>
        <if test="attach.endTime!=null and attach.endTime!=''">
            and date_format(create_time,'%Y-%m-%d') &lt;= #{attach.endTime}
        </if>
        <if test="attach.resultType!=null">
            and result_type = #{attach.resultType}
        </if>
        <if test="attach.wayLineJobId!=null and attach.wayLineJobId!=''">
            and wayline_job_id = #{attach.wayLineJobId}
        </if>
        <if test="attach.deviceSn!=null and attach.deviceSn!=''">
            and device_sn = #{attach.deviceSn}
        </if>
        order by create_time desc,id desc
    </select>
    <select id="findAiAttachImages" resultType="org.sxkj.resource.vo.AttachVO">
@@ -79,7 +69,6 @@
        and info.is_deleted = 0
        and attach.is_thumbnail = 0
        and (rela.is_deleted = 0 or rela.is_deleted is null)
        and attach.is_generate_ai_img = 0
        and wj.`status` in (2, 3, 5, 6, 7)
        <if test="attach.jobName!=null and attach.jobName!=''">
            and wj.name like concat('%',#{attach.jobName},'%')
@@ -861,7 +850,6 @@
            a.is_thumbnail,
            a.longitude,
            a.latitude,
            a.is_generate_ai_img,
            a.media_category,
            a.media_create_time,
            a.is_deleted