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

This commit is contained in:
haohao
2025-09-22 23:10:26 +08:00
parent 5ae0224b55
commit 341e72c0b1
5 changed files with 93 additions and 9 deletions

View File

@@ -66,8 +66,15 @@
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"
resultType="cn.iocoder.yudao.module.iot.controller.admin.device.vo.property.IotDevicePropertyRespVO">
resultMap="IotDevicePropertyRespVOMap">
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