Pre Merge pull request !353 from cycmy2001/localoss

This commit is contained in:
cycmy2001 2023-05-23 05:29:37 +00:00 committed by Gitee
commit f38d25025e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
8 changed files with 195 additions and 60 deletions

View File

@ -0,0 +1,21 @@
package com.ruoyi.oss.config;
import com.ruoyi.oss.constant.OssConstant;
import com.ruoyi.oss.properties.OssProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* OSS资源配置
*
* @author CYC
* @since 2023-05-23
*/
@Configuration
public class OssResourceConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler(OssConstant.LOCAL_RESOURCE_PATH + "/**").addResourceLocations("file:///" + OssProperties.getLocalResourceDir());
}
}

View File

@ -23,7 +23,7 @@ public interface OssConstant {
/** /**
* 系统数据ids * 系统数据ids
*/ */
List<Long> SYSTEM_DATA_IDS = Arrays.asList(1L, 2L, 3L, 4L); List<Long> SYSTEM_DATA_IDS = Arrays.asList(1L, 2L, 3L, 4L, 5L);
/** /**
* 云服务商 * 云服务商
@ -35,4 +35,14 @@ public interface OssConstant {
*/ */
String IS_HTTPS = "Y"; String IS_HTTPS = "Y";
/**
* 本地存储
*/
Long LOCAL_ENV = 1L;
/**
* 本地存储资源路径
*/
String LOCAL_RESOURCE_PATH = "/oss/local";
} }

View File

