Browse Source

添加单独给测试使用的接口

tags/v1.1.0
qiujinyang 2 years ago
parent
commit
3c17b00d53
2 changed files with 12 additions and 0 deletions
  1. +7
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java
  2. +5
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ThInspectionServiceImpl.java

+ 7
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java View File

@@ -84,6 +84,13 @@ public class InspectionController {
@PutMapping("/mission/{id}")
@ApiOperation(value = "立即执行", notes = "立即执行")
@ApiImplicitParam(name="id",value = "巡检的Id,飞行任务里面的id")
public JsonResult executeTask(@PathVariable("id") String id) {
return inspectionService.executeTask(id,null);
}

@PutMapping("/mission/url/{id}")
@ApiOperation(value = "立即执行", notes = "立即执行")
@ApiImplicitParam(name="id",value = "巡检的Id,飞行任务里面的id")
public JsonResult executeTask(@PathVariable("id") String id,@RequestBody PushAndPullURLRequest pushAndPull) {
return inspectionService.executeTask(id,pushAndPull);
}

+ 5
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ThInspectionServiceImpl.java View File

@@ -155,6 +155,11 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper,
return JsonResult.success(jsonResult.getMsg());
}
}else{
if(ObjectUtil.isEmpty(pushAndPull)){
//如果是空,好歹给个通道
pushAndPull.setPullUrl("rtmp://live.play.t-aaron.com/live/THSAq_hd");
pushAndPull.setPushUrl("rtmp://live.push.t-aaron.com/live/THSAq");
}
MissionStatusRequest missionStatusRequest=new MissionStatusRequest();
missionStatusRequest.setId(thMission.getInspectionLine());
missionStatusRequest.setPushUrl(pushAndPull.getPushUrl());

Loading…
Cancel
Save