3 changed files with 101 additions and 0 deletions
@ -0,0 +1,57 @@ |
|||
package org.dromara.sample.manage.controller; |
|||
|
|||
|
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.dromara.common.sdk.cloudapi.device.OsdDockDrone; |
|||
import org.dromara.common.sdk.common.HttpResultResponse; |
|||
import org.dromara.sample.manage.model.dto.DeviceDTO; |
|||
import org.dromara.sample.manage.service.IDeviceRedisService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 无人机redis查询服务 |
|||
*/ |
|||
@RestController |
|||
@Slf4j |
|||
@RequestMapping("${url.manage.prefix}${url.manage.version}/redis") |
|||
@Tag(name = "无人机redis查询服务") |
|||
public class DeviceRedisController { |
|||
|
|||
|
|||
@Autowired |
|||
private IDeviceRedisService deviceRedisService; |
|||
|
|||
|
|||
/** |
|||
* 获取设备的基本信息 |
|||
* |
|||
* @return |
|||
*/ |
|||
@PostMapping("/device/info") |
|||
@Operation(summary = "获取设备的基本信息", description = "获取设备的基本信息") |
|||
public HttpResultResponse<List<DeviceDTO>> getDevicesInfo(@RequestBody List<String> snList) { |
|||
return HttpResultResponse.success(deviceRedisService.getDevicesInfo(snList)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 获取设备osd实时数据 |
|||
* sudo systemctl restart docker |
|||
* sudo systemctl daemon-reload |
|||
* @return |
|||
*/ |
|||
@PostMapping("/device/osd/info") |
|||
@Operation(summary = "获取设备osd实时数据", description = "获取设备osd实时数据") |
|||
public HttpResultResponse<List<OsdDockDrone>> getDevicesOsdInfo(@RequestBody List<String> snList) { |
|||
return HttpResultResponse.success(deviceRedisService.getDevicesOsdInfo(snList)); |
|||
} |
|||
|
|||
} |
Loading…
Reference in new issue