From 042b07f18720af7559f30f5c0b50b770df4a85f6 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期五, 06 十二月 2024 16:41:13 +0800 Subject: [PATCH] 1 --- src/main/resources/mapper/sys/AttachMapper.xml | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/sys/AttachMapper.xml b/src/main/resources/mapper/sys/AttachMapper.xml index 3f3c070..67949d2 100644 --- a/src/main/resources/mapper/sys/AttachMapper.xml +++ b/src/main/resources/mapper/sys/AttachMapper.xml @@ -104,13 +104,28 @@ </foreach> </update> + <!-- where count > 0 and update_time is null and create_time > now()::timestamp + '-5 min' and position(tcdm in '${tabs}') > 0; --> <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' - position(tcdm in 'bd.b_pac_hydrogeology,bd.b_pac_frozensoil,bd.b_pac_geologic_hazard,bd.b_pac_marine_meteorological,bd.b_pac_meteorological,bs.m_equipment_nameplate,bs.m_hydraulic_protection,bs.m_marker,bs.s_explorationpoint,bs.u_sectionline') > 0; + where count > 0 and update_time is null 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} + <if test="dirid != null"> + and dircode like #{dirid} + </if> + </where> + order by id desc + limit 1; + </insert> </mapper> \ No newline at end of file -- Gitblit v1.9.3