From 53cfb7f588805dfddb82af74f9be911780eb02ff Mon Sep 17 00:00:00 2001 From: yss <17921@qq.com> Date: Fri, 21 Apr 2023 17:25:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AB=98=E8=B4=A8=E9=87=8F=E8=BF=90=E8=90=A5?= =?UTF-8?q?=EF=BC=9Aoss=E4=B8=8A=E4=BC=A0=E3=80=81=E7=82=B9=E8=B5=9E?= =?UTF-8?q?=E3=80=81=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/HighQualityMaintainController.java | 5 ++++- .../extend/uploadOss/service/impl/UploadOssServiceImpl.java | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/highquality/controller/HighQualityMaintainController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/highquality/controller/HighQualityMaintainController.java index 1d41204..01c13dc 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/highquality/controller/HighQualityMaintainController.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/highquality/controller/HighQualityMaintainController.java @@ -3,6 +3,9 @@ package com.chinaunicom.mall.ebtp.extend.highquality.controller; import com.chinaunicom.mall.ebtp.common.base.entity.BasePageResponse; import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; +import com.chinaunicom.mall.ebtp.common.log.OperationLogDetail; +import com.chinaunicom.mall.ebtp.common.log.enums.EbtpLogBusinessModule; +import com.chinaunicom.mall.ebtp.common.log.enums.EbtpLogType; import com.chinaunicom.mall.ebtp.common.poiExport.constant.ExportConstant; import com.chinaunicom.mall.ebtp.common.poiExport.entity.ExcelTable; import com.chinaunicom.mall.ebtp.extend.highquality.entity.*; @@ -79,7 +82,6 @@ public class HighQualityMaintainController { return BasePageResponse.success(highQualityStyleService.queryStyleAndProject(inVO)); } - @ApiOperation("保存风采或项目") @PostMapping("/styleProject/save") public BaseResponse saveStyleOrProject(@RequestBody HighQualityMaintainOutVO inVO) { @@ -100,6 +102,7 @@ public class HighQualityMaintainController { @ApiOperation("oss文件上传") @PostMapping("/upload") + @OperationLogDetail(businessModule = EbtpLogBusinessModule.OTHER, operationType = EbtpLogType.SELECT, detail = "高质量-视频上传") public BaseResponse upload(@RequestParam("file") MultipartFile file) throws IOException { return BaseResponse.success(iUploadOssService.uploadFile(file,"oss/highquality")); } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/uploadOss/service/impl/UploadOssServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/uploadOss/service/impl/UploadOssServiceImpl.java index a74e2f3..027be3b 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/uploadOss/service/impl/UploadOssServiceImpl.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/uploadOss/service/impl/UploadOssServiceImpl.java @@ -49,6 +49,7 @@ public class UploadOssServiceImpl implements IUploadOssService { DateFormat yearMonthPath = new SimpleDateFormat("yyyy/MM/dd"); String filePathPrefix = prefix + File.separator + yearMonthPath.format(new Date((System.currentTimeMillis()))); String objectName = filePathPrefix + File.separator + RandomUtil.randomString(32).toUpperCase(Locale.ROOT) + "." + fileType; + log.info("uploadFile--------bucketName:"+bucketName+",objectName:"+objectName+",file:"+file.getSize()); client.putObject(new PutObjectRequest(bucketName, objectName, file.getInputStream(), new ObjectMetadata())); return bucketName+":"+objectName; }