| | |
| | | @Valid @RequestBody DeviceStatusUpdateRequest request) { |
| | | try { |
| | | boolean success = deviceStatusService.updateDeviceOnlineStatus( |
| | | request.getDeviceId(), |
| | | request.getId(), |
| | | request.getStatus() |
| | | ); |
| | | if (success) { |
| | |
| | | public static class DeviceStatusUpdateRequest { |
| | | @NotNull(message = "设备ID不能为空") |
| | | @ApiParam(value = "设备配置ID", required = true) |
| | | private Long deviceId; |
| | | private Long id; |
| | | |
| | | @NotEmpty(message = "设备状态不能为空") |
| | | @ApiParam(value = "设备状态(ONLINE/OFFLINE/BUSY/ERROR/MAINTENANCE)", required = true) |
| | |
| | | @Data |
| | | public static class DeviceHeartbeatRequest { |
| | | @NotEmpty(message = "设备ID不能为空") |
| | | @ApiParam(value = "设备ID(device_config.device_id)", required = true) |
| | | @ApiParam(value = "设备ID(DeviceConfig.id的字符串形式,对应device_status.device_id)", required = true) |
| | | private String deviceId; |
| | | |
| | | @ApiParam(value = "设备状态(可选,默认为ONLINE)") |