| | |
| | | // public ResponseResult resgitePort(@RequestBody RegistDto param) { |
| | | // return ResponseResult.success(registService.registPort(param)); |
| | | // } |
| | | @PostMapping("/authorization") |
| | | public ResponseResult checkDeviceOnline(@RequestBody String body, HttpServletRequest request) throws Exception { |
| | | String headerValue = request.getHeader("x-lc-secret"); |
| | | return registService.authorization(body, headerValue); |
| | | |
| | | } |
| | | // @PostMapping("/authorization") |
| | | // public ResponseResult checkDeviceOnline(@RequestBody String body, HttpServletRequest request) throws Exception { |
| | | // String headerValue = request.getHeader("x-lc-secret"); |
| | | // return registService.authorization(body, headerValue); |
| | | // |
| | | // } |
| | | |
| | | @PostMapping("/addDevice/{workspace_id}") |
| | | public ResponseResult registeDrone(@PathVariable(name = "workspace_id") String workspaceId) { |
| | |
| | | } |
| | | @PostMapping("/queryTaskStatus") |
| | | public ResponseResult queryTaskStatus(HttpServletRequest request, @RequestParam String taskid) throws Exception { |
| | | return ResponseResult.success(registService.queryTaskStatus(taskid)); |
| | | return registService.queryTaskStatus(taskid); |
| | | } |
| | | @GetMapping("/getResult/{taskId}") |
| | | public ResponseResult getResult(@PathVariable(name = "taskId") String taskId) { |
| | | return ResponseResult.success(registService.findDbFilesByTaskId(taskId)); |
| | | return ResponseResult.success(200, "无人机成果获取成功!",registService.findDbFilesByTaskId(taskId)); |
| | | } |
| | | |
| | | @PostMapping("/test") |
| | | public ResponseResult test(@RequestBody String param) { |
| | | return ResponseResult.success(param); |
| | | } |
| | | } |