30 lines
1008 B

3 years ago
package com.dji.sample.control.controller;
import com.dji.sample.common.model.ResponseResult;
2 years ago
import com.dji.sample.control.model.param.RemoteDebugParam;
3 years ago
import com.dji.sample.control.service.IControlService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
2 years ago
import org.springframework.web.bind.annotation.*;
3 years ago
/**
* @author sean
* @version 1.2
* @date 2022/7/29
*/
@RestController
@Slf4j
@RequestMapping("${url.control.prefix}${url.control.version}/devices")
public class DockController {
@Autowired
private IControlService controlService;
@PostMapping("/{sn}/jobs/{service_identifier}")
public ResponseResult createControlJob(@PathVariable String sn,
2 years ago
@PathVariable("service_identifier") String serviceIdentifier,
@RequestBody(required = false) RemoteDebugParam param) {
return controlService.controlDock(sn, serviceIdentifier, param);
3 years ago
}
}