feat: 【IoT 物联网】新增简单类型处理器配置和处理器,优化 JSON 解析问题(移除,已经解决)

This commit is contained in:
YunaiV
2025-10-01 15:51:52 +08:00
parent 98f9e44b24
commit 3f83569edc
3 changed files with 2 additions and 81 deletions

View File

@@ -66,20 +66,13 @@
DESCRIBE product_property_${productId}
</select>
<resultMap id="IotDevicePropertyRespVOMap"
type="cn.iocoder.yudao.module.iot.controller.admin.device.vo.property.IotDevicePropertyRespVO">
<result property="value" column="value"
typeHandler="cn.iocoder.yudao.module.iot.framework.mybatis.handler.SimpleObjectTypeHandler"/>
<result property="updateTime" column="update_time" javaType="java.lang.Long"/>
</resultMap>
<select id="selectListByHistory"
resultMap="IotDevicePropertyRespVOMap">
resultType="cn.iocoder.yudao.module.iot.controller.admin.device.vo.property.IotDevicePropertyRespVO">
SELECT ${@cn.hutool.core.util.StrUtil@toUnderlineCase(reqVO.identifier)} AS `value`, ts AS update_time
FROM device_property_${reqVO.deviceId}
WHERE ${@cn.hutool.core.util.StrUtil@toUnderlineCase(reqVO.identifier)} IS NOT NULL
AND ts BETWEEN ${@cn.hutool.core.date.LocalDateTimeUtil@toEpochMilli(reqVO.times[0])}
AND ${@cn.hutool.core.date.LocalDateTimeUtil@toEpochMilli(reqVO.times[1])}
AND ${@cn.hutool.core.date.LocalDateTimeUtil@toEpochMilli(reqVO.times[1])}
ORDER BY ts DESC
</select>