管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-03-25 1c285b38777e9f37ee8d112e994443d3640b78c1
src/main/resources/mapper/sys/AttachMapper.xml
@@ -106,18 +106,24 @@
    <select id="selectFmeLogs" resultType="com.lf.server.entity.data.FmeLogEntity">
        select * from lf.sys_fme_log
        where count > 0 and update_time is null and create_time > now()::timestamp + '-1 min' and position(tcdm in '${tabs}') > 0;
        where count > 0 and update_time is null and create_time > now()::timestamp + '-5 min' and position(tcdm in '${tabs}') > 0;
    </select>
    <update id="updateFmeLog">
        update lf.sys_fme_log set update_time = now() where id = #{id};
    </update>
    <!-- and create_time > now()::timestamp + '-15 min' -->
    <insert id="insertAttachByMeta">
        insert into lf.sys_attach (name, guid, path, sizes, create_user, tab, tab_guid)
      select name, guid, path, sizes, create_user, #{tab}, #{tabGuid}
      from lf.sys_meta
      where name = #{metaName} and create_time > now()::timestamp + '-15 min'
      <where>
            name = #{metaName}
            <if test="dirid != null">
                and dircode like #{dirid}
            </if>
        </where>
      order by id desc
      limit 1;
    </insert>