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 | 31 | @Schema(description = "设备分组编号", example = "1024") |
| 32 | 32 | private Long groupId; |
| 33 | 33 | |
| 34 | + @Schema(description = "网关设备 ID", example = "16380") | |
| 35 | + private Long gatewayId; | |
| 36 | + | |
| 34 | 37 | } |
| 35 | 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 | 31 | .eqIfPresent(IotDeviceDO::getDeviceType, reqVO.getDeviceType()) |
| 32 | 32 | .likeIfPresent(IotDeviceDO::getNickname, reqVO.getNickname()) |
| 33 | 33 | .eqIfPresent(IotDeviceDO::getState, reqVO.getStatus()) |
| 34 | + .eqIfPresent(IotDeviceDO::getGatewayId, reqVO.getGatewayId()) | |
| 34 | 35 | .apply(ObjectUtil.isNotNull(reqVO.getGroupId()), "FIND_IN_SET(" + reqVO.getGroupId() + ",group_ids) > 0") |
| 35 | 36 | .orderByDesc(IotDeviceDO::getId)); |
| 36 | 37 | } | ... | ... |