@ -1,6 +1,7 @@
package com.ruoyi.oss.core; package com.ruoyi.oss.core;
import cn.hutool.core.io.IoUtil; import cn.hutool.core.io.IoUtil;
import cn.hutool.core.io.file.PathUtil;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import com.amazonaws.ClientConfiguration; import com.amazonaws.ClientConfiguration;
import com.amazonaws.HttpMethod; import com.amazonaws.HttpMethod;
@ -22,10 +23,17 @@ import com.ruoyi.oss.enumd.AccessPolicyType;
import com.ruoyi.oss.enumd.PolicyType; import com.ruoyi.oss.enumd.PolicyType;
import com.ruoyi.oss.exception.OssException; import com.ruoyi.oss.exception.OssException;
import com.ruoyi.oss.properties.OssProperties; import com.ruoyi.oss.properties.OssProperties;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URL; import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.Date; import java.util.Date;
/** /**
@ -40,12 +48,14 @@ public class OssClient {
private final OssProperties properties; private final OssProperties properties;
private final AmazonS3 client; private AmazonS3 client;
public OssClient(String configKey, OssProperties ossProperties) { public OssClient(String configKey, OssProperties ossProperties) {
this.configKey = configKey; this.configKey = configKey;
this.properties = ossProperties; this.properties = ossProperties;
try { try {
//AmazonS3环境
if (!isLocalEnv()) {
AwsClientBuilder.EndpointConfiguration endpointConfig = AwsClientBuilder.EndpointConfiguration endpointConfig =
new AwsClientBuilder.EndpointConfiguration(properties.getEndpoint(), properties.getRegion()); new AwsClientBuilder.EndpointConfiguration(properties.getEndpoint(), properties.getRegion());
@ -67,7 +77,7 @@ public class OssClient {
build.enablePathStyleAccess(); build.enablePathStyleAccess();
} }
this.client = build.build(); this.client = build.build();
}
createBucket(); createBucket();
} catch (Exception e) { } catch (Exception e) {
if (e instanceof OssException) { if (e instanceof OssException) {
@ -79,6 +89,12 @@ public class OssClient {
public void createBucket() { public void createBucket() {
try { try {
//本地环境
if (isLocalEnv()) {
//创建目录
PathUtil.mkdir(Paths.get(getLocalEnvDir()));
return;
}
String bucketName = properties.getBucketName(); String bucketName = properties.getBucketName();
if (client.doesBucketExistV2(bucketName)) { if (client.doesBucketExistV2(bucketName)) {
return; return;
@ -102,6 +118,10 @@ public class OssClient {
inputStream = new ByteArrayInputStream(IoUtil.readBytes(inputStream)); inputStream = new ByteArrayInputStream(IoUtil.readBytes(inputStream));
} }
try { try {
//本地环境
if (isLocalEnv()) {
FileUtils.copyInputStreamToFile(inputStream, getLocalEnvFile(path));
} else {
ObjectMetadata metadata = new ObjectMetadata(); ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentType(contentType); metadata.setContentType(contentType);
metadata.setContentLength(inputStream.available()); metadata.setContentLength(inputStream.available());
@ -109,6 +129,7 @@ public class OssClient {
// 设置上传对象的 Acl 为公共读 // 设置上传对象的 Acl 为公共读
putObjectRequest.setCannedAcl(getAccessPolicy().getAcl()); putObjectRequest.setCannedAcl(getAccessPolicy().getAcl());
client.putObject(putObjectRequest); client.putObject(putObjectRequest);
}
} catch (Exception e) { } catch (Exception e) {
throw new OssException("上传文件失败,请检查配置信息:[" + e.getMessage() + "]"); throw new OssException("上传文件失败,请检查配置信息:[" + e.getMessage() + "]");
} }
@ -116,8 +137,13 @@ public class OssClient {
} }
public void delete(String path) { public void delete(String path) {
path = path.replace(getUrl() + "/", "");
try { try {
path = path.replace(getUrl() + "/", "");
//本地环境
if (isLocalEnv()) {
FileUtils.delete(getLocalEnvFile(path));
return;
}
client.deleteObject(properties.getBucketName(), path); client.deleteObject(properties.getBucketName(), path);
} catch (Exception e) { } catch (Exception e) {
throw new OssException("删除文件失败,请检查配置信息:[" + e.getMessage() + "]"); throw new OssException("删除文件失败,请检查配置信息:[" + e.getMessage() + "]");
@ -138,15 +164,39 @@ public class OssClient {
* @param path 完整文件路径 * @param path 完整文件路径
*/ */
public ObjectMetadata getObjectMetadata(String path) { public ObjectMetadata getObjectMetadata(String path) {
try {
//本地环境
if (isLocalEnv()) {
ObjectMetadata objectMetadata = new ObjectMetadata();
BasicFileAttributes fileAttributes = Files.readAttributes(getLocalEnvFile(path).toPath(), BasicFileAttributes.class);
//文件大小
objectMetadata.setContentLength(fileAttributes.size());
//文件创建时间
//fileAttributes.creationTime()
//文件最后修改时间
objectMetadata.setLastModified(new Date(fileAttributes.lastModifiedTime().toMillis()));
return objectMetadata;
}
path = path.replace(getUrl() + "/", ""); path = path.replace(getUrl() + "/", "");
S3Object object = client.getObject(properties.getBucketName(), path); S3Object object = client.getObject(properties.getBucketName(), path);
return object.getObjectMetadata(); return object.getObjectMetadata();
} catch (IOException ex) {
throw new OssException("获取文件元数据失败,请检查配置信息:[" + ex.getMessage() + "]");
}
} }
public InputStream getObjectContent(String path) { public InputStream getObjectContent(String path) {
try {
path = path.replace(getUrl() + "/", ""); path = path.replace(getUrl() + "/", "");
//本地环境
if (isLocalEnv()) {
return Files.newInputStream(getLocalEnvFile(path).toPath());
}
S3Object object = client.getObject(properties.getBucketName(), path); S3Object object = client.getObject(properties.getBucketName(), path);
return object.getObjectContent(); return object.getObjectContent();
} catch (IOException ex) {
throw new OssException("获取ObjectContent失败请检查配置信息:[" + ex.getMessage() + "]");
}
} }
public String getUrl() { public String getUrl() {
@ -160,18 +210,25 @@ public class OssClient {
} }
return header + properties.getBucketName() + "." + endpoint; return header + properties.getBucketName() + "." + endpoint;
} }
//请求路径
String path = "/" + properties.getBucketName();
//本地单独处理
if (isLocalEnv()) {
path = OssConstant.LOCAL_RESOURCE_PATH + "/" + properties.getBucketName();
}
// minio 单独处理 // minio 单独处理
if (StringUtils.isNotBlank(domain)) { if (StringUtils.isNotBlank(domain)) {
return header + domain + "/" + properties.getBucketName(); return header + domain + path;
} }
return header + endpoint + "/" + properties.getBucketName(); return header + endpoint + path;
} }
public String getPath(String prefix, String suffix) { public String getPath(String prefix, String suffix) {
// 生成uuid // 生成uuid
String uuid = IdUtil.fastSimpleUUID(); String uuid = IdUtil.fastSimpleUUID();
// 文件路径 // 文件路径
String path = DateUtils.datePath() + "/" + uuid; String path = DateUtils.dateTime() + "/" + uuid;
if (StringUtils.isNotBlank(prefix)) { if (StringUtils.isNotBlank(prefix)) {
path = prefix + "/" + path; path = prefix + "/" + path;
} }
@ -190,6 +247,10 @@ public class OssClient {
* @param second 授权时间 * @param second 授权时间
*/ */
public String getPrivateUrl(String objectKey, Integer second) { public String getPrivateUrl(String objectKey, Integer second) {
//本地环境
if (isLocalEnv()) {
return objectKey;
}
GeneratePresignedUrlRequest generatePresignedUrlRequest = GeneratePresignedUrlRequest generatePresignedUrlRequest =
new GeneratePresignedUrlRequest(properties.getBucketName(), objectKey) new GeneratePresignedUrlRequest(properties.getBucketName(), objectKey)
.withMethod(HttpMethod.GET) .withMethod(HttpMethod.GET)
@ -250,4 +311,27 @@ public class OssClient {
return builder.toString(); return builder.toString();
} }
/**
* 本地环境
*/
private boolean isLocalEnv() {
return OssConstant.LOCAL_ENV.equals(properties.getOssConfigId());
}
/**
* 获取本地环境文件目录
*/
private String getLocalEnvDir() {
return OssProperties.getLocalResourceDir() + properties.getBucketName();
}
/**
* 获取本地环境文件对象
*
* @param path 文件相对路径
*/
private File getLocalEnvFile(String path) {
return new File(FilenameUtils.normalize(getLocalEnvDir() + File.separator + path));
}
} }

View File

@ -1,7 +1,10 @@
package com.ruoyi.oss.properties; package com.ruoyi.oss.properties;
import cn.hutool.core.util.SystemPropsUtil;
import lombok.Data; import lombok.Data;
import java.io.File;
/** /**
* OSS对象存储 配置属性 * OSS对象存储 配置属性
* *
@ -10,6 +13,11 @@ import lombok.Data;
@Data @Data
public class OssProperties { public class OssProperties {
/**
* 主建
*/
private Long ossConfigId;
/** /**
* 访问站点 * 访问站点
*/ */
@ -55,4 +63,11 @@ public class OssProperties {
*/ */
private String accessPolicy; private String accessPolicy;
/**
* 本地资源目录
*/
public static String getLocalResourceDir() {
return SystemPropsUtil.get("user.dir") + File.separator;
}
} }

View File

@ -946,11 +946,12 @@ comment on column sys_oss_config.create_time is '创建时间';
comment on column sys_oss_config.update_by is '更新者'; comment on column sys_oss_config.update_by is '更新者';
comment on column sys_oss_config.update_time is '更新时间'; comment on column sys_oss_config.update_time is '更新时间';
insert into sys_oss_config values (1, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1', '0', '', NULL, 'admin', sysdate, 'admin', sysdate); insert into sys_oss_config values (1, 'local', 'ruoyi', 'ruoyi123', 'upload', '', 'localhost:8080', '','N', '', '1', '0', '', NULL, 'admin', sysdate, 'admin', sysdate);
insert into sys_oss_config values (2, 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1', '1', '', NULL, 'admin', sysdate, 'admin', sysdate); insert into sys_oss_config values (2, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1', '1', '', NULL, 'admin', sysdate, 'admin', sysdate);
insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1', '1', '', NULL, 'admin', sysdate, 'admin', sysdate); insert into sys_oss_config values (3, 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1', '1', '', NULL, 'admin', sysdate, 'admin', sysdate);
insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '1', '', NULL, 'admin', sysdate, 'admin', sysdate); insert into sys_oss_config values (4, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1', '1', '', NULL, 'admin', sysdate, 'admin', sysdate);
insert into sys_oss_config values (5, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1', '1', '', NULL, 'admin', sysdate, 'admin', sysdate); insert into sys_oss_config values (5, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '1', '', NULL, 'admin', sysdate, 'admin', sysdate);
insert into sys_oss_config values (6, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1', '1', '', NULL, 'admin', sysdate, 'admin', sysdate);
-- ---------------------------- -- ----------------------------

View File

@ -962,11 +962,12 @@ comment on column sys_oss_config.update_by is '更新者';
comment on column sys_oss_config.update_time is '更新时间'; comment on column sys_oss_config.update_time is '更新时间';
comment on column sys_oss_config.remark is '备注'; comment on column sys_oss_config.remark is '备注';
insert into sys_oss_config values (1, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1', '0', '', 'admin', now(), 'admin', now(), null); insert into sys_oss_config values (1, 'local', 'ruoyi', 'ruoyi123', 'upload', '', 'localhost:8080', '','N', '', '1', '0', '', 'admin', now(), 'admin', now(), null);
insert into sys_oss_config values (2, 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1', '1', '', 'admin', now(), 'admin', now(), null); insert into sys_oss_config values (2, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1', '1', '', 'admin', now(), 'admin', now(), null);
insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1', '1', '', 'admin', now(), 'admin', now(), null); insert into sys_oss_config values (3, 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1', '1', '', 'admin', now(), 'admin', now(), null);
insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '1', '', 'admin', now(), 'admin', now(), null); insert into sys_oss_config values (4, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1', '1', '', 'admin', now(), 'admin', now(), null);
insert into sys_oss_config values (5, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1', '1', '', 'admin', now(), 'admin', now(), NULL); insert into sys_oss_config values (5, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '1', '', 'admin', now(), 'admin', now(), null);
insert into sys_oss_config values (6, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1', '1', '', 'admin', now(), 'admin', now(), NULL);
-- 字符串自动转时间 避免框架时间查询报错问题 -- 字符串自动转时间 避免框架时间查询报错问题
create or replace function cast_varchar_to_timestamp(varchar) returns timestamptz as $$ create or replace function cast_varchar_to_timestamp(varchar) returns timestamptz as $$

View File

@ -689,8 +689,9 @@ create table sys_oss_config (
primary key (oss_config_id) primary key (oss_config_id)
) engine=innodb comment='对象存储配置表'; ) engine=innodb comment='对象存储配置表';
insert into sys_oss_config values (1, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1' ,'0', '', 'admin', sysdate(), 'admin', sysdate(), NULL); insert into sys_oss_config values (1, 'local', 'ruoyi', 'ruoyi123', 'upload', '', 'localhost:8080', '','N', '', '1' ,'0', '', 'admin', sysdate(), 'admin', sysdate(), NULL);
insert into sys_oss_config values (2, 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1' ,'1', '', 'admin', sysdate(), 'admin', sysdate(), NULL); insert into sys_oss_config values (2, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1' ,'1', '', 'admin', sysdate(), 'admin', sysdate(), NULL);
insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1' ,'1', '', 'admin', sysdate(), 'admin', sysdate(), NULL); insert into sys_oss_config values (3, 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1' ,'1', '', 'admin', sysdate(), 'admin', sysdate(), NULL);
insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1' ,'1', '', 'admin', sysdate(), 'admin', sysdate(), NULL); insert into sys_oss_config values (4, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1' ,'1', '', 'admin', sysdate(), 'admin', sysdate(), NULL);
insert into sys_oss_config values (5, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1' ,'1', '', 'admin', sysdate(), 'admin', sysdate(), NULL); insert into sys_oss_config values (5, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1' ,'1', '', 'admin', sysdate(), 'admin', sysdate(), NULL);
insert into sys_oss_config values (6, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1' ,'1', '', 'admin', sysdate(), 'admin', sysdate(), NULL);

View File

@ -2332,13 +2332,15 @@ EXEC sp_addextendedproperty
'TABLE', N'sys_oss_config' 'TABLE', N'sys_oss_config'
GO GO
INSERT INTO sys_oss_config VALUES (N'1', N'minio', N'ruoyi', N'ruoyi123', N'ruoyi', N'', N'127.0.0.1:9000', N'',N'N', N'', N'1', N'0', N'', N'admin', getdate(), N'admin', getdate(), NULL) INSERT INTO sys_oss_config VALUES (N'1', N'local', N'ruoyi', N'ruoyi123', N'upload', N'', N'localhost:8080', N'',N'N', N'', N'1', N'0', N'', N'admin', getdate(), N'admin', getdate(), NULL)
GO GO
INSERT INTO sys_oss_config VALUES (N'2', N'qiniu', N'XXXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi', N'', N's3-cn-north-1.qiniucs.com', N'',N'N', N'', N'1', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL) INSERT INTO sys_oss_config VALUES (N'2', N'minio', N'ruoyi', N'ruoyi123', N'ruoyi', N'', N'127.0.0.1:9000', N'',N'N', N'', N'1', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL)
GO GO
INSERT INTO sys_oss_config VALUES (N'3', N'aliyun', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi', N'', N'oss-cn-beijing.aliyuncs.com', N'',N'N', N'', N'1', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL) INSERT INTO sys_oss_config VALUES (N'3', N'qiniu', N'XXXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi', N'', N's3-cn-north-1.qiniucs.com', N'',N'N', N'', N'1', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL)
GO GO
INSERT INTO sys_oss_config VALUES (N'4', N'qcloud', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi-1250000000', N'', N'cos.ap-beijing.myqcloud.com', N'',N'N', N'ap-beijing', N'1', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL) INSERT INTO sys_oss_config VALUES (N'4', N'aliyun', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi', N'', N'oss-cn-beijing.aliyuncs.com', N'',N'N', N'', N'1', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL)
GO GO
INSERT INTO sys_oss_config VALUES (N'5', N'image', N'ruoyi', N'ruoyi123', N'ruoyi', N'image', N'127.0.0.1:9000', N'',N'N', N'', N'1', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL) INSERT INTO sys_oss_config VALUES (N'5', N'qcloud', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi-1250000000', N'', N'cos.ap-beijing.myqcloud.com', N'',N'N', N'ap-beijing', N'1', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL)
GO
INSERT INTO sys_oss_config VALUES (N'6', N'image', N'ruoyi', N'ruoyi123', N'ruoyi', N'image', N'127.0.0.1:9000', N'',N'N', N'', N'1', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL)
GO GO