|
|
|
package com.zhonglai.luhui.api.controller.iot;
|
|
|
|
package com.zhonglai.luhui.admin.controller.iot;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.google.gson.JsonObject;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.common.utils.GsonConstructor;
|
|
|
|
import com.zhonglai.luhui.action.BaseController;
|
|
|
|
import com.zhonglai.luhui.api.controller.iot.dto.AddCamera;
|
|
|
|
import com.zhonglai.luhui.api.controller.iot.dto.HostCommand;
|
|
|
|
import com.zhonglai.luhui.api.controller.iot.dto.HostCommandFunction;
|
|
|
|
import com.zhonglai.luhui.api.controller.iot.dto.camera.StartStream;
|
|
|
|
import com.zhonglai.luhui.api.controller.iot.dto.camera.StartStreamBySerial;
|
|
|
|
import com.zhonglai.luhui.api.controller.iot.dto.camera.StopStream;
|
|
|
|
import com.zhonglai.luhui.api.service.RocketMqSendService;
|
|
|
|
import com.zhonglai.luhui.device.dto.CommandType;
|
|
|
|
import com.zhonglai.luhui.device.dto.DeviceCommand;
|
|
|
|
import com.zhonglai.luhui.device.dto.camera.*;
|
|
|
|
import com.zhonglai.luhui.device.service.impl.RocketMqSendService;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
...
|
...
|
@@ -49,7 +44,7 @@ public class ControlGkjController extends BaseController { |
|
|
|
@ApiOperation(value = "cd")
|
|
|
|
@ApiImplicitParams({
|
|
|
|
@ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "path", value = "路径", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "path", value = "路径", required = true, dataType = "String", paramType = "query"),
|
|
|
|
})
|
|
|
|
@GetMapping("/cd/{deviceId}")
|
|
|
|
public AjaxResult cd(@PathVariable String deviceId,String path) {
|
|
...
|
...
|
@@ -68,7 +63,7 @@ public class ControlGkjController extends BaseController { |
|
|
|
@ApiOperation(value = "mkdir")
|
|
|
|
@ApiImplicitParams({
|
|
|
|
@ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "name", value = "名称", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "name", value = "名称", required = true, dataType = "String", paramType = "query"),
|
|
|
|
})
|
|
|
|
@GetMapping("/mkdir/{deviceId}")
|
|
|
|
public AjaxResult mkdir(@PathVariable String deviceId,String name) {
|
|
...
|
...
|
@@ -87,7 +82,7 @@ public class ControlGkjController extends BaseController { |
|
|
|
@ApiOperation(value = "rm")
|
|
|
|
@ApiImplicitParams({
|
|
|
|
@ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "name", value = "名称", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "name", value = "名称", required = true, dataType = "String", paramType = "query"),
|
|
|
|
})
|
|
|
|
@GetMapping("/rm/{deviceId}")
|
|
|
|
public AjaxResult rm(@PathVariable String deviceId,String name) {
|
|
...
|
...
|
@@ -106,8 +101,8 @@ public class ControlGkjController extends BaseController { |
|
|
|
@ApiOperation(value = "copy")
|
|
|
|
@ApiImplicitParams({
|
|
|
|
@ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "source", value = "源", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "target", value = "目标", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "source", value = "源", required = true, dataType = "String", paramType = "query"),
|
|
|
|
@ApiImplicitParam(name = "target", value = "目标", required = true, dataType = "String", paramType = "query"),
|
|
|
|
})
|
|
|
|
@GetMapping("/copy/{deviceId}")
|
|
|
|
public AjaxResult copy(@PathVariable String deviceId,String source,String target) {
|
|
...
|
...
|
@@ -127,7 +122,7 @@ public class ControlGkjController extends BaseController { |
|
|
|
@ApiOperation(value = "mk")
|
|
|
|
@ApiImplicitParams({
|
|
|
|
@ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "name", value = "名称", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "name", value = "名称", required = true, dataType = "String", paramType = "query"),
|
|
|
|
})
|
|
|
|
@GetMapping("/mk/{deviceId}")
|
|
|
|
public AjaxResult mk(@PathVariable String deviceId,String name) {
|
|
...
|
...
|
@@ -146,8 +141,8 @@ public class ControlGkjController extends BaseController { |
|
|
|
@ApiOperation(value = "download")
|
|
|
|
@ApiImplicitParams({
|
|
|
|
@ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "url", value = "url", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "name", value = "名称", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "url", value = "url", required = true, dataType = "String", paramType = "query"),
|
|
|
|
@ApiImplicitParam(name = "name", value = "名称", required = true, dataType = "String", paramType = "query"),
|
|
|
|
})
|
|
|
|
@GetMapping("/download/{deviceId}")
|
|
|
|
public AjaxResult download(@PathVariable String deviceId,String url,String name) {
|
|
...
|
...
|
@@ -167,8 +162,8 @@ public class ControlGkjController extends BaseController { |
|
|
|
@ApiOperation(value = "upload")
|
|
|
|
@ApiImplicitParams({
|
|
|
|
@ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "url", value = "url", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "name", value = "名称", required = true, dataType = "String", paramType = "path"),
|
|
|
|
@ApiImplicitParam(name = "url", value = "url", required = true, dataType = "String", paramType = "query"),
|
|
|
|
@ApiImplicitParam(name = "name", value = "名称", required = true, dataType = "String", paramType = "query"),
|
|
|
|
})
|
|
|
|
@GetMapping("/upload/{deviceId}")
|
|
|
|
public AjaxResult upload(@PathVariable String deviceId,String url,String name) {
|
...
|
...
|
|