feat(时序数据库集成): tdengine\influxdb\iotdb数据库集成

This commit is contained in:
gx_ma
2025-12-17 14:57:18 +08:00
parent 8501632079
commit e0e9f19d85
58 changed files with 6078 additions and 154 deletions

View File

@@ -6,7 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="com.fastbee.iot.domain.EventLog" id="EventLogResult">
<result property="logId" column="log_id" />
<result property="identity" column="identify" />
<result property="identify" column="identify" />
<result property="modelName" column="model_name" />
<result property="logType" column="log_type" />
<result property="logValue" column="log_value" />
@@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectEventLogList" parameterType="com.fastbee.iot.domain.EventLog" resultMap="EventLogResult">
<include refid="selectEventLogVo"/>
<where>
<if test="identity != null and identity != ''"> and identify = #{identity}</if>
<if test="identify != null and identify != ''"> and identify = #{identify}</if>
<if test="modelName != null and modelName != ''"> and model_name like concat('%', #{modelName}, '%')</if>
<if test="logType != null "> and log_type = #{logType}</if>
<if test="logValue != null and logValue != ''"> and log_value = #{logValue}</if>
@@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertEventLog" parameterType="com.fastbee.iot.domain.EventLog" useGeneratedKeys="true" keyProperty="logId">
insert into iot_event_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="identity != null and identity != ''">identify,</if>
<if test="identify != null and identify != ''">identify,</if>
<if test="modelName != null">model_name,</if>
<if test="logType != null">log_type,</if>
<if test="logValue != null and logValue != ''">log_value,</if>
@@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="identity != null and identity != ''">#{identity},</if>
<if test="identify != null and identify != ''">#{identify},</if>
<if test="modelName != null">#{modelName},</if>
<if test="logType != null">#{logType},</if>
<if test="logValue != null and logValue != ''">#{logValue},</if>
@@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
user_name,tenant_id,tenant_name,create_by,create_time,remark)
values
<foreach collection="list" separator="," index="index" item="item">
(#{item.identity},#{item.modelName},#{item.logType},#{item.logValue},#{item.deviceId},#{item.deviceName},#{item.serialNumber},#{item.isMonitor},
(#{item.identify},#{item.modelName},#{item.logType},#{item.logValue},#{item.deviceId},#{item.deviceName},#{item.serialNumber},#{item.isMonitor},
#{item.mode},#{item.userId},#{item.userName},#{item.tenantId},#{item.tenantName},#{item.createBy},#{item.createTime},#{item.remark})
</foreach>
</insert>
@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateEventLog" parameterType="com.fastbee.iot.domain.EventLog">
update iot_event_log
<trim prefix="SET" suffixOverrides=",">
<if test="identity != null and identity != ''">identify = #{identity},</if>
<if test="identify != null and identify != ''">identify = #{identify},</if>
<if test="modelName != null">model_name = #{modelName},</if>
<if test="logType != null">log_type = #{logType},</if>
<if test="logValue != null and logValue != ''">log_value = #{logValue},</if>