From d33044b32fe9566aea2aa29de604d7bcb1f7deee Mon Sep 17 00:00:00 2001 From: luyie Date: Tue, 27 Aug 2024 11:20:15 +0800 Subject: [PATCH] =?UTF-8?q?add:=E8=A7=86=E9=A2=91=E5=B7=A1=E6=A3=80?= =?UTF-8?q?=EF=BC=8C=E5=A4=A7=E6=A8=A1=E5=9E=8B=E5=88=86=E6=9E=90=EF=BC=8C?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0minio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzinfo/inspect/task/schedule/VideoTaskSchedule.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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())) {