|
|
@ -37,14 +37,16 @@ |
|
|
<!-- 3. 标签 --> |
|
|
<!-- 3. 标签 --> |
|
|
TAGS(#{log.sn}, #{log.tenantId}) |
|
|
TAGS(#{log.sn}, #{log.tenantId}) |
|
|
|
|
|
|
|
|
|
|
|
(ts,battery,value,longitude,latitude,name,boot_seconds,signal_str,mem_bytes) |
|
|
|
|
|
|
|
|
VALUES |
|
|
VALUES |
|
|
(#{log.ts}, #{log.battery}, #{log.value}, #{log.longitude}, #{log.latitude}, #{log.name}) |
|
|
|
|
|
|
|
|
(#{log.ts}, #{log.battery}, #{log.value}, #{log.longitude}, #{log.latitude}, #{log.name}, #{log.boot}, #{log.sig},#{log.mem}) |
|
|
</foreach> |
|
|
</foreach> |
|
|
</insert> |
|
|
</insert> |
|
|
|
|
|
|
|
|
<select id="selectPage" resultType="cn.iocoder.yudao.module.hand.vo.TdengineDataVo"> |
|
|
<select id="selectPage" resultType="cn.iocoder.yudao.module.hand.vo.TdengineDataVo"> |
|
|
SELECT |
|
|
SELECT |
|
|
ts, sn, battery, `value`, longitude, latitude, `name`,tenantId |
|
|
|
|
|
|
|
|
ts, sn, battery, `value`, longitude, latitude, `name`,boot_seconds as boot,signal_str as sig,mem_bytes as mem,tenantId |
|
|
FROM |
|
|
FROM |
|
|
device_data_log |
|
|
device_data_log |
|
|
<where> |
|
|
<where> |
|
|
@ -97,7 +99,10 @@ |
|
|
LAST(`value`) as `value`, |
|
|
LAST(`value`) as `value`, |
|
|
LAST(`battery`) as `battery`, |
|
|
LAST(`battery`) as `battery`, |
|
|
LAST(longitude) as longitude, |
|
|
LAST(longitude) as longitude, |
|
|
LAST(latitude) as latitude |
|
|
|
|
|
|
|
|
LAST(latitude) as latitude, |
|
|
|
|
|
LAST(boot_seconds) as boot, |
|
|
|
|
|
LAST(signal_str) as sig, |
|
|
|
|
|
LAST(mem_bytes) as mem |
|
|
FROM |
|
|
FROM |
|
|
device_data_log |
|
|
device_data_log |
|
|
<where> |
|
|
<where> |
|
|
|