Browse Source

添加飞手平台回调接口日志

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
b857daedcf
1 changed files with 12 additions and 3 deletions
  1. +12
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/UpdateFlyerService.java

+ 12
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/UpdateFlyerService.java View File

@@ -57,26 +57,32 @@ public class UpdateFlyerService {
Inspection inspection = (Inspection) result.getData();

Integer status = request.getStatus();
log.info("修改任务状态和飞手信息业务接口:状态:{}", status);

// 如果任务审核未通过,状态改为待审核
if (status == TaskStatusEnum.AUDITFAILED.getCode()) {
request.setStatus(1);
}

if (status == TaskStatusEnum.INFLIGHT.getCode()) {
//开始飞行
// 开始飞行
log.info("修改任务状态和飞手信息业务接口:开始飞行");
this.updateInflight(request, inspection);
} else if (status == TaskStatusEnum.COMPLETE.getCode()) {
//飞行完成
// 飞行完成
log.info("修改任务状态和飞手信息业务接口:飞行完成");
this.updateComplete(request, inspection);
}

// 直播
if (1 == inspection.getIsLive() && status == TaskStatusEnum.INFLIGHT.getCode()) {
log.info("修改任务状态和飞手信息业务接口:直播");
onlineIdentifService.handle(request, inspection);
}

//离线
// 离线
if (2 == inspection.getIsLive() && status == TaskStatusEnum.COMPLETE.getCode()) {
log.info("修改任务状态和飞手信息业务接口:离线");
offLineCompleteService.handle(inspection);
}

@@ -85,6 +91,7 @@ public class UpdateFlyerService {
&& 4 != inspection.getAnalyseStatus()
&& 5 != inspection.getAnalyseStatus()
&& 6 != inspection.getAnalyseStatus()) {
log.info("修改任务状态和飞手信息业务接口:直播状态,飞行完成修改状态为待关闭");
onlineCompleteService.handle(inspection);
}
return JsonResult.success();
@@ -114,6 +121,7 @@ public class UpdateFlyerService {
}

private void updateInflight(UpdateTaskByCodeRequest request, Inspection inspection) {
log.info("开始飞行,修改任务状态和信息");
//直播填充盒子设备
if (1 == inspection.getIsLive()) {
inspection.setCloudBoxId(request.getCloudBoxId());
@@ -133,6 +141,7 @@ public class UpdateFlyerService {
}

private void updateComplete(UpdateTaskByCodeRequest request, Inspection inspection) {
log.info("开始完成,修改任务状态和执行结束时间");
inspection.setStatus(request.getStatus());
inspection.setExecutionEndTime(request.getFlightEndTime());
inspectionMapper.updateById(inspection);

Loading…
Cancel
Save