From 9af6657ee58f9fbaf17cf12a59244efd2fc92a84 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Mon, 22 Sep 2025 12:55:57 +0800
Subject: [PATCH] 生产环境打包配置环境-prod
---
oying-tools/src/main/java/com/oying/service/impl/BucketStorageServiceImpl.java | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/oying-tools/src/main/java/com/oying/service/impl/BucketStorageServiceImpl.java b/oying-tools/src/main/java/com/oying/service/impl/BucketStorageServiceImpl.java
index fca0ba4..7ac8038 100644
--- a/oying-tools/src/main/java/com/oying/service/impl/BucketStorageServiceImpl.java
+++ b/oying-tools/src/main/java/com/oying/service/impl/BucketStorageServiceImpl.java
@@ -58,6 +58,9 @@
String type = FileUtil.getFileType(suffix);
String reaName = System.currentTimeMillis() + "." + suffix;
String objectKey = type + "/" + reaName;
+ if (properties.getEnabled()) {
+ objectKey = "test/" +objectKey;
+ }
PutObjectResult result = ObsUtils.putObject(properties, file, objectKey, AccessControlList.REST_CANNED_PUBLIC_READ);
if (ObjectUtil.isNull(result)) {
throw new BadRequestException("上传失败");
@@ -83,6 +86,9 @@
String type = FileUtil.getFileType(suffix);
String reaName = IdUtil.getSnowflake(1, 1).nextId() + "." + suffix;
String objectKey = type + "/" + reaName;
+ if (properties.getEnabled()) {
+ objectKey = "test/" +objectKey;
+ }
PutObjectResult result = ObsUtils.putObject(properties, FileUtil.toFile(file), objectKey, AccessControlList.REST_CANNED_PUBLIC_READ);
if (ObjectUtil.isNull(result)) {
throw new BadRequestException("上传失败");
--
Gitblit v1.9.3