Commit e765099a3304ca2fef5d89559f4240568d7ed7bd
1 parent
b4013e9a
refactor(iot): 删除 3 个不再使用的枚举
Showing
3 changed files
with
0 additions
and
120 deletions
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/enums/device/IotDeviceMessageIdentifierEnum.java deleted
| 1 | -package cn.iocoder.yudao.module.iot.enums.device; | |
| 2 | - | |
| 3 | -import lombok.Getter; | |
| 4 | -import lombok.RequiredArgsConstructor; | |
| 5 | - | |
| 6 | -// TODO @芋艿:需要添加对应的 DTO,以及上下行的链路,网关、网关服务、设备等 | |
| 7 | -/** | |
| 8 | - * IoT 设备消息标识符枚举 | |
| 9 | - */ | |
| 10 | -@Deprecated | |
| 11 | -@Getter | |
| 12 | -@RequiredArgsConstructor | |
| 13 | -public enum IotDeviceMessageIdentifierEnum { | |
| 14 | - | |
| 15 | - PROPERTY_GET("get"), // 下行 | |
| 16 | - PROPERTY_SET("set"), // 下行 | |
| 17 | - PROPERTY_REPORT("report"), // 上行 | |
| 18 | - | |
| 19 | - STATE_ONLINE("online"), // 上行 | |
| 20 | - STATE_OFFLINE("offline"), // 上行 | |
| 21 | - | |
| 22 | - CONFIG_GET("get"), // 上行 TODO 芋艿:【讨论】暂时没有上行的场景 | |
| 23 | - CONFIG_SET("set"), // 下行 | |
| 24 | - | |
| 25 | - SERVICE_INVOKE("${identifier}"), // 下行 | |
| 26 | - SERVICE_REPLY_SUFFIX("_reply"), // 芋艿:TODO 芋艿:【讨论】上行 or 下行 | |
| 27 | - | |
| 28 | - OTA_UPGRADE("upgrade"), // 下行 | |
| 29 | - OTA_PULL("pull"), // 上行 | |
| 30 | - OTA_PROGRESS("progress"), // 上行 | |
| 31 | - OTA_REPORT("report"), // 上行 | |
| 32 | - | |
| 33 | - REGISTER_REGISTER("register"), // 上行 | |
| 34 | - REGISTER_REGISTER_SUB("register_sub"), // 上行 | |
| 35 | - REGISTER_UNREGISTER_SUB("unregister_sub"), // 下行 | |
| 36 | - | |
| 37 | - TOPOLOGY_ADD("topology_add"), // 下行; | |
| 38 | - ; | |
| 39 | - | |
| 40 | - /** | |
| 41 | - * 标志符 | |
| 42 | - */ | |
| 43 | - private final String identifier; | |
| 44 | - | |
| 45 | -} | |
| 46 | 0 | \ No newline at end of file |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/enums/device/IotDeviceMessageTypeEnum.java deleted
| 1 | -package cn.iocoder.yudao.module.iot.enums.device; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.core.ArrayValuable; | |
| 4 | -import lombok.Getter; | |
| 5 | -import lombok.RequiredArgsConstructor; | |
| 6 | - | |
| 7 | -import java.util.Arrays; | |
| 8 | - | |
| 9 | -/** | |
| 10 | - * IoT 设备消息类型枚举 | |
| 11 | - */ | |
| 12 | -@Deprecated | |
| 13 | -@Getter | |
| 14 | -@RequiredArgsConstructor | |
| 15 | -public enum IotDeviceMessageTypeEnum implements ArrayValuable<String> { | |
| 16 | - | |
| 17 | - STATE("state"), // 设备状态 | |
| 18 | - PROPERTY("property"), // 设备属性:可参考 https://help.aliyun.com/zh/iot/user-guide/device-properties-events-and-services 设备属性、事件、服务 | |
| 19 | - EVENT("event"), // 设备事件:可参考 https://help.aliyun.com/zh/iot/user-guide/device-properties-events-and-services 设备属性、事件、服务 | |
| 20 | - SERVICE("service"), // 设备服务:可参考 https://help.aliyun.com/zh/iot/user-guide/device-properties-events-and-services 设备属性、事件、服务 | |
| 21 | - CONFIG("config"), // 设备配置:可参考 https://help.aliyun.com/zh/iot/user-guide/remote-configuration-1 远程配置 | |
| 22 | - OTA("ota"), // 设备 OTA:可参考 https://help.aliyun.com/zh/iot/user-guide/ota-update OTA 升级 | |
| 23 | - REGISTER("register"), // 设备注册:可参考 https://help.aliyun.com/zh/iot/user-guide/register-devices 设备身份注册 | |
| 24 | - TOPOLOGY("topology"),; // 设备拓扑:可参考 https://help.aliyun.com/zh/iot/user-guide/manage-topological-relationships 设备拓扑 | |
| 25 | - | |
| 26 | - public static final String[] ARRAYS = Arrays.stream(values()).map(IotDeviceMessageTypeEnum::getType).toArray(String[]::new); | |
| 27 | - | |
| 28 | - /** | |
| 29 | - * 属性 | |
| 30 | - */ | |
| 31 | - private final String type; | |
| 32 | - | |
| 33 | - @Override | |
| 34 | - public String[] array() { | |
| 35 | - return ARRAYS; | |
| 36 | - } | |
| 37 | - | |
| 38 | -} |
yudao-module-iot/yudao-module-iot-core/src/main/java/cn/iocoder/yudao/module/iot/core/enums/IotDeviceMessageTypeEnum.java deleted
| 1 | -package cn.iocoder.yudao.module.iot.core.enums; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.core.ArrayValuable; | |
| 4 | -import lombok.Getter; | |
| 5 | -import lombok.RequiredArgsConstructor; | |
| 6 | - | |
| 7 | -import java.util.Arrays; | |
| 8 | - | |
| 9 | -/** | |
| 10 | - * IoT 设备消息类型枚举 | |
| 11 | - */ | |
| 12 | -@Getter | |
| 13 | -@RequiredArgsConstructor | |
| 14 | -public enum IotDeviceMessageTypeEnum implements ArrayValuable<String> { | |
| 15 | - | |
| 16 | - STATE("state"), // 设备状态 | |
| 17 | -// PROPERTY("property"), // 设备属性:可参考 https://help.aliyun.com/zh/iot/user-guide/device-properties-events-and-services 设备属性、事件、服务 | |
| 18 | - EVENT("event"), // 设备事件:可参考 https://help.aliyun.com/zh/iot/user-guide/device-properties-events-and-services 设备属性、事件、服务 | |
| 19 | - SERVICE("service"), // 设备服务:可参考 https://help.aliyun.com/zh/iot/user-guide/device-properties-events-and-services 设备属性、事件、服务 | |
| 20 | - CONFIG("config"), // 设备配置:可参考 https://help.aliyun.com/zh/iot/user-guide/remote-configuration-1 远程配置 | |
| 21 | - OTA("ota"), // 设备 OTA:可参考 https://help.aliyun.com/zh/iot/user-guide/ota-update OTA 升级 | |
| 22 | - REGISTER("register"), // 设备注册:可参考 https://help.aliyun.com/zh/iot/user-guide/register-devices 设备身份注册 | |
| 23 | - TOPOLOGY("topology"),; // 设备拓扑:可参考 https://help.aliyun.com/zh/iot/user-guide/manage-topological-relationships 设备拓扑 | |
| 24 | - | |
| 25 | - public static final String[] ARRAYS = Arrays.stream(values()).map(IotDeviceMessageTypeEnum::getType).toArray(String[]::new); | |
| 26 | - | |
| 27 | - /** | |
| 28 | - * 属性 | |
| 29 | - */ | |
| 30 | - private final String type; | |
| 31 | - | |
| 32 | - @Override | |
| 33 | - public String[] array() { | |
| 34 | - return ARRAYS; | |
| 35 | - } | |
| 36 | - | |
| 37 | -} |