list, @Param("selective") DeviceUser.Column ... selective);
+}
\ No newline at end of file
diff --git a/src/main/java/com/topsail/influxdb/mapper/DeviceUserMapper.xml b/src/main/java/com/topsail/influxdb/mapper/DeviceUserMapper.xml
new file mode 100644
index 0000000..f8bca25
--- /dev/null
+++ b/src/main/java/com/topsail/influxdb/mapper/DeviceUserMapper.xml
@@ -0,0 +1,483 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+ Imei, deviceType, batteryLevel, singalStrength, sampleData, passNum, batteryState,
+ alarmType, platformType, userName, unit, sendTime, time, offlineTime, address, lon,
+ lat, value, name, project_id, user_id, STATUS
+
+
+
+ delete from device_user
+
+
+
+
+
+ insert into device_user (Imei, deviceType, batteryLevel,
+ singalStrength, sampleData, passNum,
+ batteryState, alarmType, platformType,
+ userName, unit, sendTime,
+ time, offlineTime, address,
+ lon, lat, value, name,
+ project_id, user_id, STATUS
+ )
+ values (#{imei,jdbcType=VARCHAR}, #{devicetype,jdbcType=INTEGER}, #{batterylevel,jdbcType=INTEGER},
+ #{singalstrength,jdbcType=INTEGER}, #{sampledata,jdbcType=VARCHAR}, #{passnum,jdbcType=INTEGER},
+ #{batterystate,jdbcType=INTEGER}, #{alarmtype,jdbcType=VARCHAR}, #{platformtype,jdbcType=VARCHAR},
+ #{username,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{sendtime,jdbcType=VARCHAR},
+ #{time,jdbcType=TIMESTAMP}, #{offlinetime,jdbcType=TIMESTAMP}, #{address,jdbcType=VARCHAR},
+ #{lon,jdbcType=DOUBLE}, #{lat,jdbcType=DOUBLE}, #{value,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
+ #{projectId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}
+ )
+
+
+ insert into device_user
+
+
+ Imei,
+
+
+ deviceType,
+
+
+ batteryLevel,
+
+
+ singalStrength,
+
+
+ sampleData,
+
+
+ passNum,
+
+
+ batteryState,
+
+
+ alarmType,
+
+
+ platformType,
+
+
+ userName,
+
+
+ unit,
+
+
+ sendTime,
+
+
+ time,
+
+
+ offlineTime,
+
+
+ address,
+
+
+ lon,
+
+
+ lat,
+
+
+ value,
+
+
+ name,
+
+
+ project_id,
+
+
+ user_id,
+
+
+ STATUS,
+
+
+
+
+ #{imei,jdbcType=VARCHAR},
+
+
+ #{devicetype,jdbcType=INTEGER},
+
+
+ #{batterylevel,jdbcType=INTEGER},
+
+
+ #{singalstrength,jdbcType=INTEGER},
+
+
+ #{sampledata,jdbcType=VARCHAR},
+
+
+ #{passnum,jdbcType=INTEGER},
+
+
+ #{batterystate,jdbcType=INTEGER},
+
+
+ #{alarmtype,jdbcType=VARCHAR},
+
+
+ #{platformtype,jdbcType=VARCHAR},
+
+
+ #{username,jdbcType=VARCHAR},
+
+
+ #{unit,jdbcType=VARCHAR},
+
+
+ #{sendtime,jdbcType=VARCHAR},
+
+
+ #{time,jdbcType=TIMESTAMP},
+
+
+ #{offlinetime,jdbcType=TIMESTAMP},
+
+
+ #{address,jdbcType=VARCHAR},
+
+
+ #{lon,jdbcType=DOUBLE},
+
+
+ #{lat,jdbcType=DOUBLE},
+
+
+ #{value,jdbcType=VARCHAR},
+
+
+ #{name,jdbcType=VARCHAR},
+
+
+ #{projectId,jdbcType=INTEGER},
+
+
+ #{userId,jdbcType=INTEGER},
+
+
+ #{status,jdbcType=VARCHAR},
+
+
+
+
+
+ update device_user
+
+
+ Imei = #{record.imei,jdbcType=VARCHAR},
+
+
+ deviceType = #{record.devicetype,jdbcType=INTEGER},
+
+
+ batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
+
+
+ singalStrength = #{record.singalstrength,jdbcType=INTEGER},
+
+
+ sampleData = #{record.sampledata,jdbcType=VARCHAR},
+
+
+ passNum = #{record.passnum,jdbcType=INTEGER},
+
+
+ batteryState = #{record.batterystate,jdbcType=INTEGER},
+
+
+ alarmType = #{record.alarmtype,jdbcType=VARCHAR},
+
+
+ platformType = #{record.platformtype,jdbcType=VARCHAR},
+
+
+ userName = #{record.username,jdbcType=VARCHAR},
+
+
+ unit = #{record.unit,jdbcType=VARCHAR},
+
+
+ sendTime = #{record.sendtime,jdbcType=VARCHAR},
+
+
+ time = #{record.time,jdbcType=TIMESTAMP},
+
+
+ offlineTime = #{record.offlinetime,jdbcType=TIMESTAMP},
+
+
+ address = #{record.address,jdbcType=VARCHAR},
+
+
+ lon = #{record.lon,jdbcType=DOUBLE},
+
+
+ lat = #{record.lat,jdbcType=DOUBLE},
+
+
+ value = #{record.value,jdbcType=VARCHAR},
+
+
+ name = #{record.name,jdbcType=VARCHAR},
+
+
+ project_id = #{record.projectId,jdbcType=INTEGER},
+
+
+ user_id = #{record.userId,jdbcType=INTEGER},
+
+
+ STATUS = #{record.status,jdbcType=VARCHAR},
+
+
+
+
+
+
+
+ update device_user
+ set Imei = #{record.imei,jdbcType=VARCHAR},
+ deviceType = #{record.devicetype,jdbcType=INTEGER},
+ batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
+ singalStrength = #{record.singalstrength,jdbcType=INTEGER},
+ sampleData = #{record.sampledata,jdbcType=VARCHAR},
+ passNum = #{record.passnum,jdbcType=INTEGER},
+ batteryState = #{record.batterystate,jdbcType=INTEGER},
+ alarmType = #{record.alarmtype,jdbcType=VARCHAR},
+ platformType = #{record.platformtype,jdbcType=VARCHAR},
+ userName = #{record.username,jdbcType=VARCHAR},
+ unit = #{record.unit,jdbcType=VARCHAR},
+ sendTime = #{record.sendtime,jdbcType=VARCHAR},
+ time = #{record.time,jdbcType=TIMESTAMP},
+ offlineTime = #{record.offlinetime,jdbcType=TIMESTAMP},
+ address = #{record.address,jdbcType=VARCHAR},
+ lon = #{record.lon,jdbcType=DOUBLE},
+ lat = #{record.lat,jdbcType=DOUBLE},
+ value = #{record.value,jdbcType=VARCHAR},
+ name = #{record.name,jdbcType=VARCHAR},
+ project_id = #{record.projectId,jdbcType=INTEGER},
+ user_id = #{record.userId,jdbcType=INTEGER},
+ STATUS = #{record.status,jdbcType=VARCHAR}
+
+
+
+
+
+
+ insert into device_user
+ (Imei, deviceType, batteryLevel, singalStrength, sampleData, passNum, batteryState,
+ alarmType, platformType, userName, unit, sendTime, time, offlineTime, address,
+ lon, lat, value, name, project_id, user_id, STATUS)
+ values
+
+ (#{item.imei,jdbcType=VARCHAR}, #{item.devicetype,jdbcType=INTEGER}, #{item.batterylevel,jdbcType=INTEGER},
+ #{item.singalstrength,jdbcType=INTEGER}, #{item.sampledata,jdbcType=VARCHAR}, #{item.passnum,jdbcType=INTEGER},
+ #{item.batterystate,jdbcType=INTEGER}, #{item.alarmtype,jdbcType=VARCHAR}, #{item.platformtype,jdbcType=VARCHAR},
+ #{item.username,jdbcType=VARCHAR}, #{item.unit,jdbcType=VARCHAR}, #{item.sendtime,jdbcType=VARCHAR},
+ #{item.time,jdbcType=TIMESTAMP}, #{item.offlinetime,jdbcType=TIMESTAMP}, #{item.address,jdbcType=VARCHAR},
+ #{item.lon,jdbcType=DOUBLE}, #{item.lat,jdbcType=DOUBLE}, #{item.value,jdbcType=VARCHAR},
+ #{item.name,jdbcType=VARCHAR}, #{item.projectId,jdbcType=INTEGER}, #{item.userId,jdbcType=INTEGER},
+ #{item.status,jdbcType=VARCHAR})
+
+
+
+
+ insert into device_user (
+
+ ${column.escapedColumnName}
+
+ )
+ values
+
+ (
+
+
+ #{item.imei,jdbcType=VARCHAR}
+
+
+ #{item.devicetype,jdbcType=INTEGER}
+
+
+ #{item.batterylevel,jdbcType=INTEGER}
+
+
+ #{item.singalstrength,jdbcType=INTEGER}
+
+
+ #{item.sampledata,jdbcType=VARCHAR}
+
+
+ #{item.passnum,jdbcType=INTEGER}
+
+
+ #{item.batterystate,jdbcType=INTEGER}
+
+
+ #{item.alarmtype,jdbcType=VARCHAR}
+
+
+ #{item.platformtype,jdbcType=VARCHAR}
+
+
+ #{item.username,jdbcType=VARCHAR}
+
+
+ #{item.unit,jdbcType=VARCHAR}
+
+
+ #{item.sendtime,jdbcType=VARCHAR}
+
+
+ #{item.time,jdbcType=TIMESTAMP}
+
+
+ #{item.offlinetime,jdbcType=TIMESTAMP}
+
+
+ #{item.address,jdbcType=VARCHAR}
+
+
+ #{item.lon,jdbcType=DOUBLE}
+
+
+ #{item.lat,jdbcType=DOUBLE}
+
+
+ #{item.value,jdbcType=VARCHAR}
+
+
+ #{item.name,jdbcType=VARCHAR}
+
+
+ #{item.projectId,jdbcType=INTEGER}
+
+
+ #{item.userId,jdbcType=INTEGER}
+
+
+ #{item.status,jdbcType=VARCHAR}
+
+
+ )
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/topsail/influxdb/mapper/GatewayDeviceMapper.java b/src/main/java/com/topsail/influxdb/mapper/GatewayDeviceMapper.java
new file mode 100644
index 0000000..5c85a26
--- /dev/null
+++ b/src/main/java/com/topsail/influxdb/mapper/GatewayDeviceMapper.java
@@ -0,0 +1,32 @@
+package com.topsail.influxdb.mapper;
+
+import com.topsail.influxdb.pojo.GatewayDevice;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Update;
+
+
+/**
+ *
+ *
+ * @version
+ *
+ * Author Version Date Changes
+ * Administrator 1.0 2022年04月22日 Created
+ *
+ *
+ * @since 1.
+ */
+public interface GatewayDeviceMapper {
+
+ /**
+ * 新增
+ *
+ * @param
+ * @return
+ */
+ int saveGatewayDevice(GatewayDevice gatewayDevice);
+
+ @Update("update gateway_device set bind_status = #{bindStatus} where imei = #{imei}")
+ int updateGatewayDeviceStatus(@Param("imei") String imei,@Param("bindStatus") Integer bindStatus);
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/topsail/influxdb/mapper/GatewayDeviceMapper.xml b/src/main/java/com/topsail/influxdb/mapper/GatewayDeviceMapper.xml
new file mode 100644
index 0000000..f2dfe88
--- /dev/null
+++ b/src/main/java/com/topsail/influxdb/mapper/GatewayDeviceMapper.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ insert into gateway_device
+ (imei,parent_imei,device_id,platform_type,bind_status,create_time)
+ values
+ (#{imei},#{parentImei},#{deviceId},#{platformType},#{bindStatus},now())
+ ON DUPLICATE KEY UPDATE
+ device_id = #{deviceId},
+ platform_type = #{platformType},
+ bind_status = #{bindStatus},
+ update_time = now();
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/topsail/influxdb/mapper/HistoryAllMapper.java b/src/main/java/com/topsail/influxdb/mapper/HistoryAllMapper.java
new file mode 100644
index 0000000..0010337
--- /dev/null
+++ b/src/main/java/com/topsail/influxdb/mapper/HistoryAllMapper.java
@@ -0,0 +1,48 @@
+package com.topsail.influxdb.mapper;
+
+import com.topsail.influxdb.pojo.HistoryAll;
+import com.topsail.influxdb.pojo.HistoryAllExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface HistoryAllMapper {
+ long countByExample(HistoryAllExample example);
+
+ int deleteByExample(HistoryAllExample example);
+
+ int deleteByPrimaryKey(Long id);
+
+ int insert(HistoryAll record);
+
+ int insertSelective(HistoryAll record);
+
+ List selectByExample(HistoryAllExample example);
+
+ HistoryAll selectByPrimaryKey(Long id);
+
+ int updateByExampleSelective(@Param("record") HistoryAll record, @Param("example") HistoryAllExample example);
+
+ int updateByExample(@Param("record") HistoryAll record, @Param("example") HistoryAllExample example);
+
+ int updateByPrimaryKeySelective(HistoryAll record);
+
+ int updateByPrimaryKey(HistoryAll record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table history_all
+ *
+ * @mbg.generated
+ * @project https://github.com/itfsw/mybatis-generator-plugin
+ */
+ int batchInsert(@Param("list") List list);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table history_all
+ *
+ * @mbg.generated
+ * @project https://github.com/itfsw/mybatis-generator-plugin
+ */
+ int batchInsertSelective(@Param("list") List list, @Param("selective") HistoryAll.Column ... selective);
+}
\ No newline at end of file
diff --git a/src/main/java/com/topsail/influxdb/mapper/HistoryAllMapper.xml b/src/main/java/com/topsail/influxdb/mapper/HistoryAllMapper.xml
new file mode 100644
index 0000000..8454065
--- /dev/null
+++ b/src/main/java/com/topsail/influxdb/mapper/HistoryAllMapper.xml
@@ -0,0 +1,491 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+ id, deviceType, Imei, batteryLevel, singalStrength, sampleData, passNum, batteryState,
+ alarmType, platformType, userName, unit, sendTime, dataBody, time, value, sendDate
+
+
+
+
+ delete from history_all
+ where id = #{id,jdbcType=BIGINT}
+
+
+ delete from history_all
+
+
+
+
+
+ insert into history_all (id, deviceType, Imei,
+ batteryLevel, singalStrength, sampleData,
+ passNum, batteryState, alarmType,
+ platformType, userName, unit,
+ sendTime, dataBody, time,
+ value, sendDate)
+ values (#{id,jdbcType=BIGINT}, #{devicetype,jdbcType=INTEGER}, #{imei,jdbcType=VARCHAR},
+ #{batterylevel,jdbcType=INTEGER}, #{singalstrength,jdbcType=INTEGER}, #{sampledata,jdbcType=VARCHAR},
+ #{passnum,jdbcType=INTEGER}, #{batterystate,jdbcType=INTEGER}, #{alarmtype,jdbcType=VARCHAR},
+ #{platformtype,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR},
+ #{sendtime,jdbcType=VARCHAR}, #{databody,jdbcType=VARCHAR}, #{time,jdbcType=TIMESTAMP},
+ #{value,jdbcType=VARCHAR}, #{senddate,jdbcType=TIMESTAMP})
+
+
+ insert into history_all
+
+
+ id,
+
+
+ deviceType,
+
+
+ Imei,
+
+
+ batteryLevel,
+
+
+ singalStrength,
+
+
+ sampleData,
+
+
+ passNum,
+
+
+ batteryState,
+
+
+ alarmType,
+
+
+ platformType,
+
+
+ userName,
+
+
+ unit,
+
+
+ sendTime,
+
+
+ dataBody,
+
+
+ time,
+
+
+ value,
+
+
+ sendDate,
+
+
+
+
+ #{id,jdbcType=BIGINT},
+
+
+ #{devicetype,jdbcType=INTEGER},
+
+
+ #{imei,jdbcType=VARCHAR},
+
+
+ #{batterylevel,jdbcType=INTEGER},
+
+
+ #{singalstrength,jdbcType=INTEGER},
+
+
+ #{sampledata,jdbcType=VARCHAR},
+
+
+ #{passnum,jdbcType=INTEGER},
+
+
+ #{batterystate,jdbcType=INTEGER},
+
+
+ #{alarmtype,jdbcType=VARCHAR},
+
+
+ #{platformtype,jdbcType=VARCHAR},
+
+
+ #{username,jdbcType=VARCHAR},
+
+
+ #{unit,jdbcType=VARCHAR},
+
+
+ #{sendtime,jdbcType=VARCHAR},
+
+
+ #{databody,jdbcType=VARCHAR},
+
+
+ #{time,jdbcType=TIMESTAMP},
+
+
+ #{value,jdbcType=VARCHAR},
+
+
+ #{senddate,jdbcType=TIMESTAMP},
+
+
+
+
+
+ update history_all
+
+
+ id = #{record.id,jdbcType=BIGINT},
+
+
+ deviceType = #{record.devicetype,jdbcType=INTEGER},
+
+
+ Imei = #{record.imei,jdbcType=VARCHAR},
+
+
+ batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
+
+
+ singalStrength = #{record.singalstrength,jdbcType=INTEGER},
+
+
+ sampleData = #{record.sampledata,jdbcType=VARCHAR},
+
+
+ passNum = #{record.passnum,jdbcType=INTEGER},
+
+
+ batteryState = #{record.batterystate,jdbcType=INTEGER},
+
+
+ alarmType = #{record.alarmtype,jdbcType=VARCHAR},
+
+
+ platformType = #{record.platformtype,jdbcType=VARCHAR},
+
+
+ userName = #{record.username,jdbcType=VARCHAR},
+
+
+ unit = #{record.unit,jdbcType=VARCHAR},
+
+
+ sendTime = #{record.sendtime,jdbcType=VARCHAR},
+
+
+ dataBody = #{record.databody,jdbcType=VARCHAR},
+
+
+ time = #{record.time,jdbcType=TIMESTAMP},
+
+
+ value = #{record.value,jdbcType=VARCHAR},
+
+
+ sendDate = #{record.senddate,jdbcType=TIMESTAMP},
+
+
+
+
+
+
+
+ update history_all
+ set id = #{record.id,jdbcType=BIGINT},
+ deviceType = #{record.devicetype,jdbcType=INTEGER},
+ Imei = #{record.imei,jdbcType=VARCHAR},
+ batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
+ singalStrength = #{record.singalstrength,jdbcType=INTEGER},
+ sampleData = #{record.sampledata,jdbcType=VARCHAR},
+ passNum = #{record.passnum,jdbcType=INTEGER},
+ batteryState = #{record.batterystate,jdbcType=INTEGER},
+ alarmType = #{record.alarmtype,jdbcType=VARCHAR},
+ platformType = #{record.platformtype,jdbcType=VARCHAR},
+ userName = #{record.username,jdbcType=VARCHAR},
+ unit = #{record.unit,jdbcType=VARCHAR},
+ sendTime = #{record.sendtime,jdbcType=VARCHAR},
+ dataBody = #{record.databody,jdbcType=VARCHAR},
+ time = #{record.time,jdbcType=TIMESTAMP},
+ value = #{record.value,jdbcType=VARCHAR},
+ sendDate = #{record.senddate,jdbcType=TIMESTAMP}
+
+
+
+
+
+ update history_all
+
+
+ deviceType = #{devicetype,jdbcType=INTEGER},
+
+
+ Imei = #{imei,jdbcType=VARCHAR},
+
+
+ batteryLevel = #{batterylevel,jdbcType=INTEGER},
+
+
+ singalStrength = #{singalstrength,jdbcType=INTEGER},
+
+
+ sampleData = #{sampledata,jdbcType=VARCHAR},
+
+
+ passNum = #{passnum,jdbcType=INTEGER},
+
+
+ batteryState = #{batterystate,jdbcType=INTEGER},
+
+
+ alarmType = #{alarmtype,jdbcType=VARCHAR},
+
+
+ platformType = #{platformtype,jdbcType=VARCHAR},
+
+
+ userName = #{username,jdbcType=VARCHAR},
+
+
+ unit = #{unit,jdbcType=VARCHAR},
+
+
+ sendTime = #{sendtime,jdbcType=VARCHAR},
+
+
+ dataBody = #{databody,jdbcType=VARCHAR},
+
+
+ time = #{time,jdbcType=TIMESTAMP},
+
+
+ value = #{value,jdbcType=VARCHAR},
+
+
+ sendDate = #{senddate,jdbcType=TIMESTAMP},
+
+
+ where id = #{id,jdbcType=BIGINT}
+
+
+ update history_all
+ set deviceType = #{devicetype,jdbcType=INTEGER},
+ Imei = #{imei,jdbcType=VARCHAR},
+ batteryLevel = #{batterylevel,jdbcType=INTEGER},
+ singalStrength = #{singalstrength,jdbcType=INTEGER},
+ sampleData = #{sampledata,jdbcType=VARCHAR},
+ passNum = #{passnum,jdbcType=INTEGER},
+ batteryState = #{batterystate,jdbcType=INTEGER},
+ alarmType = #{alarmtype,jdbcType=VARCHAR},
+ platformType = #{platformtype,jdbcType=VARCHAR},
+ userName = #{username,jdbcType=VARCHAR},
+ unit = #{unit,jdbcType=VARCHAR},
+ sendTime = #{sendtime,jdbcType=VARCHAR},
+ dataBody = #{databody,jdbcType=VARCHAR},
+ time = #{time,jdbcType=TIMESTAMP},
+ value = #{value,jdbcType=VARCHAR},
+ sendDate = #{senddate,jdbcType=TIMESTAMP}
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ insert into history_all
+ (id, deviceType, Imei, batteryLevel, singalStrength, sampleData, passNum, batteryState,
+ alarmType, platformType, userName, unit, sendTime, dataBody, time, value, sendDate
+ )
+ values
+
+ (#{item.id,jdbcType=BIGINT}, #{item.devicetype,jdbcType=INTEGER}, #{item.imei,jdbcType=VARCHAR},
+ #{item.batterylevel,jdbcType=INTEGER}, #{item.singalstrength,jdbcType=INTEGER},
+ #{item.sampledata,jdbcType=VARCHAR}, #{item.passnum,jdbcType=INTEGER}, #{item.batterystate,jdbcType=INTEGER},
+ #{item.alarmtype,jdbcType=VARCHAR}, #{item.platformtype,jdbcType=VARCHAR}, #{item.username,jdbcType=VARCHAR},
+ #{item.unit,jdbcType=VARCHAR}, #{item.sendtime,jdbcType=VARCHAR}, #{item.databody,jdbcType=VARCHAR},
+ #{item.time,jdbcType=TIMESTAMP}, #{item.value,jdbcType=VARCHAR}, #{item.senddate,jdbcType=TIMESTAMP}
+ )
+
+
+
+
+ insert into history_all (
+
+ ${column.escapedColumnName}
+
+ )
+ values
+
+ (
+
+
+ #{item.id,jdbcType=BIGINT}
+
+
+ #{item.devicetype,jdbcType=INTEGER}
+
+
+ #{item.imei,jdbcType=VARCHAR}
+
+
+ #{item.batterylevel,jdbcType=INTEGER}
+
+
+ #{item.singalstrength,jdbcType=INTEGER}
+
+
+ #{item.sampledata,jdbcType=VARCHAR}
+
+
+ #{item.passnum,jdbcType=INTEGER}
+
+
+ #{item.batterystate,jdbcType=INTEGER}
+
+
+ #{item.alarmtype,jdbcType=VARCHAR}
+
+
+ #{item.platformtype,jdbcType=VARCHAR}
+
+
+ #{item.username,jdbcType=VARCHAR}
+
+
+ #{item.unit,jdbcType=VARCHAR}
+
+
+ #{item.sendtime,jdbcType=VARCHAR}
+
+
+ #{item.databody,jdbcType=VARCHAR}
+
+
+ #{item.time,jdbcType=TIMESTAMP}
+
+
+ #{item.value,jdbcType=VARCHAR}
+
+
+ #{item.senddate,jdbcType=TIMESTAMP}
+
+
+ )
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/topsail/influxdb/mapper/HistoryErrMapper.java b/src/main/java/com/topsail/influxdb/mapper/HistoryErrMapper.java
new file mode 100644
index 0000000..de4fd01
--- /dev/null
+++ b/src/main/java/com/topsail/influxdb/mapper/HistoryErrMapper.java
@@ -0,0 +1,48 @@
+package com.topsail.influxdb.mapper;
+
+import com.topsail.influxdb.pojo.HistoryErr;
+import com.topsail.influxdb.pojo.HistoryErrExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface HistoryErrMapper {
+ long countByExample(HistoryErrExample example);
+
+ int deleteByExample(HistoryErrExample example);
+
+ int deleteByPrimaryKey(Long id);
+
+ int insert(HistoryErr record);
+
+ int insertSelective(HistoryErr record);
+
+ List selectByExample(HistoryErrExample example);
+
+ HistoryErr selectByPrimaryKey(Long id);
+
+ int updateByExampleSelective(@Param("record") HistoryErr record, @Param("example") HistoryErrExample example);
+
+ int updateByExample(@Param("record") HistoryErr record, @Param("example") HistoryErrExample example);
+
+ int updateByPrimaryKeySelective(HistoryErr record);
+
+ int updateByPrimaryKey(HistoryErr record);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table history_err
+ *
+ * @mbg.generated
+ * @project https://github.com/itfsw/mybatis-generator-plugin
+ */
+ int batchInsert(@Param("list") List list);
+
+ /**
+ * This method was generated by MyBatis Generator.
+ * This method corresponds to the database table history_err
+ *
+ * @mbg.generated
+ * @project https://github.com/itfsw/mybatis-generator-plugin
+ */
+ int batchInsertSelective(@Param("list") List list, @Param("selective") HistoryErr.Column ... selective);
+}
\ No newline at end of file
diff --git a/src/main/java/com/topsail/influxdb/mapper/HistoryErrMapper.xml b/src/main/java/com/topsail/influxdb/mapper/HistoryErrMapper.xml
new file mode 100644
index 0000000..a0e7ed9
--- /dev/null
+++ b/src/main/java/com/topsail/influxdb/mapper/HistoryErrMapper.xml
@@ -0,0 +1,491 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+ id, deviceType, Imei, batteryLevel, singalStrength, sampleData, passNum, batteryState,
+ alarmType, platformType, userName, unit, sendTime, dataBody, time, value, sendDate
+
+
+
+
+ delete from history_err
+ where id = #{id,jdbcType=BIGINT}
+
+
+ delete from history_err
+
+
+
+
+
+ insert into history_err (id, deviceType, Imei,
+ batteryLevel, singalStrength, sampleData,
+ passNum, batteryState, alarmType,
+ platformType, userName, unit,
+ sendTime, dataBody, time,
+ value, sendDate)
+ values (#{id,jdbcType=BIGINT}, #{devicetype,jdbcType=INTEGER}, #{imei,jdbcType=VARCHAR},
+ #{batterylevel,jdbcType=INTEGER}, #{singalstrength,jdbcType=INTEGER}, #{sampledata,jdbcType=VARCHAR},
+ #{passnum,jdbcType=INTEGER}, #{batterystate,jdbcType=INTEGER}, #{alarmtype,jdbcType=VARCHAR},
+ #{platformtype,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR},
+ #{sendtime,jdbcType=VARCHAR}, #{databody,jdbcType=VARCHAR}, #{time,jdbcType=TIMESTAMP},
+ #{value,jdbcType=VARCHAR}, #{senddate,jdbcType=TIMESTAMP})
+
+
+ insert into history_err
+
+
+ id,
+
+
+ deviceType,
+
+
+ Imei,
+
+
+ batteryLevel,
+
+
+ singalStrength,
+
+
+ sampleData,
+
+
+ passNum,
+
+
+ batteryState,
+
+
+ alarmType,
+
+
+ platformType,
+
+
+ userName,
+
+
+ unit,
+
+
+ sendTime,
+
+
+ dataBody,
+
+
+ time,
+
+
+ value,
+
+
+ sendDate,
+
+
+
+
+ #{id,jdbcType=BIGINT},
+
+
+ #{devicetype,jdbcType=INTEGER},
+
+
+ #{imei,jdbcType=VARCHAR},
+
+
+ #{batterylevel,jdbcType=INTEGER},
+
+
+ #{singalstrength,jdbcType=INTEGER},
+
+
+ #{sampledata,jdbcType=VARCHAR},
+
+
+ #{passnum,jdbcType=INTEGER},
+
+
+ #{batterystate,jdbcType=INTEGER},
+
+
+ #{alarmtype,jdbcType=VARCHAR},
+
+
+ #{platformtype,jdbcType=VARCHAR},
+
+
+ #{username,jdbcType=VARCHAR},
+
+
+ #{unit,jdbcType=VARCHAR},
+
+
+ #{sendtime,jdbcType=VARCHAR},
+
+
+ #{databody,jdbcType=VARCHAR},
+
+
+ #{time,jdbcType=TIMESTAMP},
+
+
+ #{value,jdbcType=VARCHAR},
+
+
+ #{senddate,jdbcType=TIMESTAMP},
+
+
+
+
+
+ update history_err
+
+
+ id = #{record.id,jdbcType=BIGINT},
+
+
+ deviceType = #{record.devicetype,jdbcType=INTEGER},
+
+
+ Imei = #{record.imei,jdbcType=VARCHAR},
+
+
+ batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
+
+
+ singalStrength = #{record.singalstrength,jdbcType=INTEGER},
+
+
+ sampleData = #{record.sampledata,jdbcType=VARCHAR},
+
+
+ passNum = #{record.passnum,jdbcType=INTEGER},
+
+
+ batteryState = #{record.batterystate,jdbcType=INTEGER},
+
+
+ alarmType = #{record.alarmtype,jdbcType=VARCHAR},
+
+
+ platformType = #{record.platformtype,jdbcType=VARCHAR},
+
+
+ userName = #{record.username,jdbcType=VARCHAR},
+
+
+ unit = #{record.unit,jdbcType=VARCHAR},
+
+
+ sendTime = #{record.sendtime,jdbcType=VARCHAR},
+
+
+ dataBody = #{record.databody,jdbcType=VARCHAR},
+
+
+ time = #{record.time,jdbcType=TIMESTAMP},
+
+
+ value = #{record.value,jdbcType=VARCHAR},
+
+
+ sendDate = #{record.senddate,jdbcType=TIMESTAMP},
+
+
+
+
+
+
+
+ update history_err
+ set id = #{record.id,jdbcType=BIGINT},
+ deviceType = #{record.devicetype,jdbcType=INTEGER},
+ Imei = #{record.imei,jdbcType=VARCHAR},
+ batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
+ singalStrength = #{record.singalstrength,jdbcType=INTEGER},
+ sampleData = #{record.sampledata,jdbcType=VARCHAR},
+ passNum = #{record.passnum,jdbcType=INTEGER},
+ batteryState = #{record.batterystate,jdbcType=INTEGER},
+ alarmType = #{record.alarmtype,jdbcType=VARCHAR},
+ platformType = #{record.platformtype,jdbcType=VARCHAR},
+ userName = #{record.username,jdbcType=VARCHAR},
+ unit = #{record.unit,jdbcType=VARCHAR},
+ sendTime = #{record.sendtime,jdbcType=VARCHAR},
+ dataBody = #{record.databody,jdbcType=VARCHAR},
+ time = #{record.time,jdbcType=TIMESTAMP},
+ value = #{record.value,jdbcType=VARCHAR},
+ sendDate = #{record.senddate,jdbcType=TIMESTAMP}
+
+
+
+
+
+ update history_err
+
+
+ deviceType = #{devicetype,jdbcType=INTEGER},
+
+
+ Imei = #{imei,jdbcType=VARCHAR},
+
+
+ batteryLevel = #{batterylevel,jdbcType=INTEGER},
+
+
+ singalStrength = #{singalstrength,jdbcType=INTEGER},
+
+
+ sampleData = #{sampledata,jdbcType=VARCHAR},
+
+
+ passNum = #{passnum,jdbcType=INTEGER},
+
+
+ batteryState = #{batterystate,jdbcType=INTEGER},
+
+
+ alarmType = #{alarmtype,jdbcType=VARCHAR},
+
+
+ platformType = #{platformtype,jdbcType=VARCHAR},
+
+
+ userName = #{username,jdbcType=VARCHAR},
+
+
+ unit = #{unit,jdbcType=VARCHAR},
+
+
+ sendTime = #{sendtime,jdbcType=VARCHAR},
+
+
+ dataBody = #{databody,jdbcType=VARCHAR},
+
+
+ time = #{time,jdbcType=TIMESTAMP},
+
+
+ value = #{value,jdbcType=VARCHAR},
+
+
+ sendDate = #{senddate,jdbcType=TIMESTAMP},
+
+
+ where id = #{id,jdbcType=BIGINT}
+
+
+ update history_err
+ set deviceType = #{devicetype,jdbcType=INTEGER},
+ Imei = #{imei,jdbcType=VARCHAR},
+ batteryLevel = #{batterylevel,jdbcType=INTEGER},
+ singalStrength = #{singalstrength,jdbcType=INTEGER},
+ sampleData = #{sampledata,jdbcType=VARCHAR},
+ passNum = #{passnum,jdbcType=INTEGER},
+ batteryState = #{batterystate,jdbcType=INTEGER},
+ alarmType = #{alarmtype,jdbcType=VARCHAR},
+ platformType = #{platformtype,jdbcType=VARCHAR},
+ userName = #{username,jdbcType=VARCHAR},
+ unit = #{unit,jdbcType=VARCHAR},
+ sendTime = #{sendtime,jdbcType=VARCHAR},
+ dataBody = #{databody,jdbcType=VARCHAR},
+ time = #{time,jdbcType=TIMESTAMP},
+ value = #{value,jdbcType=VARCHAR},
+ sendDate = #{senddate,jdbcType=TIMESTAMP}
+ where id = #{id,jdbcType=BIGINT}
+
+
+
+ insert into history_err
+ (id, deviceType, Imei, batteryLevel, singalStrength, sampleData, passNum, batteryState,
+ alarmType, platformType, userName, unit, sendTime, dataBody, time, value, sendDate
+ )
+ values
+
+ (#{item.id,jdbcType=BIGINT}, #{item.devicetype,jdbcType=INTEGER}, #{item.imei,jdbcType=VARCHAR},
+ #{item.batterylevel,jdbcType=INTEGER}, #{item.singalstrength,jdbcType=INTEGER},
+ #{item.sampledata,jdbcType=VARCHAR}, #{item.passnum,jdbcType=INTEGER}, #{item.batterystate,jdbcType=INTEGER},
+ #{item.alarmtype,jdbcType=VARCHAR}, #{item.platformtype,jdbcType=VARCHAR}, #{item.username,jdbcType=VARCHAR},
+ #{item.unit,jdbcType=VARCHAR}, #{item.sendtime,jdbcType=VARCHAR}, #{item.databody,jdbcType=VARCHAR},
+ #{item.time,jdbcType=TIMESTAMP}, #{item.value,jdbcType=VARCHAR}, #{item.senddate,jdbcType=TIMESTAMP}
+ )
+
+
+
+
+ insert into history_err (
+
+ ${column.escapedColumnName}
+
+ )
+ values
+
+ (
+
+
+ #{item.id,jdbcType=BIGINT}
+
+
+ #{item.devicetype,jdbcType=INTEGER}
+
+
+ #{item.imei,jdbcType=VARCHAR}
+
+
+ #{item.batterylevel,jdbcType=INTEGER}
+
+
+ #{item.singalstrength,jdbcType=INTEGER}
+
+
+ #{item.sampledata,jdbcType=VARCHAR}
+
+
+ #{item.passnum,jdbcType=INTEGER}
+
+
+ #{item.batterystate,jdbcType=INTEGER}
+
+
+ #{item.alarmtype,jdbcType=VARCHAR}
+
+
+ #{item.platformtype,jdbcType=VARCHAR}
+
+
+ #{item.username,jdbcType=VARCHAR}
+
+
+ #{item.unit,jdbcType=VARCHAR}
+
+
+ #{item.sendtime,jdbcType=VARCHAR}
+
+
+ #{item.databody,jdbcType=VARCHAR}
+
+
+ #{item.time,jdbcType=TIMESTAMP}
+
+
+ #{item.value,jdbcType=VARCHAR}
+
+
+ #{item.senddate,jdbcType=TIMESTAMP}
+
+
+ )
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/topsail/influxdb/mapper/HistoryMapper.java b/src/main/java/com/topsail/influxdb/mapper/HistoryMapper.java
new file mode 100644
index 0000000..026c2f7
--- /dev/null
+++ b/src/main/java/com/topsail/influxdb/mapper/HistoryMapper.java
@@ -0,0 +1,60 @@
+package com.topsail.influxdb.mapper;
+
+import com.topsail.influxdb.pojo.History;
+import com.topsail.influxdb.pojo.HistoryExample;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+public interface HistoryMapper {
+ long countByExample(HistoryExample example);
+
+ int deleteByExample(HistoryExample example);
+
+ int deleteByPrimaryKey(Long id);
+
+ int insert(History record);
+
+ int insertSelective(History record);
+
+ List selectByExampleWithBLOBs(HistoryExample example);
+
+ List selectByExample(HistoryExample example);
+
+ History selectByPrimaryKey(Long id);
+
+ int updateByExampleSelective(@Param("record") History record, @Param("example") HistoryExample example);
+
+ int updateByExampleWithBLOBs(@Param("record") History record, @Param("example") HistoryExample example);
+
+ int updateByExample(@Param("record") History record, @Param("example") HistoryExample example);
+
+ int updateByPrimaryKeySelective(History record);
+
+ int updateByPrimaryKeyWithBLOBs(History record);
+
+ int updateByPrimaryKey(History record);
+
+ @Select("select * from (SELECT imei,count( 1 ) as num FROM history GROUP BY imei ORDER BY count( 1 ) DESC ) m where num>200")
+ List