Browse Source

新增云盒服务回调接口

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
5dd5c25ee8
3 changed files with 40 additions and 15 deletions
  1. +0
    -13
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/FlightDataController.java
  2. +39
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/callback/CloudBoxCallbackoxController.java
  3. +1
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/callback/PilotCallbackController.java

+ 0
- 13
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/FlightDataController.java View File

@@ -30,17 +30,4 @@ public class FlightDataController {
return flightDataService.getFlightDataList(flightDataQuery);
}

/**
* 飞行遥测数据入库
* @param entity
* @return
*/
@PostMapping("/addCallback")
public OperationEnum addCallback(@RequestBody FlightData entity){
flightDataService.addCallback(entity);
return OperationEnum.OPERATION_SUCCESS;
}



}

+ 39
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/callback/CloudBoxCallbackoxController.java View File

@@ -0,0 +1,39 @@
package com.tuoheng.admin.controller.callback;

import com.tuoheng.admin.entity.FlightData;
import com.tuoheng.admin.service.IFlightDataService;
import com.tuoheng.common.core.common.OperationEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* <p>
* 云盒遥测数据表 前端控制器
* </p>
*
* @author 拓恒
* @since 2021-09-18
*/
@RestController
@RequestMapping("/cloudbox")
public class CloudBoxCallbackoxController {

@Autowired
private IFlightDataService flightDataService;

/**
* 飞行遥测数据入库
*
* @param entity
* @return
*/
@PostMapping("/callback")
public OperationEnum addCallback(@RequestBody FlightData entity) {
flightDataService.addCallback(entity);
return OperationEnum.OPERATION_SUCCESS;
}

}

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/callback/PilotCallBackController.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/callback/PilotCallbackController.java View File

@@ -3,7 +3,6 @@ package com.tuoheng.admin.controller.callback;
import com.tuoheng.admin.request.inspection.UpdateTaskByCodeRequest;
import com.tuoheng.admin.request.inspection.UploadFlightUrlRequest;
import com.tuoheng.admin.service.inspection.IInspectionService;
import com.tuoheng.common.core.common.OperationEnum;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -22,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("/pilot/callback")
public class PilotCallBackController {
public class PilotCallbackController {

@Autowired
private IInspectionService iInspectionService;

Loading…
Cancel
Save