You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.0 KiB
31 lines
1.0 KiB
3 years ago
|
package com.dji.sample.control.controller;
|
||
|
|
||
|
import com.dji.sample.common.model.ResponseResult;
|
||
|
import com.dji.sample.control.service.IControlService;
|
||
|
import lombok.extern.slf4j.Slf4j;
|
||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
||
|
/**
|
||
|
* @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,
|
||
|
@PathVariable("service_identifier") String serviceIdentifier) {
|
||
|
return controlService.controlDock(sn, serviceIdentifier);
|
||
|
}
|
||
|
}
|