吉安感知网项目-后端
linwei
2026-01-21 0926a3c6cd5c31bec2a0b93d16a20d8740b8351c
drone-ops/drone-resource/src/main/java/org/sxkj/resource/mapper/AttachMapper.xml
@@ -22,32 +22,15 @@
    <!--自定义分页查询-->
    <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">