| New file |
| | |
| | | package com.dji.sample.control.controller; |
| | | |
| | | import com.dji.sample.common.model.ResponseResult; |
| | | import com.dji.sample.control.model.param.RemoteDebugParam; |
| | | import com.dji.sample.control.model.param.RequestsParam; |
| | | 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.*; |
| | | |
| | | /** |
| | | * @PROJECT_NAME: iot_drone_api |
| | | * @DESCRIPTION: |
| | | * @USER: aix |
| | | * @DATE: 2023/9/23 16:05 |
| | | */ |
| | | @RestController |
| | | @Slf4j |
| | | @RequestMapping("${url.control.prefix}${url.control.version}/requests") |
| | | public class RequestsController { |
| | | |
| | | @Autowired |
| | | private IControlService controlService; |
| | | |
| | | @GetMapping("/{sn}/requests/{service_identifier}") |
| | | public ResponseResult createControlJob(@PathVariable String sn, |
| | | @PathVariable("service_identifier") String serviceIdentifier, |
| | | @RequestBody(required = false) RequestsParam param) { |
| | | return controlService.requestsConfig(sn, serviceIdentifier, param); |
| | | } |
| | | } |