From ebea98ca997fb81425e25f2f36ed0ca0dcaac16b Mon Sep 17 00:00:00 2001 From: kerwincui <164770707@qq.com> Date: Fri, 1 Jul 2022 22:35:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=9B=91=E6=B5=8B=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E9=80=82=E9=85=8D=E7=A7=BB=E5=8A=A8=E7=AB=AF=E7=AD=9B?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/iot/domain/DeviceLog.java | 33 +++++++++++++++++++ .../resources/mapper/iot/DeviceLogMapper.xml | 4 +-- .../mapper/tdengine/TDDeviceLogMapper.xml | 4 +-- 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/domain/DeviceLog.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/domain/DeviceLog.java index 71f1b58b..b079e105 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/domain/DeviceLog.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/domain/DeviceLog.java @@ -70,6 +70,39 @@ public class DeviceLog extends BaseEntity @Excel(name = "租户名称") private String tenantName; + /** 查询用的开始时间 */ + private String beginTime; + + /** 查询用的结束时间 */ + private String endTime; + + /** 查询的总数 */ + private int total; + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public String getBeginTime() { + return beginTime; + } + + public void setBeginTime(String beginTime) { + this.beginTime = beginTime; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + public Integer getMode() { return mode; } diff --git a/springboot/wumei-iot/src/main/resources/mapper/iot/DeviceLogMapper.xml b/springboot/wumei-iot/src/main/resources/mapper/iot/DeviceLogMapper.xml index 8622d2ef..7e19f343 100644 --- a/springboot/wumei-iot/src/main/resources/mapper/iot/DeviceLogMapper.xml +++ b/springboot/wumei-iot/src/main/resources/mapper/iot/DeviceLogMapper.xml @@ -38,10 +38,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and device_id = #{deviceId} and identity = #{identity} and is_monitor=1 - and create_time between #{params.beginTime} and #{params.endTime} + and create_time between #{beginTime} and #{endTime} order by create_time desc - limit 2000 + limit #{total}