1. 替换原始 code 签名
2. 服务与模块生成器,支持指定起始端口批量端口分配
(cherry picked from commit e99da38fd4)
This commit is contained in:
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
/**
|
||||
* IoT 设备【配置】设置 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class IotDeviceConfigSetReqDTO extends IotDeviceDownstreamAbstractReqDTO {
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Data;
|
||||
/**
|
||||
* IoT 设备下行的抽象 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public abstract class IotDeviceDownstreamAbstractReqDTO {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
/**
|
||||
* IoT 设备【OTA】升级下发 Request DTO(更新固件消息)
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class IotDeviceOtaUpgradeReqDTO extends IotDeviceDownstreamAbstractReqDTO {
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
/**
|
||||
* IoT 设备【属性】获取 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class IotDevicePropertyGetReqDTO extends IotDeviceDownstreamAbstractReqDTO {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
/**
|
||||
* IoT 设备【属性】设置 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class IotDevicePropertySetReqDTO extends IotDeviceDownstreamAbstractReqDTO {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
/**
|
||||
* IoT 设备【服务】调用 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class IotDeviceServiceInvokeReqDTO extends IotDeviceDownstreamAbstractReqDTO {
|
||||
|
||||
@@ -8,7 +8,7 @@ import lombok.Data;
|
||||
/**
|
||||
* IoT 认证 Emqx 连接 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class IotDeviceEmqxAuthReqDTO {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
/**
|
||||
* IoT 设备【事件】上报 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class IotDeviceEventReportReqDTO extends IotDeviceUpstreamAbstractReqDTO {
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Data;
|
||||
/**
|
||||
* IoT 设备【OTA】升级进度 Request DTO(上报更新固件进度)
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class IotDeviceOtaProgressReqDTO extends IotDeviceUpstreamAbstractReqDTO {
|
||||
|
||||
@@ -4,7 +4,7 @@ package cn.iocoder.yudao.module.iot.api.device.dto.control.upstream;
|
||||
/**
|
||||
* IoT 设备【OTA】升级下拉 Request DTO(拉取固件更新)
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class IotDeviceOtaPullReqDTO {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ package cn.iocoder.yudao.module.iot.api.device.dto.control.upstream;
|
||||
/**
|
||||
* IoT 设备【OTA】上报 Request DTO(上报固件版本)
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class IotDeviceOtaReportReqDTO {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
/**
|
||||
* IoT 设备【属性】上报 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class IotDevicePropertyReportReqDTO extends IotDeviceUpstreamAbstractReqDTO {
|
||||
|
||||
@@ -5,7 +5,7 @@ import lombok.Data;
|
||||
/**
|
||||
* IoT 设备【注册】自己 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class IotDeviceRegisterReqDTO extends IotDeviceUpstreamAbstractReqDTO {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
/**
|
||||
* IoT 设备【注册】子设备 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class IotDeviceRegisterSubReqDTO extends IotDeviceUpstreamAbstractReqDTO {
|
||||
|
||||
@@ -8,7 +8,7 @@ import lombok.Data;
|
||||
/**
|
||||
* IoT 设备【状态】更新 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class IotDeviceStateUpdateReqDTO extends IotDeviceUpstreamAbstractReqDTO {
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* IoT 设备上行的抽象 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public abstract class IotDeviceUpstreamAbstractReqDTO {
|
||||
|
||||
@@ -7,7 +7,7 @@ import lombok.Data;
|
||||
/**
|
||||
* IoT 插件实例心跳 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class IotPluginInstanceHeartbeatReqDTO {
|
||||
|
||||
@@ -5,7 +5,7 @@ import cn.iocoder.yudao.framework.common.enums.RpcConstants;
|
||||
/**
|
||||
* API 相关的枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class ApiConstants {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.iot.enums;
|
||||
/**
|
||||
* IoT 字典类型的枚举类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class DictTypeConstants {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* IoT 告警配置的接收方式枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* IoT 数据桥接的方向枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* IoT 数据桥接的类型枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* IoT 场景触发条件参数的操作符枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* IoT 场景流转的触发类型枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* IoT 数据定义的数据类型枚举类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
* 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
|
||||
* 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class IoTServerApplication {
|
||||
|
||||
@@ -9,7 +9,7 @@ import lombok.*;
|
||||
/**
|
||||
* IoT 设备分组 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName("iot_device_group")
|
||||
@KeySequence("iot_device_group_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -11,7 +11,7 @@ import lombok.*;
|
||||
*
|
||||
* @see <a href="阿里云 IoT - OTA 升级">https://help.aliyun.com/zh/iot/user-guide/ota-upgrade-overview</a>
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName(value = "iot_ota_firmware", autoResultMap = true)
|
||||
@KeySequence("iot_ota_firmware_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* IoT OTA 升级记录 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName(value = "iot_ota_upgrade_record", autoResultMap = true)
|
||||
@KeySequence("iot_ota_upgrade_record_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
/**
|
||||
* IoT OTA 升级任务 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName(value = "iot_ota_upgrade_task", autoResultMap = true)
|
||||
@KeySequence("iot_ota_upgrade_task_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -12,7 +12,7 @@ import lombok.*;
|
||||
/**
|
||||
* IoT 插件配置 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName("iot_plugin_config")
|
||||
@KeySequence("iot_plugin_config_seq")
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* IoT 插件实例 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName("iot_plugin_instance")
|
||||
@KeySequence("iot_plugin_instance_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -9,7 +9,7 @@ import lombok.*;
|
||||
/**
|
||||
* IoT 产品分类 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName("iot_product_category")
|
||||
@KeySequence("iot_product_category_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
/**
|
||||
* IoT 告警配置 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName("iot_alert_config")
|
||||
@KeySequence("iot_alert_config_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -13,7 +13,7 @@ import lombok.*;
|
||||
/**
|
||||
* IoT 告警记录 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName("iot_alert_record")
|
||||
@KeySequence("iot_alert_record_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -15,7 +15,7 @@ import lombok.*;
|
||||
/**
|
||||
* IoT 数据桥梁 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName(value = "iot_data_bridge", autoResultMap = true)
|
||||
@KeySequence("iot_data_bridge_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.Map;
|
||||
/**
|
||||
* IoT 规则场景(场景联动) DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName("iot_rule_scene")
|
||||
@KeySequence("iot_rule_scene_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -21,7 +21,7 @@ import lombok.NoArgsConstructor;
|
||||
* <p>
|
||||
* 每个 {@link IotProductDO} 和 {@link IotThingModelDO} 是“一对多”的关系,它的每个属性、事件、服务都对应一条记录
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName(value = "iot_thing_model", autoResultMap = true)
|
||||
@KeySequence("iot_thing_model_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
/**
|
||||
* IoT 设备分组 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Mapper
|
||||
public interface IotDeviceGroupMapper extends BaseMapperX<IotDeviceGroupDO> {
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.Map;
|
||||
/**
|
||||
* IoT 设备 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Mapper
|
||||
public interface IotDeviceMapper extends BaseMapperX<IotDeviceDO> {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
/**
|
||||
* IoT 产品分类 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Mapper
|
||||
public interface IotProductCategoryMapper extends BaseMapperX<IotProductCategoryDO> {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
/**
|
||||
* IoT 产品物模型 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Mapper
|
||||
public interface IotThingModelMapper extends BaseMapperX<IotThingModelDO> {
|
||||
|
||||
@@ -6,7 +6,7 @@ import cn.iocoder.yudao.module.iot.dal.dataobject.plugin.IotPluginInstanceDO;
|
||||
/**
|
||||
* IoT Redis Key 枚举类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface RedisKeyConstants {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.Set;
|
||||
/**
|
||||
* 设备的最后上报时间的 Redis DAO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Repository
|
||||
public class DeviceReportTimeRedisDAO {
|
||||
|
||||
@@ -10,7 +10,7 @@ import javax.sql.DataSource;
|
||||
/**
|
||||
* IoT 模块的 Job 自动配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Configuration
|
||||
public class IotJobConfiguration {
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.Properties;
|
||||
* 疑问:为什么 IoT 模块不复用全局的 SchedulerManager 呢?
|
||||
* 回复:yudao-cloud 项目,使用的是 XXL-Job 作为调度中心,无法动态添加任务。
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Slf4j
|
||||
public class IotSchedulerManager {
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.lang.annotation.*;
|
||||
/**
|
||||
* TDEngine 数据源
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Target({ElementType.TYPE, ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.Set;
|
||||
*
|
||||
* 检测逻辑:设备最后一条 {@link cn.iocoder.yudao.module.iot.mq.message.IotDeviceMessage} 消息超过一定时间,则认为设备离线
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
public class IotDeviceOfflineCheckJob {
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* IoT 插件实例离线检查 Job
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
public class IotPluginInstancesJob {
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.Map;
|
||||
/**
|
||||
* IoT 规则场景 Job,用于执行 {@link IotRuleSceneTriggerTypeEnum#TIMER} 类型的规则场景
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Slf4j
|
||||
public class IotRuleSceneJob extends QuartzJobBean {
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
|
||||
/**
|
||||
* 针对 {@link IotDeviceMessage} 的消费者,记录设备日志
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Objects;
|
||||
*
|
||||
* 注意:只有设备上行消息,才会触发该逻辑
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
|
||||
/**
|
||||
* 针对 {@link IotDeviceMessage} 的消费者,处理规则场景
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
|
||||
@@ -16,7 +16,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
|
||||
/**
|
||||
* IoT 设备分组 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface IotDeviceGroupService {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import static cn.iocoder.yudao.module.iot.enums.ErrorCodeConstants.DEVICE_GROUP_
|
||||
/**
|
||||
* IoT 设备分组 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.Map;
|
||||
/**
|
||||
* IoT 设备 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface IotDeviceService {
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ import static cn.iocoder.yudao.module.iot.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* IoT 设备 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -9,7 +9,7 @@ import jakarta.validation.Valid;
|
||||
*
|
||||
* 目的:服务端 -> 插件 -> 设备
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface IotDeviceDownstreamService {
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import static cn.iocoder.yudao.module.iot.enums.ErrorCodeConstants.DEVICE_DOWNST
|
||||
/**
|
||||
* IoT 设备下行 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -9,7 +9,7 @@ import jakarta.validation.Valid;
|
||||
*
|
||||
* 目的:设备 -> 插件 -> 服务端
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface IotDeviceUpstreamService {
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import java.util.Objects;
|
||||
/**
|
||||
* IoT 设备上行 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.Set;
|
||||
/**
|
||||
* IoT 设备【属性】数据 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface IotDevicePropertyService {
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
|
||||
/**
|
||||
* IoT 设备【属性】数据 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* IoT 插件实例 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface IotPluginInstanceService {
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU
|
||||
/**
|
||||
* IoT 插件实例 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -17,7 +17,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
|
||||
/**
|
||||
* IoT 产品分类 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface IotProductCategoryService {
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import static cn.iocoder.yudao.module.iot.enums.ErrorCodeConstants.PRODUCT_CATEG
|
||||
/**
|
||||
* IoT 产品分类 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* IoT 规则场景 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface IotRuleSceneService {
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
|
||||
/**
|
||||
* IoT 规则场景 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -9,7 +9,7 @@ import javax.annotation.Nullable;
|
||||
/**
|
||||
* IoT 规则场景的场景执行器接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface IotRuleSceneAction {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import javax.annotation.Nullable;
|
||||
/**
|
||||
* IoT 告警的 {@link IotRuleSceneAction} 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
public class IotRuleSceneAlertAction implements IotRuleSceneAction {
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.List;
|
||||
/**
|
||||
* IoT 数据桥梁的 {@link IotRuleSceneAction} 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.springframework.stereotype.Component;
|
||||
/**
|
||||
* IoT 设备控制的 {@link IotRuleSceneAction} 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
/**
|
||||
* IoT 产品物模型 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface IotThingModelService {
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import static cn.iocoder.yudao.module.iot.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* IoT 产品物模型 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -8,7 +8,7 @@ import cn.iocoder.yudao.module.iot.api.device.dto.control.downstream.*;
|
||||
*
|
||||
* 目的:每个 plugin 需要实现,用于处理 server 下行的指令(请求),从而实现从 server => plugin => device 的下行流程
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface IotDeviceDownstreamHandler {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
/**
|
||||
* IoT 设备下行服务端,接收来自 server 服务器的请求,转发给 device 设备
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Slf4j
|
||||
public class IotDeviceDownstreamServer {
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.http.MediaType;
|
||||
/**
|
||||
* IoT 插件的通用工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class IotPluginCommonUtils {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
/**
|
||||
* 物联网插件 - EMQX 配置
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "yudao.iot.plugin.emqx")
|
||||
@Validated
|
||||
|
||||
@@ -18,7 +18,7 @@ import static cn.iocoder.yudao.module.iot.enums.ErrorCodeConstants.MQTT_TOPIC_IL
|
||||
/**
|
||||
* EMQX 插件的 {@link IotDeviceDownstreamHandler} 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Slf4j
|
||||
public class IotDeviceDownstreamHandlerImpl implements IotDeviceDownstreamHandler {
|
||||
|
||||
@@ -12,7 +12,7 @@ import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeC
|
||||
* 但是:由于设备通过 HTTP 短链接接入,导致其实无法下行指导给 device 设备,所以基本都是直接返回失败!!!
|
||||
* 类似 MQTT、WebSocket、TCP 插件,是可以实现下行指令的。
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class IotDeviceDownstreamHandlerImpl implements IotDeviceDownstreamHandler {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user