Browse Source

修改请求方式

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
b45550723f
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/upload/UploadFlightUrlService.java

+ 2
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/upload/UploadFlightUrlService.java View File

*/ */
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);

Loading…
Cancel
Save