Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mqttsnet
thinglinks
提交
0fe25e09
thinglinks
项目概览
mqttsnet
/
thinglinks
通知
1
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
thinglinks
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0fe25e09
编写于
12月 26, 2021
作者:
很久是多久
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/release/1.0.0' into release/1.0.0
上级
c119c886
fb3c03bd
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
241 addition
and
225 deletion
+241
-225
doc/nacos-config/DEFAULT_GROUP/thinglinks-broker-dev.yml
doc/nacos-config/DEFAULT_GROUP/thinglinks-broker-dev.yml
+5
-5
thinglinks-api/thinglinks-api-link/src/main/java/com/mqttsnet/thinglinks/link/api/domain/device/entity/DeviceAction.java
...hinglinks/link/api/domain/device/entity/DeviceAction.java
+3
-3
thinglinks-api/thinglinks-api-link/src/main/java/com/mqttsnet/thinglinks/link/api/domain/device/entity/DeviceDatas.java
...thinglinks/link/api/domain/device/entity/DeviceDatas.java
+3
-3
thinglinks-api/thinglinks-api-link/src/main/java/com/mqttsnet/thinglinks/link/api/domain/product/model/ProductModel.java
...hinglinks/link/api/domain/product/model/ProductModel.java
+1
-1
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/common/rockermq/consumer/DeviceActionMessageConsumer.java
...common/rockermq/consumer/DeviceActionMessageConsumer.java
+5
-5
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/mapper/device/DeviceActionMapper.java
...net/thinglinks/link/mapper/device/DeviceActionMapper.java
+16
-12
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/mapper/device/DeviceDatasMapper.java
...snet/thinglinks/link/mapper/device/DeviceDatasMapper.java
+16
-12
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/service/device/DeviceActionService.java
...t/thinglinks/link/service/device/DeviceActionService.java
+16
-13
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/service/device/DeviceDatasService.java
...et/thinglinks/link/service/device/DeviceDatasService.java
+15
-13
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/service/device/impl/DeviceActionServiceImpl.java
...nks/link/service/device/impl/DeviceActionServiceImpl.java
+15
-14
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/service/device/impl/DeviceDatasServiceImpl.java
...inks/link/service/device/impl/DeviceDatasServiceImpl.java
+15
-13
thinglinks-modules/thinglinks-modules-link/src/main/resources/mapper/link/device/DeviceActionMapper.xml
.../main/resources/mapper/link/device/DeviceActionMapper.xml
+62
-62
thinglinks-modules/thinglinks-modules-link/src/main/resources/mapper/link/device/DeviceDatasMapper.xml
...c/main/resources/mapper/link/device/DeviceDatasMapper.xml
+61
-61
thinglinks-ui/src/views/link/device/index.vue
thinglinks-ui/src/views/link/device/index.vue
+8
-8
未找到文件。
doc/nacos-config/DEFAULT_GROUP/thinglinks-broker-dev.yml
浏览文件 @
0fe25e09
...
...
@@ -123,19 +123,19 @@ smqtt:
-
ruleName
:
ROCKET_MQ
# 过滤器名称
chain
:
# 规则链(支持多个)
-
ruleType
:
ROCKET_MQ
# 过滤器类型
script
:
'
{"topic":"${topic}","msg":
"${msg}"
,"qos":${qos}}'
script
:
'
{"topic":"${topic}","msg":
${msg}
,"qos":${qos}}'
-
ruleName
:
KAFKA
# 过滤器名称
chain
:
# 规则链(支持多个)
-
ruleType
:
KAFKA
# 过滤器类型
script
:
'
{"topic":"${topic}","msg":
"${msg}"
,"qos":${qos}}'
script
:
'
{"topic":"${topic}","msg":
${msg}
,"qos":${qos}}'
# - ruleName: HTTP # 过滤器名称
# chain: # 规则链(支持多个)
# - ruleType: HTTP
# script: '{"topic":"${topic}","msg":
"${msg.test}"
,"qos":${qos}}'
# script: '{"topic":"${topic}","msg":
${msg.test}
,"qos":${qos}}'
# - ruleName: MQTT # 过滤器名称
# chain: # 规则链(支持多个)
# - ruleType: MQTT # 过滤器类型
# script: '{"topic":"${topic}","msg":
"${msg}"
,"qos":${qos}}'
# script: '{"topic":"${topic}","msg":
${msg}
,"qos":${qos}}'
# - ruleName: DATA_BASE # 过滤器名称
# chain: # 规则链
# - ruleType: DATA_BASE # 过滤器类型
...
...
@@ -143,7 +143,7 @@ smqtt:
# - ruleName: RABBIT_MQ # 过滤器名称
# chain: # 规则链
# - ruleType: RABBIT_MQ # 过滤器类型
# script: '{"topic":"${topic}","msg":
"${msg}"
,"qos":${qos}}'
# script: '{"topic":"${topic}","msg":
${msg}
,"qos":${qos}}'
sources
:
# 配置数据源sources
-
source
:
ROCKET_MQ
# rocketmq配置
sourceName
:
rocket_mq
...
...
thinglinks-api/thinglinks-api-link/src/main/java/com/mqttsnet/thinglinks/link/api/domain/device/entity/DeviceAction.java
浏览文件 @
0fe25e09
...
...
@@ -8,13 +8,13 @@ import lombok.Data;
/**
* @Description:
设备动作数据
* @Description:
java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163.com
* @Website: http://thinglinks.mqttsnet.com
* @CreateDate: 2021/12/26$
0:27
$
* @CreateDate: 2021/12/26$
13:20
$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$
0:27
$
* @UpdateDate: 2021/12/26$
13:20
$
* @UpdateRemark: 修改内容
* @Version: 1.0
...
...
thinglinks-api/thinglinks-api-link/src/main/java/com/mqttsnet/thinglinks/link/api/domain/device/entity/DeviceDatas.java
浏览文件 @
0fe25e09
...
...
@@ -8,13 +8,13 @@ import lombok.Data;
/**
* @Description:
设备消息
* @Description:
java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163.com
* @Website: http://thinglinks.mqttsnet.com
* @CreateDate: 2021/12/26$
0:27
$
* @CreateDate: 2021/12/26$
13:20
$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$
0:27
$
* @UpdateDate: 2021/12/26$
13:20
$
* @UpdateRemark: 修改内容
* @Version: 1.0
...
...
thinglinks-api/thinglinks-api-link/src/main/java/com/mqttsnet/thinglinks/link/api/domain/product/model/Product.java
→
thinglinks-api/thinglinks-api-link/src/main/java/com/mqttsnet/thinglinks/link/api/domain/product/model/Product
Model
.java
浏览文件 @
0fe25e09
...
...
@@ -13,7 +13,7 @@ import java.util.List;
* @date 2021-12-23
*/
@Data
public
class
Product
{
public
class
Product
Model
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
productName
;
private
Integer
productType
;
...
...
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/common/rockermq/consumer/DeviceActionMessageConsumer.java
浏览文件 @
0fe25e09
...
...
@@ -32,8 +32,8 @@ public class DeviceActionMessageConsumer implements RocketMQListener {
@Override
public
void
onMessage
(
Object
message
)
{
assert
message
!=
null
;
System
.
out
.
println
(
"Link消费消息"
+
message
);
JSONObject
thinglinksMessage
=
JSONObject
.
parseObject
(
(
String
)
message
);
System
.
out
.
println
(
"Link消费
设备
消息"
+
message
);
JSONObject
thinglinksMessage
=
JSONObject
.
parseObject
(
String
.
valueOf
(
message
)
);
/**
* TODO 设备上下线处理
* $event/close 设备断开事件
...
...
@@ -41,11 +41,11 @@ public class DeviceActionMessageConsumer implements RocketMQListener {
* ${topic} 其他为业务数据自行处理
*/
if
(
"$event/connect"
.
equals
(
thinglinksMessage
.
get
(
"topic"
))){
deviceActionService
.
connectEvent
(
thinglinksMessage
.
get
(
"msg"
).
toString
(
));
deviceActionService
.
connectEvent
(
String
.
valueOf
(
thinglinksMessage
.
get
(
"msg"
).
toString
()
));
}
else
if
(
"$event/close"
.
equals
(
thinglinksMessage
.
get
(
"topic"
))){
deviceActionService
.
closeEvent
(
thinglinksMessage
.
get
(
"msg"
).
toString
(
));
deviceActionService
.
closeEvent
(
String
.
valueOf
(
thinglinksMessage
.
get
(
"msg"
)
));
}
else
{
deviceDatasService
.
insertBaseDatas
(
thinglinksMessage
.
get
(
"msg"
).
toString
(
));
deviceDatasService
.
insertBaseDatas
(
String
.
valueOf
(
thinglinksMessage
.
get
(
"msg"
)
));
}
}
}
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/mapper/device/DeviceActionMapper.java
浏览文件 @
0fe25e09
...
...
@@ -6,22 +6,21 @@ import org.apache.ibatis.annotations.Mapper;
import
org.apache.ibatis.annotations.Param
;
/**
* @Description: java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163.com
* @Website: http://thinglinks.mqttsnet.com
* @CreateDate: 2021/12/26$ 0:27$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$ 0:27$
* @UpdateRemark: 修改内容
* @Version: 1.0
*/
* @Description: java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163.com
* @Website: http://thinglinks.mqttsnet.com
* @CreateDate: 2021/12/26$ 13:20$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$ 13:20$
* @UpdateRemark: 修改内容
* @Version: 1.0
*/
@Mapper
public
interface
DeviceActionMapper
{
/**
* delete by primary key
*
* @param id primaryKey
* @return deleteCount
*/
...
...
@@ -29,6 +28,7 @@ public interface DeviceActionMapper {
/**
* insert record to table
*
* @param record the record
* @return insert count
*/
...
...
@@ -42,6 +42,7 @@ public interface DeviceActionMapper {
/**
* insert record to table selective
*
* @param record the record
* @return insert count
*/
...
...
@@ -49,6 +50,7 @@ public interface DeviceActionMapper {
/**
* select by primary key
*
* @param id primary key
* @return object by primary key
*/
...
...
@@ -56,6 +58,7 @@ public interface DeviceActionMapper {
/**
* update record selective
*
* @param record the updated record
* @return update count
*/
...
...
@@ -65,6 +68,7 @@ public interface DeviceActionMapper {
/**
* update record
*
* @param record the updated record
* @return update count
*/
...
...
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/mapper/device/DeviceDatasMapper.java
浏览文件 @
0fe25e09
...
...
@@ -6,22 +6,21 @@ import org.apache.ibatis.annotations.Mapper;
import
org.apache.ibatis.annotations.Param
;
/**
* @Description: java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163.com
* @Website: http://thinglinks.mqttsnet.com
* @CreateDate: 2021/12/26$ 0:27$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$ 0:27$
* @UpdateRemark: 修改内容
* @Version: 1.0
*/
* @Description: java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163.com
* @Website: http://thinglinks.mqttsnet.com
* @CreateDate: 2021/12/26$ 13:20$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$ 13:20$
* @UpdateRemark: 修改内容
* @Version: 1.0
*/
@Mapper
public
interface
DeviceDatasMapper
{
/**
* delete by primary key
*
* @param id primaryKey
* @return deleteCount
*/
...
...
@@ -29,6 +28,7 @@ public interface DeviceDatasMapper {
/**
* insert record to table
*
* @param record the record
* @return insert count
*/
...
...
@@ -42,6 +42,7 @@ public interface DeviceDatasMapper {
/**
* insert record to table selective
*
* @param record the record
* @return insert count
*/
...
...
@@ -49,6 +50,7 @@ public interface DeviceDatasMapper {
/**
* select by primary key
*
* @param id primary key
* @return object by primary key
*/
...
...
@@ -56,6 +58,7 @@ public interface DeviceDatasMapper {
/**
* update record selective
*
* @param record the updated record
* @return update count
*/
...
...
@@ -65,6 +68,7 @@ public interface DeviceDatasMapper {
/**
* update record
*
* @param record the updated record
* @return update count
*/
...
...
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/service/device/DeviceActionService.java
浏览文件 @
0fe25e09
...
...
@@ -2,20 +2,19 @@ package com.mqttsnet.thinglinks.link.service.device;
import
java.util.List
;
import
com.mqttsnet.thinglinks.link.api.domain.device.entity.DeviceAction
;
/**
* @Description: java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163.com
* @Website: http://thinglinks.mqttsnet.com
* @CreateDate: 2021/12/26$ 0:27$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$ 0:27$
* @UpdateRemark: 修改内容
* @Version: 1.0
*/
public
interface
DeviceActionService
{
/**
* @Description: java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163.com
* @Website: http://thinglinks.mqttsnet.com
* @CreateDate: 2021/12/26$ 0:27$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$ 0:27$
* @UpdateRemark: 修改内容
* @Version: 1.0
*/
public
interface
DeviceActionService
{
int
deleteByPrimaryKey
(
Long
id
);
...
...
@@ -46,14 +45,18 @@ public interface DeviceActionService{
/**
* 设备连接事件
*
* @param thinglinksMessage
*/
void
connectEvent
(
String
thinglinksMessage
);
/**
* 设备断开事件
*
* @param thinglinksMessage
*/
void
closeEvent
(
String
thinglinksMessage
);
}
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/service/device/DeviceDatasService.java
浏览文件 @
0fe25e09
...
...
@@ -2,20 +2,19 @@ package com.mqttsnet.thinglinks.link.service.device;
import
java.util.List
;
import
com.mqttsnet.thinglinks.link.api.domain.device.entity.DeviceDatas
;
/**
* @Description: java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163.com
* @Website: http://thinglinks.mqttsnet.com
* @CreateDate: 2021/12/26$ 0:27$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$ 0:27$
* @UpdateRemark: 修改内容
* @Version: 1.0
*/
public
interface
DeviceDatasService
{
/**
* @Description: java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163.com
* @Website: http://thinglinks.mqttsnet.com
* @CreateDate: 2021/12/26$ 0:27$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$ 0:27$
* @UpdateRemark: 修改内容
* @Version: 1.0
*/
public
interface
DeviceDatasService
{
int
deleteByPrimaryKey
(
Long
id
);
...
...
@@ -46,8 +45,11 @@ public interface DeviceDatasService{
/**
* thinglinks-mqtt基础数据处理
*
* @param thinglinksMessage
*/
void
insertBaseDatas
(
String
thinglinksMessage
);
}
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/service/device/impl/DeviceActionServiceImpl.java
浏览文件 @
0fe25e09
...
...
@@ -13,21 +13,20 @@ import java.util.Map;
import
com.mqttsnet.thinglinks.link.mapper.device.DeviceActionMapper
;
import
com.mqttsnet.thinglinks.link.api.domain.device.entity.DeviceAction
;
import
com.mqttsnet.thinglinks.link.service.device.DeviceActionService
;
/**
* @Description: java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163.com
* @Website: http://thinglinks.mqttsnet
.com
* @CreateDate: 2021/12/26$ 0:27$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$ 0:27$
* @UpdateRemark: 修改内容
* @Version: 1.0
*/
/**
* @Description: java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163
.com
* @Website: http://thinglinks.mqttsnet.com
* @CreateDate: 2021/12/26$ 0:27$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$ 0:27$
* @UpdateRemark: 修改内容
* @Version: 1.0
*/
@Service
public
class
DeviceActionServiceImpl
implements
DeviceActionService
{
public
class
DeviceActionServiceImpl
implements
DeviceActionService
{
@Resource
private
DeviceActionMapper
deviceActionMapper
;
...
...
@@ -132,10 +131,12 @@ public class DeviceActionServiceImpl implements DeviceActionService{
DeviceAction
deviceAction
=
new
DeviceAction
();
deviceAction
.
setDeviceIdentification
(
String
.
valueOf
(
map
.
get
(
"clientIdentifier"
)));
deviceAction
.
setActionType
(
String
.
valueOf
(
map
.
get
(
"channelStatus"
)));
deviceAction
.
setStatus
(
i
!=
0
?
"success"
:
"failure"
);
deviceAction
.
setStatus
(
i
!=
0
?
"success"
:
"failure"
);
deviceAction
.
setMessage
(
"Device Disconnection"
);
deviceAction
.
setCreateTime
(
LocalDateTimeUtil
.
now
());
deviceActionMapper
.
insertOrUpdate
(
deviceAction
);
}
}
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/service/device/impl/DeviceDatasServiceImpl.java
浏览文件 @
0fe25e09
package
com.mqttsnet.thinglinks.link.service.device.impl
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -7,22 +8,21 @@ import java.util.List;
import
com.mqttsnet.thinglinks.link.mapper.device.DeviceDatasMapper
;
import
com.mqttsnet.thinglinks.link.api.domain.device.entity.DeviceDatas
;
import
com.mqttsnet.thinglinks.link.service.device.DeviceDatasService
;
/**
* @Description: java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163.com
* @Website: http://thinglinks.mqttsnet
.com
* @CreateDate: 2021/12/26$ 0:27$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$ 0:27$
* @UpdateRemark: 修改内容
* @Version: 1.0
*/
/**
* @Description: java类作用描述
* @Author: ShiHuan Sun
* @E-mail: 13733918655@163
.com
* @Website: http://thinglinks.mqttsnet.com
* @CreateDate: 2021/12/26$ 0:27$
* @UpdateUser: ShiHuan Sun
* @UpdateDate: 2021/12/26$ 0:27$
* @UpdateRemark: 修改内容
* @Version: 1.0
*/
@Service
@Slf4j
public
class
DeviceDatasServiceImpl
implements
DeviceDatasService
{
public
class
DeviceDatasServiceImpl
implements
DeviceDatasService
{
@Resource
private
DeviceDatasMapper
deviceDatasMapper
;
...
...
@@ -103,3 +103,5 @@ public class DeviceDatasServiceImpl implements DeviceDatasService{
}
}
thinglinks-modules/thinglinks-modules-link/src/main/resources/mapper/link/device/DeviceActionMapper.xml
浏览文件 @
0fe25e09
...
...
@@ -42,24 +42,24 @@
insert into device_action (device_identification, action_type,
`status`, create_time, message
)
values (#{device
_identification,jdbcType=VARCHAR}, #{action_t
ype,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{create
_t
ime,jdbcType=TIMESTAMP}, #{message,jdbcType=LONGVARCHAR}
values (#{device
Identification,jdbcType=VARCHAR}, #{actionT
ype,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{create
T
ime,jdbcType=TIMESTAMP}, #{message,jdbcType=LONGVARCHAR}
)
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.mqttsnet.thinglinks.link.api.domain.device.entity.DeviceAction"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into device_action
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"device
_identification != null and device_i
dentification != ''"
>
<if
test=
"device
Identification != null and deviceI
dentification != ''"
>
device_identification,
</if>
<if
test=
"action
_type != null and action_t
ype != ''"
>
<if
test=
"action
Type != null and actionT
ype != ''"
>
action_type,
</if>
<if
test=
"status != null and status != ''"
>
`status`,
</if>
<if
test=
"create
_t
ime != null"
>
<if
test=
"create
T
ime != null"
>
create_time,
</if>
<if
test=
"message != null and message != ''"
>
...
...
@@ -67,17 +67,17 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"device
_identification != null and device_i
dentification != ''"
>
#{device
_i
dentification,jdbcType=VARCHAR},
<if
test=
"device
Identification != null and deviceI
dentification != ''"
>
#{device
I
dentification,jdbcType=VARCHAR},
</if>
<if
test=
"action
_type != null and action_t
ype != ''"
>
#{action
_t
ype,jdbcType=VARCHAR},
<if
test=
"action
Type != null and actionT
ype != ''"
>
#{action
T
ype,jdbcType=VARCHAR},
</if>
<if
test=
"status != null and status != ''"
>
#{status,jdbcType=VARCHAR},
</if>
<if
test=
"create
_t
ime != null"
>
#{create
_t
ime,jdbcType=TIMESTAMP},
<if
test=
"create
T
ime != null"
>
#{create
T
ime,jdbcType=TIMESTAMP},
</if>
<if
test=
"message != null and message != ''"
>
#{message,jdbcType=LONGVARCHAR},
...
...
@@ -88,17 +88,17 @@
<!--@mbg.generated-->
update device_action
<set>
<if
test=
"device
_identification != null and device_i
dentification != ''"
>
device_identification = #{device
_i
dentification,jdbcType=VARCHAR},
<if
test=
"device
Identification != null and deviceI
dentification != ''"
>
device_identification = #{device
I
dentification,jdbcType=VARCHAR},
</if>
<if
test=
"action
_type != null and action_t
ype != ''"
>
action_type = #{action
_t
ype,jdbcType=VARCHAR},
<if
test=
"action
Type != null and actionT
ype != ''"
>
action_type = #{action
T
ype,jdbcType=VARCHAR},
</if>
<if
test=
"status != null and status != ''"
>
`status` = #{status,jdbcType=VARCHAR},
</if>
<if
test=
"create
_t
ime != null"
>
create_time = #{create
_t
ime,jdbcType=TIMESTAMP},
<if
test=
"create
T
ime != null"
>
create_time = #{create
T
ime,jdbcType=TIMESTAMP},
</if>
<if
test=
"message != null and message != ''"
>
message = #{message,jdbcType=LONGVARCHAR},
...
...
@@ -109,20 +109,20 @@
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.mqttsnet.thinglinks.link.api.domain.device.entity.DeviceAction"
>
<!--@mbg.generated-->
update device_action
set device_identification = #{device
_i
dentification,jdbcType=VARCHAR},
action_type = #{action
_t
ype,jdbcType=VARCHAR},
set device_identification = #{device
I
dentification,jdbcType=VARCHAR},
action_type = #{action
T
ype,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{create
_t
ime,jdbcType=TIMESTAMP},
create_time = #{create
T
ime,jdbcType=TIMESTAMP},
message = #{message,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.mqttsnet.thinglinks.link.api.domain.device.entity.DeviceAction"
>
<!--@mbg.generated-->
update device_action
set device_identification = #{device
_i
dentification,jdbcType=VARCHAR},
action_type = #{action
_t
ype,jdbcType=VARCHAR},
set device_identification = #{device
I
dentification,jdbcType=VARCHAR},
action_type = #{action
T
ype,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{create
_t
ime,jdbcType=TIMESTAMP}
create_time = #{create
T
ime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
...
...
@@ -131,12 +131,12 @@
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"device_identification = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.device
_i
dentification,jdbcType=VARCHAR}
when id = #{item.id,jdbcType=BIGINT} then #{item.device
I
dentification,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"action_type = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.action
_t
ype,jdbcType=VARCHAR}
when id = #{item.id,jdbcType=BIGINT} then #{item.action
T
ype,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"`status` = case"
suffix=
"end,"
>
...
...
@@ -146,7 +146,7 @@
</trim>
<trim
prefix=
"create_time = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.create
_t
ime,jdbcType=TIMESTAMP}
when id = #{item.id,jdbcType=BIGINT} then #{item.create
T
ime,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"message = case"
suffix=
"end,"
>
...
...
@@ -166,15 +166,15 @@
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"device_identification = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.device
_i
dentification != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.device
_i
dentification,jdbcType=VARCHAR}
<if
test=
"item.device
I
dentification != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.device
I
dentification,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"action_type = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.action
_t
ype != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.action
_t
ype,jdbcType=VARCHAR}
<if
test=
"item.action
T
ype != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.action
T
ype,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
...
...
@@ -187,15 +187,15 @@
</trim>
<trim
prefix=
"create_time = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.create
_t
ime != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.create
_t
ime,jdbcType=TIMESTAMP}
<if
test=
"item.create
T
ime != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.create
T
ime,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
<trim
prefix=
"message = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.message != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.message,jdbcType=LONGVARCHAR}
when id = #{item.id,jdbcType=BIGINT} then #{item.message,jdbcType=LONGVARCHAR}
</if>
</foreach>
</trim>
...
...
@@ -211,8 +211,8 @@
(device_identification, action_type, `status`, create_time, message)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.device
_identification,jdbcType=VARCHAR}, #{item.action_t
ype,jdbcType=VARCHAR},
#{item.status,jdbcType=VARCHAR}, #{item.create
_t
ime,jdbcType=TIMESTAMP}, #{item.message,jdbcType=LONGVARCHAR}
(#{item.device
Identification,jdbcType=VARCHAR}, #{item.actionT
ype,jdbcType=VARCHAR},
#{item.status,jdbcType=VARCHAR}, #{item.create
T
ime,jdbcType=TIMESTAMP}, #{item.message,jdbcType=LONGVARCHAR}
)
</foreach>
</insert>
...
...
@@ -233,20 +233,20 @@
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
#{device
_i
dentification,jdbcType=VARCHAR},
#{action
_t
ype,jdbcType=VARCHAR},
#{device
I
dentification,jdbcType=VARCHAR},
#{action
T
ype,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR},
#{create
_t
ime,jdbcType=TIMESTAMP},
#{create
T
ime,jdbcType=TIMESTAMP},
</trim>
on duplicate key update
<trim
suffixOverrides=
","
>
<if
test=
"id != null"
>
id = #{id,jdbcType=BIGINT},
</if>
device_identification = #{device
_i
dentification,jdbcType=VARCHAR},
action_type = #{action
_t
ype,jdbcType=VARCHAR},
device_identification = #{device
I
dentification,jdbcType=VARCHAR},
action_type = #{action
T
ype,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{create
_t
ime,jdbcType=TIMESTAMP},
create_time = #{create
T
ime,jdbcType=TIMESTAMP},
</trim>
</insert>
<insert
id=
"insertOrUpdateWithBLOBs"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.mqttsnet.thinglinks.link.api.domain.device.entity.DeviceAction"
useGeneratedKeys=
"true"
>
...
...
@@ -267,10 +267,10 @@
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
#{device
_i
dentification,jdbcType=VARCHAR},
#{action
_t
ype,jdbcType=VARCHAR},
#{device
I
dentification,jdbcType=VARCHAR},
#{action
T
ype,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR},
#{create
_t
ime,jdbcType=TIMESTAMP},
#{create
T
ime,jdbcType=TIMESTAMP},
#{message,jdbcType=LONGVARCHAR},
</trim>
on duplicate key update
...
...
@@ -278,10 +278,10 @@
<if
test=
"id != null"
>
id = #{id,jdbcType=BIGINT},
</if>
device_identification = #{device
_i
dentification,jdbcType=VARCHAR},
action_type = #{action
_t
ype,jdbcType=VARCHAR},
device_identification = #{device
I
dentification,jdbcType=VARCHAR},
action_type = #{action
T
ype,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{create
_t
ime,jdbcType=TIMESTAMP},
create_time = #{create
T
ime,jdbcType=TIMESTAMP},
message = #{message,jdbcType=LONGVARCHAR},
</trim>
</insert>
...
...
@@ -292,16 +292,16 @@
<if
test=
"id != null"
>
id,
</if>
<if
test=
"device
_identification != null and device_i
dentification != ''"
>
<if
test=
"device
Identification != null and deviceI
dentification != ''"
>
device_identification,
</if>
<if
test=
"action
_type != null and action_t
ype != ''"
>
<if
test=
"action
Type != null and actionT
ype != ''"
>
action_type,
</if>
<if
test=
"status != null and status != ''"
>
`status`,
</if>
<if
test=
"create
_t
ime != null"
>
<if
test=
"create
T
ime != null"
>
create_time,
</if>
<if
test=
"message != null and message != ''"
>
...
...
@@ -313,17 +313,17 @@
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"device
_identification != null and device_i
dentification != ''"
>
#{device
_i
dentification,jdbcType=VARCHAR},
<if
test=
"device
Identification != null and deviceI
dentification != ''"
>
#{device
I
dentification,jdbcType=VARCHAR},
</if>
<if
test=
"action
_type != null and action_t
ype != ''"
>
#{action
_t
ype,jdbcType=VARCHAR},
<if
test=
"action
Type != null and actionT
ype != ''"
>
#{action
T
ype,jdbcType=VARCHAR},
</if>
<if
test=
"status != null and status != ''"
>
#{status,jdbcType=VARCHAR},
</if>
<if
test=
"create
_t
ime != null"
>
#{create
_t
ime,jdbcType=TIMESTAMP},
<if
test=
"create
T
ime != null"
>
#{create
T
ime,jdbcType=TIMESTAMP},
</if>
<if
test=
"message != null and message != ''"
>
#{message,jdbcType=LONGVARCHAR},
...
...
@@ -334,17 +334,17 @@
<if
test=
"id != null"
>
id = #{id,jdbcType=BIGINT},
</if>
<if
test=
"device
_identification != null and device_i
dentification != ''"
>
device_identification = #{device
_i
dentification,jdbcType=VARCHAR},
<if
test=
"device
Identification != null and deviceI
dentification != ''"
>
device_identification = #{device
I
dentification,jdbcType=VARCHAR},
</if>
<if
test=
"action
_type != null and action_t
ype != ''"
>
action_type = #{action
_t
ype,jdbcType=VARCHAR},
<if
test=
"action
Type != null and actionT
ype != ''"
>
action_type = #{action
T
ype,jdbcType=VARCHAR},
</if>
<if
test=
"status != null and status != ''"
>
`status` = #{status,jdbcType=VARCHAR},
</if>
<if
test=
"create
_t
ime != null"
>
create_time = #{create
_t
ime,jdbcType=TIMESTAMP},
<if
test=
"create
T
ime != null"
>
create_time = #{create
T
ime,jdbcType=TIMESTAMP},
</if>
<if
test=
"message != null and message != ''"
>
message = #{message,jdbcType=LONGVARCHAR},
...
...
thinglinks-modules/thinglinks-modules-link/src/main/resources/mapper/link/device/DeviceDatasMapper.xml
浏览文件 @
0fe25e09
...
...
@@ -43,18 +43,18 @@
insert into device_datas (device_identification, message_id,
topic, `status`, create_time,
message)
values (#{device
_identification,jdbcType=VARCHAR}, #{message_i
d,jdbcType=VARCHAR},
#{topic,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{create
_t
ime,jdbcType=TIMESTAMP},
values (#{device
Identification,jdbcType=VARCHAR}, #{messageI
d,jdbcType=VARCHAR},
#{topic,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{create
T
ime,jdbcType=TIMESTAMP},
#{message,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.mqttsnet.thinglinks.link.api.domain.device.entity.DeviceDatas"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into device_datas
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"device
_identification != null and device_i
dentification != ''"
>
<if
test=
"device
Identification != null and deviceI
dentification != ''"
>
device_identification,
</if>
<if
test=
"message
_id != null and message_i
d != ''"
>
<if
test=
"message
Id != null and messageI
d != ''"
>
message_id,
</if>
<if
test=
"topic != null and topic != ''"
>
...
...
@@ -63,7 +63,7 @@
<if
test=
"status != null and status != ''"
>
`status`,
</if>
<if
test=
"create
_t
ime != null"
>
<if
test=
"create
T
ime != null"
>
create_time,
</if>
<if
test=
"message != null and message != ''"
>
...
...
@@ -71,11 +71,11 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"device
_identification != null and device_i
dentification != ''"
>
#{device
_i
dentification,jdbcType=VARCHAR},
<if
test=
"device
Identification != null and deviceI
dentification != ''"
>
#{device
I
dentification,jdbcType=VARCHAR},
</if>
<if
test=
"message
_id != null and message_i
d != ''"
>
#{message
_i
d,jdbcType=VARCHAR},
<if
test=
"message
Id != null and messageI
d != ''"
>
#{message
I
d,jdbcType=VARCHAR},
</if>
<if
test=
"topic != null and topic != ''"
>
#{topic,jdbcType=VARCHAR},
...
...
@@ -83,8 +83,8 @@
<if
test=
"status != null and status != ''"
>
#{status,jdbcType=VARCHAR},
</if>
<if
test=
"create
_t
ime != null"
>
#{create
_t
ime,jdbcType=TIMESTAMP},
<if
test=
"create
T
ime != null"
>
#{create
T
ime,jdbcType=TIMESTAMP},
</if>
<if
test=
"message != null and message != ''"
>
#{message,jdbcType=LONGVARCHAR},
...
...
@@ -95,11 +95,11 @@
<!--@mbg.generated-->
update device_datas
<set>
<if
test=
"device
_identification != null and device_i
dentification != ''"
>
device_identification = #{device
_i
dentification,jdbcType=VARCHAR},
<if
test=
"device
Identification != null and deviceI
dentification != ''"
>
device_identification = #{device
I
dentification,jdbcType=VARCHAR},
</if>
<if
test=
"message
_id != null and message_i
d != ''"
>
message_id = #{message
_i
d,jdbcType=VARCHAR},
<if
test=
"message
Id != null and messageI
d != ''"
>
message_id = #{message
I
d,jdbcType=VARCHAR},
</if>
<if
test=
"topic != null and topic != ''"
>
topic = #{topic,jdbcType=VARCHAR},
...
...
@@ -107,8 +107,8 @@
<if
test=
"status != null and status != ''"
>
`status` = #{status,jdbcType=VARCHAR},
</if>
<if
test=
"create
_t
ime != null"
>
create_time = #{create
_t
ime,jdbcType=TIMESTAMP},
<if
test=
"create
T
ime != null"
>
create_time = #{create
T
ime,jdbcType=TIMESTAMP},
</if>
<if
test=
"message != null and message != ''"
>
message = #{message,jdbcType=LONGVARCHAR},
...
...
@@ -119,22 +119,22 @@
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.mqttsnet.thinglinks.link.api.domain.device.entity.DeviceDatas"
>
<!--@mbg.generated-->
update device_datas
set device_identification = #{device
_i
dentification,jdbcType=VARCHAR},
message_id = #{message
_i
d,jdbcType=VARCHAR},
set device_identification = #{device
I
dentification,jdbcType=VARCHAR},
message_id = #{message
I
d,jdbcType=VARCHAR},
topic = #{topic,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{create
_t
ime,jdbcType=TIMESTAMP},
create_time = #{create
T
ime,jdbcType=TIMESTAMP},
message = #{message,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.mqttsnet.thinglinks.link.api.domain.device.entity.DeviceDatas"
>
<!--@mbg.generated-->
update device_datas
set device_identification = #{device
_i
dentification,jdbcType=VARCHAR},
message_id = #{message
_i
d,jdbcType=VARCHAR},
set device_identification = #{device
I
dentification,jdbcType=VARCHAR},
message_id = #{message
I
d,jdbcType=VARCHAR},
topic = #{topic,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{create
_t
ime,jdbcType=TIMESTAMP}
create_time = #{create
T
ime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
...
...
@@ -143,12 +143,12 @@
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"device_identification = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.device
_i
dentification,jdbcType=VARCHAR}
when id = #{item.id,jdbcType=BIGINT} then #{item.device
I
dentification,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"message_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.message
_i
d,jdbcType=VARCHAR}
when id = #{item.id,jdbcType=BIGINT} then #{item.message
I
d,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"topic = case"
suffix=
"end,"
>
...
...
@@ -163,7 +163,7 @@
</trim>
<trim
prefix=
"create_time = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.create
_t
ime,jdbcType=TIMESTAMP}
when id = #{item.id,jdbcType=BIGINT} then #{item.create
T
ime,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"message = case"
suffix=
"end,"
>
...
...
@@ -183,15 +183,15 @@
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"device_identification = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.device
_i
dentification != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.device
_i
dentification,jdbcType=VARCHAR}
<if
test=
"item.device
I
dentification != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.device
I
dentification,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"message_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.message
_i
d != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.message
_i
d,jdbcType=VARCHAR}
<if
test=
"item.message
I
d != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.message
I
d,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
...
...
@@ -211,8 +211,8 @@
</trim>
<trim
prefix=
"create_time = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.create
_t
ime != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.create
_t
ime,jdbcType=TIMESTAMP}
<if
test=
"item.create
T
ime != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.create
T
ime,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
...
...
@@ -235,8 +235,8 @@
(device_identification, message_id, topic, `status`, create_time, message)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.device
_identification,jdbcType=VARCHAR}, #{item.message_i
d,jdbcType=VARCHAR},
#{item.topic,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.create
_t
ime,jdbcType=TIMESTAMP},
(#{item.device
Identification,jdbcType=VARCHAR}, #{item.messageI
d,jdbcType=VARCHAR},
#{item.topic,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.create
T
ime,jdbcType=TIMESTAMP},
#{item.message,jdbcType=LONGVARCHAR})
</foreach>
</insert>
...
...
@@ -258,22 +258,22 @@
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
#{device
_i
dentification,jdbcType=VARCHAR},
#{message
_i
d,jdbcType=VARCHAR},
#{device
I
dentification,jdbcType=VARCHAR},
#{message
I
d,jdbcType=VARCHAR},
#{topic,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR},
#{create
_t
ime,jdbcType=TIMESTAMP},
#{create
T
ime,jdbcType=TIMESTAMP},
</trim>
on duplicate key update
<trim
suffixOverrides=
","
>
<if
test=
"id != null"
>
id = #{id,jdbcType=BIGINT},
</if>
device_identification = #{device
_i
dentification,jdbcType=VARCHAR},
message_id = #{message
_i
d,jdbcType=VARCHAR},
device_identification = #{device
I
dentification,jdbcType=VARCHAR},
message_id = #{message
I
d,jdbcType=VARCHAR},
topic = #{topic,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{create
_t
ime,jdbcType=TIMESTAMP},
create_time = #{create
T
ime,jdbcType=TIMESTAMP},
</trim>
</insert>
<insert
id=
"insertOrUpdateWithBLOBs"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.mqttsnet.thinglinks.link.api.domain.device.entity.DeviceDatas"
useGeneratedKeys=
"true"
>
...
...
@@ -295,11 +295,11 @@
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
#{device
_i
dentification,jdbcType=VARCHAR},
#{message
_i
d,jdbcType=VARCHAR},
#{device
I
dentification,jdbcType=VARCHAR},
#{message
I
d,jdbcType=VARCHAR},
#{topic,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR},
#{create
_t
ime,jdbcType=TIMESTAMP},
#{create
T
ime,jdbcType=TIMESTAMP},
#{message,jdbcType=LONGVARCHAR},
</trim>
on duplicate key update
...
...
@@ -307,11 +307,11 @@
<if
test=
"id != null"
>
id = #{id,jdbcType=BIGINT},
</if>
device_identification = #{device
_i
dentification,jdbcType=VARCHAR},
message_id = #{message
_i
d,jdbcType=VARCHAR},
device_identification = #{device
I
dentification,jdbcType=VARCHAR},
message_id = #{message
I
d,jdbcType=VARCHAR},
topic = #{topic,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{create
_t
ime,jdbcType=TIMESTAMP},
create_time = #{create
T
ime,jdbcType=TIMESTAMP},
message = #{message,jdbcType=LONGVARCHAR},
</trim>
</insert>
...
...
@@ -322,10 +322,10 @@
<if
test=
"id != null"
>
id,
</if>
<if
test=
"device
_identification != null and device_i
dentification != ''"
>
<if
test=
"device
Identification != null and deviceI
dentification != ''"
>
device_identification,
</if>
<if
test=
"message
_id != null and message_i
d != ''"
>
<if
test=
"message
Id != null and messageI
d != ''"
>
message_id,
</if>
<if
test=
"topic != null and topic != ''"
>
...
...
@@ -334,7 +334,7 @@
<if
test=
"status != null and status != ''"
>
`status`,
</if>
<if
test=
"create
_t
ime != null"
>
<if
test=
"create
T
ime != null"
>
create_time,
</if>
<if
test=
"message != null and message != ''"
>
...
...
@@ -346,11 +346,11 @@
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"device
_identification != null and device_i
dentification != ''"
>
#{device
_i
dentification,jdbcType=VARCHAR},
<if
test=
"device
Identification != null and deviceI
dentification != ''"
>
#{device
I
dentification,jdbcType=VARCHAR},
</if>
<if
test=
"message
_id != null and message_i
d != ''"
>
#{message
_i
d,jdbcType=VARCHAR},
<if
test=
"message
Id != null and messageI
d != ''"
>
#{message
I
d,jdbcType=VARCHAR},
</if>
<if
test=
"topic != null and topic != ''"
>
#{topic,jdbcType=VARCHAR},
...
...
@@ -358,8 +358,8 @@
<if
test=
"status != null and status != ''"
>
#{status,jdbcType=VARCHAR},
</if>
<if
test=
"create
_t
ime != null"
>
#{create
_t
ime,jdbcType=TIMESTAMP},
<if
test=
"create
T
ime != null"
>
#{create
T
ime,jdbcType=TIMESTAMP},
</if>
<if
test=
"message != null and message != ''"
>
#{message,jdbcType=LONGVARCHAR},
...
...
@@ -370,11 +370,11 @@
<if
test=
"id != null"
>
id = #{id,jdbcType=BIGINT},
</if>
<if
test=
"device
_identification != null and device_i
dentification != ''"
>
device_identification = #{device
_i
dentification,jdbcType=VARCHAR},
<if
test=
"device
Identification != null and deviceI
dentification != ''"
>
device_identification = #{device
I
dentification,jdbcType=VARCHAR},
</if>
<if
test=
"message
_id != null and message_i
d != ''"
>
message_id = #{message
_i
d,jdbcType=VARCHAR},
<if
test=
"message
Id != null and messageI
d != ''"
>
message_id = #{message
I
d,jdbcType=VARCHAR},
</if>
<if
test=
"topic != null and topic != ''"
>
topic = #{topic,jdbcType=VARCHAR},
...
...
@@ -382,8 +382,8 @@
<if
test=
"status != null and status != ''"
>
`status` = #{status,jdbcType=VARCHAR},
</if>
<if
test=
"create
_t
ime != null"
>
create_time = #{create
_t
ime,jdbcType=TIMESTAMP},
<if
test=
"create
T
ime != null"
>
create_time = #{create
T
ime,jdbcType=TIMESTAMP},
</if>
<if
test=
"message != null and message != ''"
>
message = #{message,jdbcType=LONGVARCHAR},
...
...
thinglinks-ui/src/views/link/device/index.vue
浏览文件 @
0fe25e09
...
...
@@ -10,9 +10,9 @@
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"设备标识"
prop=
"deviceId"
>
<el-form-item
label=
"设备标识"
prop=
"deviceId
entification
"
>
<el-input
v-model=
"queryParams.deviceId"
v-model=
"queryParams.deviceId
entification
"
placeholder=
"请输入设备标识"
clearable
size=
"small"
...
...
@@ -166,7 +166,7 @@
<dict-tag
:options=
"dict.type.link_device_auth_mode"
:value=
"scope.row.authMode"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"设备标识"
align=
"center"
prop=
"deviceId"
/>
<el-table-column
label=
"设备标识"
align=
"center"
prop=
"deviceId
entification
"
/>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"deviceName"
/>
<el-table-column
label=
"连接实例"
align=
"center"
prop=
"connector"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -281,8 +281,8 @@
<
el
-
row
>
<
el
-
col
:
span
=
"
11
"
>
<
el
-
form
-
item
label
=
"
设备标识
"
prop
=
"
deviceId
"
>
<
el
-
input
v
-
model
=
"
form.deviceId
"
placeholder
=
"
请输入设备标识
"
/>
<
el
-
form
-
item
label
=
"
设备标识
"
prop
=
"
deviceId
entification
"
>
<
el
-
input
v
-
model
=
"
form.deviceId
entification
"
placeholder
=
"
请输入设备标识
"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"
11
"
>
...
...
@@ -462,7 +462,7 @@ export default {
pageNum
:
1
,
pageSize
:
10
,
clientId
:
null
,
deviceId
:
null
,
deviceId
entification
:
null
,
deviceName
:
null
,
connector
:
null
,
deviceStatus
:
null
,
...
...
@@ -493,7 +493,7 @@ export default {
authMode
:
[
{
required
:
true
,
message
:
"
认证方式不能为空
"
,
trigger
:
"
change
"
}
],
deviceId
:
[
deviceId
entification
:
[
{
required
:
true
,
message
:
"
设备标识不能为空
"
,
trigger
:
"
blur
"
}
],
deviceName
:
[
...
...
@@ -579,7 +579,7 @@ export default {
userName
:
null
,
password
:
null
,
authMode
:
null
,
deviceId
:
null
,
deviceId
entification
:
null
,
deviceName
:
null
,
latitude
:
null
,
longitude
:
null
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录