Commit 6fdd91d01eb3ad619854be795a9f25a1d5e08f56
1 parent
ca014bdb
feat: 【IoT 物联网】新增网关设备 ID 字段到 IotDevicePageReqVO,支持网关子设备的功能
Showing
2 changed files
with
4 additions
and
0 deletions
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/device/vo/device/IotDevicePageReqVO.java
| @@ -31,4 +31,7 @@ public class IotDevicePageReqVO extends PageParam { | @@ -31,4 +31,7 @@ public class IotDevicePageReqVO extends PageParam { | ||
| 31 | @Schema(description = "设备分组编号", example = "1024") | 31 | @Schema(description = "设备分组编号", example = "1024") |
| 32 | private Long groupId; | 32 | private Long groupId; |
| 33 | 33 | ||
| 34 | + @Schema(description = "网关设备 ID", example = "16380") | ||
| 35 | + private Long gatewayId; | ||
| 36 | + | ||
| 34 | } | 37 | } |
| 35 | \ No newline at end of file | 38 | \ No newline at end of file |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/dal/mysql/device/IotDeviceMapper.java
| @@ -31,6 +31,7 @@ public interface IotDeviceMapper extends BaseMapperX<IotDeviceDO> { | @@ -31,6 +31,7 @@ public interface IotDeviceMapper extends BaseMapperX<IotDeviceDO> { | ||
| 31 | .eqIfPresent(IotDeviceDO::getDeviceType, reqVO.getDeviceType()) | 31 | .eqIfPresent(IotDeviceDO::getDeviceType, reqVO.getDeviceType()) |
| 32 | .likeIfPresent(IotDeviceDO::getNickname, reqVO.getNickname()) | 32 | .likeIfPresent(IotDeviceDO::getNickname, reqVO.getNickname()) |
| 33 | .eqIfPresent(IotDeviceDO::getState, reqVO.getStatus()) | 33 | .eqIfPresent(IotDeviceDO::getState, reqVO.getStatus()) |
| 34 | + .eqIfPresent(IotDeviceDO::getGatewayId, reqVO.getGatewayId()) | ||
| 34 | .apply(ObjectUtil.isNotNull(reqVO.getGroupId()), "FIND_IN_SET(" + reqVO.getGroupId() + ",group_ids) > 0") | 35 | .apply(ObjectUtil.isNotNull(reqVO.getGroupId()), "FIND_IN_SET(" + reqVO.getGroupId() + ",group_ids) > 0") |
| 35 | .orderByDesc(IotDeviceDO::getId)); | 36 | .orderByDesc(IotDeviceDO::getId)); |
| 36 | } | 37 | } |