From 5a81340b6bc846310ac1e9ba58c2d6a7f893a2f6 Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Wed, 30 Oct 2024 10:43:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=E6=9B=B4=E6=94=B9=20?= =?UTF-8?q?=E5=B9=B6=E6=94=B9=E4=B8=BALIMIT=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zcloud/util/SaveAnemometerInfoScheduled.java | 6 +++--- .../datasource/anemometer/AnemometerMachineMapper.xml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zcloud/util/SaveAnemometerInfoScheduled.java b/src/main/java/com/zcloud/util/SaveAnemometerInfoScheduled.java index 8a1dff83..f78c18da 100644 --- a/src/main/java/com/zcloud/util/SaveAnemometerInfoScheduled.java +++ b/src/main/java/com/zcloud/util/SaveAnemometerInfoScheduled.java @@ -42,11 +42,11 @@ public class SaveAnemometerInfoScheduled { }); anemometerList.forEach(anemometer -> { anemometer.put("FLID",UuidUtil.get32UUID()); - // String ftime = anemometer.getString("FTIME"); - Date date = new Date(); + String ftime = anemometer.getString("FTIME"); + // Date date = new Date(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { - // Date date = simpleDateFormat.parse(ftime); + Date date = simpleDateFormat.parse(ftime); anemometer.put("FTIME",simpleDateFormat.format(date)); } catch (Exception e) { throw new RuntimeException(e); diff --git a/src/main/resources/mybatis/datasource/anemometer/AnemometerMachineMapper.xml b/src/main/resources/mybatis/datasource/anemometer/AnemometerMachineMapper.xml index 44a21c71..0576a96b 100644 --- a/src/main/resources/mybatis/datasource/anemometer/AnemometerMachineMapper.xml +++ b/src/main/resources/mybatis/datasource/anemometer/AnemometerMachineMapper.xml @@ -114,6 +114,7 @@ LEFT JOIN bus_anemometer_local al ON f.FNAME = al.FNAME and al.FTIME = ba.FTIME WHERE f.FNAME = #{FNAME} + LIMIT 1