mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 08:55:53 +08:00
Merge remote-tracking branch 'origin/master' into version1.2
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.iot.tdengine.dao.DatabaseDAO">
|
||||
|
||||
<!-- 创建数据库-->
|
||||
<update id="createDB" parameterType="java.lang.String">
|
||||
create database if not exists ${dbName};
|
||||
</update>
|
||||
|
||||
<!-- 删除数据库-->
|
||||
<update id="dropDatabase" parameterType="java.lang.String">
|
||||
DROP database if exists ${dbName};
|
||||
</update>
|
||||
|
||||
<!-- 使用数据库-->
|
||||
<update id="useDatabase" parameterType="java.lang.String">
|
||||
use ${dbName};
|
||||
</update>
|
||||
|
||||
<update id="createTable">
|
||||
create stable if not exists ${tableName}
|
||||
(ts timestamp,
|
||||
log_id BIGINT,
|
||||
identity NCHAR(100),
|
||||
log_type NCHAR(20),
|
||||
log_value NCHAR(100),
|
||||
device_id BIGINT,
|
||||
device_name NCHAR(100),
|
||||
serial_number NCHAR(100),
|
||||
is_monitor int,
|
||||
create_by NCHAR(100),
|
||||
create_time timestamp,
|
||||
remark NCHAR(1000),
|
||||
);
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -42,7 +42,6 @@
|
||||
</update>
|
||||
|
||||
<update id="createSTable">
|
||||
|
||||
create STABLE if not exists ${database}.device_log
|
||||
(
|
||||
ts timestamp,
|
||||
@@ -118,7 +117,7 @@
|
||||
<where>
|
||||
is_monitor=1
|
||||
<if test="device.deviceId!=null"> and device_id = #{device.deviceId} </if>
|
||||
<if test="device.identity != null and device.identity != ''"> and identity like concat('%', #{device.identity}, '%')</if>
|
||||
<if test="device.identity != null and device.identity != ''"> and identity like #{device.identity}</if>
|
||||
|
||||
order by ts desc
|
||||
limit 2000
|
||||
@@ -131,7 +130,7 @@
|
||||
is_monitor !=1
|
||||
<if test="device.deviceId!=null"> and device_id = #{device.deviceId} </if>
|
||||
<if test="device.logType != null "> and log_type = #{device.logType}</if>
|
||||
<if test="device.identity != null and device.identity != ''"> and identity like concat('%', #{device.identity}, '%')</if>
|
||||
<if test="device.identity != null and device.identity != ''"> and identity like #{device.identity}</if>
|
||||
</where>
|
||||
order by ts desc
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user