【同步】BOOT 和 CLOUD 的功能

This commit is contained in:
YunaiV
2025-10-02 17:51:59 +08:00
parent f02c004736
commit 96c6f184fa
21 changed files with 96 additions and 36 deletions

View File

@@ -19,7 +19,6 @@ import java.util.Arrays;
@Getter
public enum IotSceneRuleTriggerTypeEnum implements ArrayValuable<Integer> {
// TODO @芋艿:后续“对应”部分,要 @下,等包结构梳理完;
/**
* 设备上下线变更
*

View File

@@ -76,4 +76,12 @@ public interface RedisKeyConstants {
*/
String DATA_SINK = "iot:data_sink";
/**
* 场景联动规则的数据缓存,使用 Spring Cache 操作
* <p>
* KEY 格式scene_rule_list_${productId}_${deviceId}
* VALUE 数据类型String 数组(JSON),即 {@link cn.iocoder.yudao.module.iot.dal.dataobject.rule.IotSceneRuleDO} 列表
*/
String SCENE_RULE_LIST = "iot:scene_rule_list";
}

View File

@@ -72,7 +72,7 @@
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>