diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/schedule/VideoTaskSchedule.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/schedule/VideoTaskSchedule.java index 5acefaf..bffbf98 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/schedule/VideoTaskSchedule.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/schedule/VideoTaskSchedule.java @@ -38,6 +38,7 @@ import com.xxl.job.core.log.XxlJobLogger; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.oss.model.BladeFile; import org.springblade.core.tool.api.R; import org.springblade.core.tool.jackson.JsonUtil; import org.springblade.core.tool.utils.*; @@ -251,11 +252,11 @@ public class VideoTaskSchedule { log.error("获取截图文件失败", e); throw new HzServiceException("获取截图文件失败"); } -// R fileResponse = ossClient.putFile(multipartFile); -// log.info("【taskId:{}}】视频巡检任务执行,上传minio结果,{}", task.getId(), Optional.ofNullable(fileResponse).map(JsonUtil::toJson).orElse("null")); -// if (fileResponse.isSuccess()) { -// record.setFileUrl(Optional.ofNullable(fileResponse.getData().getLink()).orElse(record.getFileUrl())); -// } + R fileResponse = ossClient.putFileByNameAndTenantId("file", multipartFile, task.getTenantId()); + log.info("【taskId:{}}】视频巡检任务执行,上传minio结果,{}", task.getId(), Optional.ofNullable(fileResponse).map(JsonUtil::toJson).orElse("null")); + if (fileResponse.isSuccess()) { + record.setFileUrl(Optional.ofNullable(fileResponse.getData().getLink()).orElse(record.getFileUrl())); + } ContentEntity content = contentService.getById(contentId); if (StringUtil.isBlank(content.getMultiCheckTypeSon())) {