|
|
@@ -79,7 +79,7 @@ public class UploadFlightUrlService { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public JsonResult uploadFlightUrl(UploadFlightUrlRequest request) { |
|
|
|
log.info("进入上传离线视频业务接口"); |
|
|
|
log.info("进入上传离线视频业务接口, request:{}", request); |
|
|
|
JsonResult result = this.check(request); |
|
|
|
if (0 != result.getCode()) { |
|
|
|
log.info("上传离线视频业务接口:校验失败:{}", result.getMsg()); |
|
|
@@ -88,8 +88,7 @@ public class UploadFlightUrlService { |
|
|
|
|
|
|
|
Inspection inspection = (Inspection) result.getData(); |
|
|
|
|
|
|
|
log.info("上传离线视频业务接口, inspectionid:{}", inspection.getId()); |
|
|
|
log.info("上传离线视频业务接口, isLive:{}, analyseStatus:{}", inspection.getIsLive(), inspection.getAnalyseStatus()); |
|
|
|
log.info("上传离线视频业务接口, inspectionid:{}, isLive:{}, analyseStatus:{}", inspection.getId(), inspection.getIsLive(), inspection.getAnalyseStatus()); |
|
|
|
|
|
|
|
//修改用户直播完也可以进行分析 |
|
|
|
if (1 == inspection.getIsLive() && inspection.getAnalyseStatus() != 1) { |
|
|
@@ -142,15 +141,17 @@ public class UploadFlightUrlService { |
|
|
|
private JsonResult check(UploadFlightUrlRequest request) { |
|
|
|
if (StringUtils.isEmpty(request.getVideoUrl()) || StringUtils.isEmpty(request.getSrtUrl()) |
|
|
|
|| StringUtils.isEmpty(request.getTaskCode())) { |
|
|
|
log.info("参数为空!"); |
|
|
|
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); |
|
|
|
} |
|
|
|
|
|
|
|
Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>() |
|
|
|
.eq(Inspection::getCode, request.getTaskCode()) |
|
|
|
.eq(Inspection::getMark, MarkTypeEnum.VALID.getCode())); |
|
|
|
Optional.ofNullable(inspection).orElseThrow(() -> new ServiceException(ServiceExceptionEnum.TASK_DOES_NOT_EXIST)); |
|
|
|
|
|
|
|
return JsonResult.success(); |
|
|
|
if (ObjectUtils.isEmpty(inspection)) { |
|
|
|
log.info("巡检任务不存在!"); |
|
|
|
throw new ServiceException(ServiceExceptionEnum.TASK_DOES_NOT_EXIST); |
|
|
|
} |
|
|
|
return JsonResult.success(inspection); |
|
|
|
} |
|
|
|
|
|
|
|
private void updatInspection(UploadFlightUrlRequest request, Inspection inspection) { |