feat:【IoT 物联网】新增设备信息查询功能,优化 MQTT 消息处理逻辑

This commit is contained in:
haohao
2025-06-10 10:21:24 +08:00
parent 800a85f7bc
commit 4ea6e08f99
16 changed files with 759 additions and 182 deletions

View File

@@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.iot.core.biz;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.iot.core.biz.dto.IotDeviceAuthReqDTO;
import cn.iocoder.yudao.module.iot.core.biz.dto.IotDeviceInfoReqDTO;
import cn.iocoder.yudao.module.iot.core.biz.dto.IotDeviceInfoRespDTO;
/**
* IoT 设备通用 API
@@ -10,6 +12,20 @@ import cn.iocoder.yudao.module.iot.core.biz.dto.IotDeviceAuthReqDTO;
*/
public interface IotDeviceCommonApi {
/**
* 设备认证
*
* @param authReqDTO 认证请求
* @return 认证结果
*/
CommonResult<Boolean> authDevice(IotDeviceAuthReqDTO authReqDTO);
/**
* 获取设备信息
*
* @param infoReqDTO 设备信息请求
* @return 设备信息
*/
CommonResult<IotDeviceInfoRespDTO> getDeviceInfo(IotDeviceInfoReqDTO infoReqDTO);
}

View File

@@ -0,0 +1,26 @@
package cn.iocoder.yudao.module.iot.core.biz.dto;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
/**
* IoT 设备信息查询 Request DTO
*
* @author 芋道源码
*/
@Data
public class IotDeviceInfoReqDTO {
/**
* 产品标识
*/
@NotBlank(message = "产品标识不能为空")
private String productKey;
/**
* 设备名称
*/
@NotBlank(message = "设备名称不能为空")
private String deviceName;
}

View File

@@ -0,0 +1,38 @@
package cn.iocoder.yudao.module.iot.core.biz.dto;
import lombok.Data;
/**
* IoT 设备信息 Response DTO
*
* @author 芋道源码
*/
@Data
public class IotDeviceInfoRespDTO {
/**
* 设备编号
*/
private Long deviceId;
/**
* 产品标识
*/
private String productKey;
/**
* 设备名称
*/
private String deviceName;
/**
* 设备密钥
*/
private String deviceKey;
/**
* 租户编号
*/
private Long tenantId;
}