|
|
|
|
|
|
|
|
*/ |
|
|
*/ |
|
|
public JsonResult uploadFlightUrl(UploadFlightUrlRequest request) { |
|
|
public JsonResult uploadFlightUrl(UploadFlightUrlRequest request) { |
|
|
log.info("进入上传离线视频业务接口"); |
|
|
log.info("进入上传离线视频业务接口"); |
|
|
String tenantId = CurrentUserUtil.getTenantId(); |
|
|
|
|
|
JsonResult result = this.check(tenantId, request); |
|
|
|
|
|
|
|
|
JsonResult result = this.check(request); |
|
|
if (0 != result.getCode()) { |
|
|
if (0 != result.getCode()) { |
|
|
log.info("上传离线视频业务接口:校验失败:{}", result.getMsg()); |
|
|
log.info("上传离线视频业务接口:校验失败:{}", result.getMsg()); |
|
|
return result; |
|
|
return result; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 检查参数 |
|
|
* 检查参数 |
|
|
* |
|
|
* |
|
|
* @param tenantId |
|
|
|
|
|
* @param request |
|
|
* @param request |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
private JsonResult check(String tenantId, UploadFlightUrlRequest request) { |
|
|
|
|
|
|
|
|
private JsonResult check(UploadFlightUrlRequest request) { |
|
|
if (StringUtils.isEmpty(request.getVideoUrl()) || StringUtils.isEmpty(request.getSrtUrl()) |
|
|
if (StringUtils.isEmpty(request.getVideoUrl()) || StringUtils.isEmpty(request.getSrtUrl()) |
|
|
|| StringUtils.isEmpty(request.getTaskCode())) { |
|
|
|| StringUtils.isEmpty(request.getTaskCode())) { |
|
|
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); |
|
|
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); |