feat:添加海为设备相关接口
This commit is contained in:
@ -0,0 +1,34 @@
|
||||
<?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.fastbee.iot.mapper.TableMapper">
|
||||
<!--创建表的 SQL 语句-->
|
||||
<update id="createTable" parameterType="java.lang.String">
|
||||
CREATE TABLE IF NOT EXISTS `${tableName}`
|
||||
(
|
||||
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`group_id` int(0) NULL DEFAULT NULL COMMENT '组号',
|
||||
`username` varchar(20) NULL DEFAULT NULL COMMENT '用户名',
|
||||
`password` varchar(20) NULL DEFAULT NULL COMMENT '密码',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 9
|
||||
CHARACTER SET = utf8mb4 COMMENT ='用于测试的用户表';
|
||||
</update>
|
||||
|
||||
<select id="getTableByName" resultType="java.lang.String">
|
||||
select table_name from information_schema.tables where TABLE_SCHEMA=(select database())
|
||||
and table_name = #{tableName}
|
||||
</select>
|
||||
|
||||
<select id="getTableNameList" resultType="java.lang.String">
|
||||
select table_name from information_schema.tables where TABLE_SCHEMA=(select database())
|
||||
and table_name in
|
||||
<foreach item="tableName" collection="array" open="(" separator="," close=")">
|
||||
#{tableName}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -17,6 +17,7 @@
|
||||
<result property="datatype" column="datatype"/>
|
||||
<result property="formula" column="formula"/>
|
||||
<result property="specs" column="specs"/>
|
||||
<result property="group" column="group"/>
|
||||
<result property="isChart" column="is_chart"/>
|
||||
<result property="isSharePerm" column="is_share_perm"/>
|
||||
<result property="isHistory" column="is_history"/>
|
||||
@ -58,6 +59,7 @@
|
||||
datatype,
|
||||
formula,
|
||||
specs,
|
||||
group,
|
||||
is_chart,
|
||||
is_share_perm,
|
||||
is_history,
|
||||
@ -83,7 +85,7 @@
|
||||
end as model_name,
|
||||
m.model_name as model_name_zh_cn, t.en_us as model_name_en_us,
|
||||
m.product_id, m.product_name, m.tenant_id, m.tenant_name, m.identifier, m.type, m.datatype, m.formula,
|
||||
m.specs, m.is_chart, m.is_share_perm, m.is_history, m.is_monitor, m.is_app, m.del_flag, m.create_by,
|
||||
m.specs,m.group, m.is_chart, m.is_share_perm, m.is_history, m.is_monitor, m.is_app, m.del_flag, m.create_by,
|
||||
m.create_time, m.update_by, m.update_time, m.remark, m.is_readonly, m.model_order
|
||||
from iot_things_model m
|
||||
left join iot_things_model_translate t on m.model_id = t.id
|
||||
@ -138,7 +140,7 @@
|
||||
else m.model_name
|
||||
end as model_name,
|
||||
m.product_id, m.product_name, m.tenant_id, m.tenant_name, m.identifier, m.type, m.datatype, m.formula,
|
||||
m.specs, m.is_chart, m.is_share_perm, m.is_history, m.is_monitor, m.is_app, m.del_flag, m.create_by,
|
||||
m.specs,m.group, m.is_chart, m.is_share_perm, m.is_history, m.is_monitor, m.is_app, m.del_flag, m.create_by,
|
||||
m.create_time, m.update_by, m.update_time, m.remark, m.is_readonly, m.model_order
|
||||
from iot_things_model m
|
||||
left join iot_things_model_translate t on m.model_id = t.id
|
||||
@ -156,7 +158,7 @@
|
||||
else m.model_name
|
||||
end as model_name,
|
||||
m.product_id, m.product_name, m.tenant_id, m.tenant_name, m.identifier, m.type, m.datatype, m.formula,
|
||||
m.specs, m.is_chart, m.is_share_perm, m.is_history, m.is_monitor, m.is_app, m.del_flag, m.create_by,
|
||||
m.specs, m.group,m.is_chart, m.is_share_perm, m.is_history, m.is_monitor, m.is_app, m.del_flag, m.create_by,
|
||||
m.create_time, m.update_by, m.update_time, m.remark, m.is_readonly, m.model_order
|
||||
from iot_things_model m
|
||||
left join iot_things_model_translate t on m.model_id = t.id
|
||||
@ -171,7 +173,7 @@
|
||||
else m.model_name
|
||||
end as model_name,
|
||||
m.product_id, m.product_name, m.tenant_id, m.tenant_name, m.identifier, m.type, m.datatype, m.formula,
|
||||
m.specs, m.is_chart, m.is_share_perm, m.is_history, m.is_monitor, m.is_app, m.del_flag, m.create_by,
|
||||
m.specs,m.group, m.is_chart, m.is_share_perm, m.is_history, m.is_monitor, m.is_app, m.del_flag, m.create_by,
|
||||
m.create_time, m.update_by, m.update_time, m.remark, m.is_readonly, m.model_order
|
||||
from iot_things_model m
|
||||
left join iot_things_model_translate t on m.model_id = t.id
|
||||
@ -219,6 +221,9 @@
|
||||
<if test="specs != null and specs != ''">
|
||||
specs,
|
||||
</if>
|
||||
<if test="group != null and group != ''">
|
||||
group,
|
||||
</if>
|
||||
<if test="isChart != null">
|
||||
is_chart,
|
||||
</if>
|
||||
@ -290,6 +295,9 @@
|
||||
<if test="specs != null and specs != ''">
|
||||
#{specs},
|
||||
</if>
|
||||
<if test="group != null and group != ''">
|
||||
#{group},
|
||||
</if>
|
||||
<if test="isChart != null">
|
||||
#{isChart},
|
||||
</if>
|
||||
@ -344,6 +352,7 @@
|
||||
type,
|
||||
datatype,
|
||||
specs,
|
||||
group,
|
||||
is_chart,
|
||||
is_share_perm,
|
||||
is_history,
|
||||
@ -359,7 +368,7 @@
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{model.modelName},#{model.productId},#{model.productName},#{model.tenantId},
|
||||
#{model.tenantName},#{model.identifier},#{model.type},#{model.datatype},
|
||||
#{model.specs},#{model.isChart},#{model.isSharePerm},#{model.isHistory},
|
||||
#{model.specs},#{model.group},#{model.isChart},#{model.isSharePerm},#{model.isHistory},
|
||||
#{model.isMonitor},#{model.isApp},#{model.isReadonly},#{model.createBy},#{model.createTime},
|
||||
#{model.formula}
|
||||
</trim>
|
||||
@ -399,6 +408,9 @@
|
||||
<if test="specs != null and specs != ''">
|
||||
specs = #{specs},
|
||||
</if>
|
||||
<if test="group != null and group != ''">
|
||||
group = #{group},
|
||||
</if>
|
||||
<if test="isChart != null">
|
||||
is_chart = #{isChart},
|
||||
</if>
|
||||
|
Reference in New Issue
Block a user