!175 [重大改动] 基于S3协议重新实现 OSS模块 支持自定义域名
* [重大改动] 基于S3协议重新实现 OSS模块 支持自定义域名
| | |
| | | <guava.version>30.0-jre</guava.version> |
| | | |
| | | <!-- OSS é
ç½® --> |
| | | <qiniu.version>7.9.5</qiniu.version> |
| | | <aliyun.oss.version>3.14.0</aliyun.oss.version> |
| | | <qcloud.cos.version>5.6.72</qcloud.cos.version> |
| | | <minio.version>8.3.8</minio.version> |
| | | |
| | | <aws-java-sdk-s3.version>1.12.215</aws-java-sdk-s3.version> |
| | | <!-- SMS é
ç½® --> |
| | | <aliyun.sms.version>2.0.9</aliyun.sms.version> |
| | | <tencent.sms.version>3.1.500</tencent.sms.version> |
| | |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.amazonaws</groupId> |
| | | <artifactId>aws-java-sdk-s3</artifactId> |
| | | <version>${aws-java-sdk-s3.version}</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>dysmsapi20170525</artifactId> |
| | | <version>${aliyun.sms.version}</version> |
| | |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.qiniu</groupId> |
| | | <artifactId>qiniu-java-sdk</artifactId> |
| | | <version>${qiniu.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.aliyun.oss</groupId> |
| | | <artifactId>aliyun-sdk-oss</artifactId> |
| | | <version>${aliyun.oss.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.qcloud</groupId> |
| | | <artifactId>cos_api</artifactId> |
| | | <version>${qcloud.cos.version}</version> |
| | | <exclusions> |
| | | <exclusion> |
| | | <groupId>org.slf4j</groupId> |
| | | <artifactId>slf4j-log4j12</artifactId> |
| | | </exclusion> |
| | | <exclusion> |
| | | <groupId>org.bouncycastle</groupId> |
| | | <artifactId>bcprov-jdk15on</artifactId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.minio</groupId> |
| | | <artifactId>minio</artifactId> |
| | | <version>${minio.version}</version> |
| | | <groupId>com.amazonaws</groupId> |
| | | <artifactId>aws-java-sdk-s3</artifactId> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | |
| | | List<Integer> SYSTEM_DATA_IDS = Arrays.asList(1, 2, 3, 4); |
| | | |
| | | /** |
| | | * äºæå¡å |
| | | */ |
| | | String[] CLOUD_SERVICE = new String[] {"aliyun", "qcloud", "qiniu"}; |
| | | |
| | | /** |
| | | * https ç¶æ |
| | | */ |
| | | String IS_HTTPS = "Y"; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.oss.core; |
| | | |
| | | import cn.hutool.core.util.IdUtil; |
| | | import com.amazonaws.ClientConfiguration; |
| | | import com.amazonaws.Protocol; |
| | | import com.amazonaws.auth.AWSCredentials; |
| | | import com.amazonaws.auth.AWSCredentialsProvider; |
| | | import com.amazonaws.auth.AWSStaticCredentialsProvider; |
| | | import com.amazonaws.auth.BasicAWSCredentials; |
| | | import com.amazonaws.client.builder.AwsClientBuilder; |
| | | import com.amazonaws.services.s3.AmazonS3; |
| | | import com.amazonaws.services.s3.AmazonS3Client; |
| | | import com.amazonaws.services.s3.model.CannedAccessControlList; |
| | | import com.amazonaws.services.s3.model.CreateBucketRequest; |
| | | import com.amazonaws.services.s3.model.ObjectMetadata; |
| | | import com.amazonaws.services.s3.model.PutObjectRequest; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.oss.constant.OssConstant; |
| | | import com.ruoyi.oss.entity.UploadResult; |
| | | import com.ruoyi.oss.enumd.PolicyType; |
| | | import com.ruoyi.oss.exception.OssException; |
| | | import com.ruoyi.oss.properties.OssProperties; |
| | | |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.InputStream; |
| | | |
| | | /** |
| | | * S3 åå¨åè®® ææå
¼å®¹S3åè®®çäºåå忝æ |
| | | * é¿éäº è
¾è®¯äº ä¸çäº minio |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | public class OssClient { |
| | | |
| | | private final String configKey; |
| | | |
| | | private final OssProperties properties; |
| | | |
| | | private final AmazonS3 client; |
| | | |
| | | public OssClient(String configKey, OssProperties ossProperties) { |
| | | this.configKey = configKey; |
| | | this.properties = ossProperties; |
| | | try { |
| | | AwsClientBuilder.EndpointConfiguration endpointConfig = |
| | | new AwsClientBuilder.EndpointConfiguration(properties.getEndpoint(), properties.getRegion()); |
| | | |
| | | AWSCredentials credentials = new BasicAWSCredentials(properties.getAccessKey(), properties.getSecretKey()); |
| | | AWSCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(credentials); |
| | | ClientConfiguration clientConfig = new ClientConfiguration(); |
| | | if (OssConstant.IS_HTTPS.equals(properties.getIsHttps())) { |
| | | clientConfig.setProtocol(Protocol.HTTPS); |
| | | } else { |
| | | clientConfig.setProtocol(Protocol.HTTP); |
| | | } |
| | | this.client = AmazonS3Client.builder() |
| | | .withEndpointConfiguration(endpointConfig) |
| | | .withClientConfiguration(clientConfig) |
| | | .withCredentials(credentialsProvider) |
| | | .disableChunkedEncoding() |
| | | .build(); |
| | | |
| | | createBucket(); |
| | | } catch (Exception e) { |
| | | if (e instanceof OssException) { |
| | | throw e; |
| | | } |
| | | throw new OssException("é
ç½®é误! è¯·æ£æ¥ç³»ç»é
ç½®:[" + e.getMessage() + "]"); |
| | | } |
| | | } |
| | | |
| | | public void createBucket() { |
| | | try { |
| | | String bucketName = properties.getBucketName(); |
| | | if (client.doesBucketExistV2(bucketName)) { |
| | | return; |
| | | } |
| | | CreateBucketRequest createBucketRequest = new CreateBucketRequest(bucketName); |
| | | createBucketRequest.setCannedAcl(CannedAccessControlList.PublicRead); |
| | | client.createBucket(createBucketRequest); |
| | | client.setBucketPolicy(bucketName, getPolicy(bucketName, PolicyType.READ)); |
| | | } catch (Exception e) { |
| | | throw new OssException("å建Bucket失败, è¯·æ ¸å¯¹é
置信æ¯:[" + e.getMessage() + "]"); |
| | | } |
| | | } |
| | | |
| | | public UploadResult upload(byte[] data, String path, String contentType) { |
| | | return upload(new ByteArrayInputStream(data), path, contentType); |
| | | } |
| | | |
| | | public UploadResult upload(InputStream inputStream, String path, String contentType) { |
| | | try { |
| | | ObjectMetadata metadata = new ObjectMetadata(); |
| | | metadata.setContentType(contentType); |
| | | metadata.setContentLength(inputStream.available()); |
| | | client.putObject(new PutObjectRequest(properties.getBucketName(), path, inputStream, metadata)); |
| | | } catch (Exception e) { |
| | | throw new OssException("ä¸ä¼ æä»¶å¤±è´¥ï¼è¯·æ£æ¥é
置信æ¯:[" + e.getMessage() + "]"); |
| | | } |
| | | return UploadResult.builder().url(getUrl() + "/" + path).filename(path).build(); |
| | | } |
| | | |
| | | public void delete(String path) { |
| | | path = path.replace(getUrl() + "/", ""); |
| | | try { |
| | | client.deleteObject(properties.getBucketName(), path); |
| | | } catch (Exception e) { |
| | | throw new OssException("ä¸ä¼ æä»¶å¤±è´¥ï¼è¯·æ£æ¥é
置信æ¯:[" + e.getMessage() + "]"); |
| | | } |
| | | } |
| | | |
| | | public UploadResult uploadSuffix(byte[] data, String suffix, String contentType) { |
| | | return upload(data, getPath(properties.getPrefix(), suffix), contentType); |
| | | } |
| | | |
| | | public UploadResult uploadSuffix(InputStream inputStream, String suffix, String contentType) { |
| | | return upload(inputStream, getPath(properties.getPrefix(), suffix), contentType); |
| | | } |
| | | |
| | | public String getUrl() { |
| | | String domain = properties.getDomain(); |
| | | if (StringUtils.isNotBlank(domain)) { |
| | | return domain; |
| | | } |
| | | String endpoint = properties.getEndpoint(); |
| | | String header = OssConstant.IS_HTTPS.equals(properties.getIsHttps()) ? "https://" : "http://"; |
| | | // äºæå¡åç´æ¥è¿å |
| | | if (StringUtils.containsAny(endpoint, OssConstant.CLOUD_SERVICE)){ |
| | | return header + properties.getBucketName() + "." + endpoint; |
| | | } |
| | | // minio åç¬å¤ç |
| | | return header + endpoint + "/" + properties.getBucketName(); |
| | | } |
| | | |
| | | public String getPath(String prefix, String suffix) { |
| | | // çæuuid |
| | | String uuid = IdUtil.fastSimpleUUID(); |
| | | // æä»¶è·¯å¾ |
| | | String path = DateUtils.datePath() + "/" + uuid; |
| | | if (StringUtils.isNotBlank(prefix)) { |
| | | path = prefix + "/" + path; |
| | | } |
| | | return path + suffix; |
| | | } |
| | | |
| | | |
| | | public String getConfigKey() { |
| | | return configKey; |
| | | } |
| | | |
| | | private static String getPolicy(String bucketName, PolicyType policyType) { |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append("{\n\"Statement\": [\n{\n\"Action\": [\n"); |
| | | if (policyType == PolicyType.WRITE) { |
| | | builder.append("\"s3:GetBucketLocation\",\n\"s3:ListBucketMultipartUploads\"\n"); |
| | | } else if (policyType == PolicyType.READ_WRITE) { |
| | | builder.append("\"s3:GetBucketLocation\",\n\"s3:ListBucket\",\n\"s3:ListBucketMultipartUploads\"\n"); |
| | | } else { |
| | | builder.append("\"s3:GetBucketLocation\"\n"); |
| | | } |
| | | builder.append("],\n\"Effect\": \"Allow\",\n\"Principal\": \"*\",\n\"Resource\": \"arn:aws:s3:::"); |
| | | builder.append(bucketName); |
| | | builder.append("\"\n},\n"); |
| | | if (policyType == PolicyType.READ) { |
| | | builder.append("{\n\"Action\": [\n\"s3:ListBucket\"\n],\n\"Effect\": \"Deny\",\n\"Principal\": \"*\",\n\"Resource\": \"arn:aws:s3:::"); |
| | | builder.append(bucketName); |
| | | builder.append("\"\n},\n"); |
| | | } |
| | | builder.append("{\n\"Action\": "); |
| | | switch (policyType) { |
| | | case WRITE: |
| | | builder.append("[\n\"s3:AbortMultipartUpload\",\n\"s3:DeleteObject\",\n\"s3:ListMultipartUploadParts\",\n\"s3:PutObject\"\n],\n"); |
| | | break; |
| | | case READ_WRITE: |
| | | builder.append("[\n\"s3:AbortMultipartUpload\",\n\"s3:DeleteObject\",\n\"s3:GetObject\",\n\"s3:ListMultipartUploadParts\",\n\"s3:PutObject\"\n],\n"); |
| | | break; |
| | | default: |
| | | builder.append("\"s3:GetObject\",\n"); |
| | | break; |
| | | } |
| | | builder.append("\"Effect\": \"Allow\",\n\"Principal\": \"*\",\n\"Resource\": \"arn:aws:s3:::"); |
| | | builder.append(bucketName); |
| | | builder.append("/*\"\n}\n],\n\"Version\": \"2012-10-17\"\n}\n"); |
| | | return builder.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.ruoyi.oss.enumd; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | |
| | | import com.ruoyi.common.utils.JsonUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.redis.RedisUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.ruoyi.oss.constant.OssConstant; |
| | | import com.ruoyi.oss.enumd.OssEnumd; |
| | | import com.ruoyi.oss.core.OssClient; |
| | | import com.ruoyi.oss.exception.OssException; |
| | | import com.ruoyi.oss.properties.OssProperties; |
| | | import com.ruoyi.oss.service.IOssStrategy; |
| | | import com.ruoyi.oss.service.abstractd.AbstractOssStrategy; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.Map; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | |
| | | /** |
| | | * æä»¶ä¸ä¼ Factory |
| | |
| | | @Slf4j |
| | | public class OssFactory { |
| | | |
| | | private static final Map<String, OssClient> CLIENT_CACHE = new ConcurrentHashMap<>(); |
| | | |
| | | /** |
| | | * åå§åå·¥å |
| | | */ |
| | | public static void init() { |
| | | log.info("åå§åOSSå·¥å"); |
| | | RedisUtils.subscribe(OssConstant.CACHE_CONFIG_KEY, String.class, type -> { |
| | | AbstractOssStrategy strategy = getStrategy(type); |
| | | RedisUtils.subscribe(OssConstant.CACHE_CONFIG_KEY, String.class, configKey -> { |
| | | OssClient client = getClient(configKey); |
| | | // æªåå§åä¸å¤ç |
| | | if (strategy.isInit) { |
| | | refresh(type); |
| | | log.info("订é
å·æ°OSSé
ç½® => " + type); |
| | | if (client != null) { |
| | | refresh(configKey); |
| | | log.info("订é
å·æ°OSSé
ç½® => " + configKey); |
| | | } |
| | | }); |
| | | } |
| | |
| | | /** |
| | | * è·åé»è®¤å®ä¾ |
| | | */ |
| | | public static IOssStrategy instance() { |
| | | public static OssClient instance() { |
| | | // è·åredis é»è®¤ç±»å |
| | | String type = RedisUtils.getCacheObject(OssConstant.CACHE_CONFIG_KEY); |
| | | if (StringUtils.isEmpty(type)) { |
| | | String configKey = RedisUtils.getCacheObject(OssConstant.CACHE_CONFIG_KEY); |
| | | if (StringUtils.isEmpty(configKey)) { |
| | | throw new OssException("æä»¶å卿å¡ç±»åæ æ³æ¾å°!"); |
| | | } |
| | | return instance(type); |
| | | return instance(configKey); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ç±»åè·åå®ä¾ |
| | | */ |
| | | public static IOssStrategy instance(String type) { |
| | | OssEnumd enumd = OssEnumd.find(type); |
| | | if (enumd == null) { |
| | | throw new OssException("æä»¶å卿å¡ç±»åæ æ³æ¾å°!"); |
| | | public static OssClient instance(String configKey) { |
| | | OssClient client = getClient(configKey); |
| | | if (client == null) { |
| | | refresh(configKey); |
| | | return getClient(configKey); |
| | | } |
| | | AbstractOssStrategy strategy = getStrategy(type); |
| | | if (!strategy.isInit) { |
| | | refresh(type); |
| | | } |
| | | return strategy; |
| | | return client; |
| | | } |
| | | |
| | | private static void refresh(String type) { |
| | | Object json = RedisUtils.getCacheObject(OssConstant.SYS_OSS_KEY + type); |
| | | private static void refresh(String configKey) { |
| | | Object json = RedisUtils.getCacheObject(OssConstant.SYS_OSS_KEY + configKey); |
| | | OssProperties properties = JsonUtils.parseObject(json.toString(), OssProperties.class); |
| | | if (properties == null) { |
| | | throw new OssException("ç³»ç»å¼å¸¸, '" + type + "'é
置信æ¯ä¸åå¨!"); |
| | | throw new OssException("ç³»ç»å¼å¸¸, '" + configKey + "'é
置信æ¯ä¸åå¨!"); |
| | | } |
| | | getStrategy(type).init(properties); |
| | | CLIENT_CACHE.put(configKey, new OssClient(configKey, properties)); |
| | | } |
| | | |
| | | private static AbstractOssStrategy getStrategy(String type) { |
| | | OssEnumd enumd = OssEnumd.find(type); |
| | | return (AbstractOssStrategy) SpringUtils.getBean(enumd.getBeanClass()); |
| | | private static OssClient getClient(String configKey) { |
| | | return CLIENT_CACHE.get(configKey); |
| | | } |
| | | |
| | | } |
| | |
| | | public class OssProperties { |
| | | |
| | | /** |
| | | * åå |
| | | * 访é®ç«ç¹ |
| | | */ |
| | | private String endpoint; |
| | | |
| | | /** |
| | | * èªå®ä¹åå |
| | | */ |
| | | private String domain; |
| | | |
| | | /** |
| | | * åç¼ |
| | | */ |
| | | private String prefix; |
| | |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 对象åå¨é
置对象 sys_oss_config |
| | |
| | | private String endpoint; |
| | | |
| | | /** |
| | | * èªå®ä¹åå |
| | | */ |
| | | private String domain; |
| | | |
| | | /** |
| | | * æ¯å¦httpsï¼0å¦ 1æ¯ï¼ |
| | | */ |
| | | private String isHttps; |
| | |
| | | /** |
| | | * é
ç½®key |
| | | */ |
| | | @ApiModelProperty(value = "configKey", required = true) |
| | | @NotBlank(message = "configKeyä¸è½ä¸ºç©º", groups = {AddGroup.class, EditGroup.class}) |
| | | @ApiModelProperty(value = "é
ç½®key", required = true) |
| | | @NotBlank(message = "é
ç½®keyä¸è½ä¸ºç©º", groups = {AddGroup.class, EditGroup.class}) |
| | | @Size(min = 2, max = 100, message = "configKeyé¿åº¦å¿
é¡»ä»äº2å20 ä¹é´") |
| | | private String configKey; |
| | | |
| | |
| | | /** |
| | | * æ¡¶åç§° |
| | | */ |
| | | @ApiModelProperty(value = "bucketName", required = true) |
| | | @NotBlank(message = "bucketNameä¸è½ä¸ºç©º", groups = {AddGroup.class, EditGroup.class}) |
| | | @ApiModelProperty(value = "æ¡¶åç§°", required = true) |
| | | @NotBlank(message = "æ¡¶åç§°ä¸è½ä¸ºç©º", groups = {AddGroup.class, EditGroup.class}) |
| | | @Size(min = 2, max = 100, message = "bucketNameé¿åº¦å¿
é¡»ä»äº2å100ä¹é´") |
| | | private String bucketName; |
| | | |
| | |
| | | /** |
| | | * 访é®ç«ç¹ |
| | | */ |
| | | @ApiModelProperty(value = "endpoint", required = true) |
| | | @NotBlank(message = "endpointä¸è½ä¸ºç©º", groups = {AddGroup.class, EditGroup.class}) |
| | | @ApiModelProperty(value = "访é®ç«ç¹", required = true) |
| | | @NotBlank(message = "访é®ç«ç¹ä¸è½ä¸ºç©º", groups = {AddGroup.class, EditGroup.class}) |
| | | @Size(min = 2, max = 100, message = "endpointé¿åº¦å¿
é¡»ä»äº2å100ä¹é´") |
| | | private String endpoint; |
| | | |
| | | /** |
| | | * èªå®ä¹åå |
| | | */ |
| | | @ApiModelProperty("èªå®ä¹åå") |
| | | private String domain; |
| | | |
| | | /** |
| | | * æ¯å¦httpsï¼Y=æ¯,N=å¦ï¼ |
| | |
| | | /** |
| | | * å |
| | | */ |
| | | @ApiModelProperty(value = "region") |
| | | @ApiModelProperty(value = "å") |
| | | private String region; |
| | | |
| | | /** |
| | |
| | | private String endpoint; |
| | | |
| | | /** |
| | | * èªå®ä¹åå |
| | | */ |
| | | @ApiModelProperty("èªå®ä¹åå") |
| | | private String domain; |
| | | |
| | | /** |
| | | * æ¯å¦httpsï¼Y=æ¯,N=å¦ï¼ |
| | | */ |
| | | @ApiModelProperty("æ¯å¦httpsï¼Y=æ¯,N=å¦ï¼") |
| | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.oss.core.OssClient; |
| | | import com.ruoyi.oss.entity.UploadResult; |
| | | import com.ruoyi.oss.factory.OssFactory; |
| | | import com.ruoyi.oss.service.IOssStrategy; |
| | | import com.ruoyi.system.domain.SysOss; |
| | | import com.ruoyi.system.domain.bo.SysOssBo; |
| | | import com.ruoyi.system.domain.vo.SysOssVo; |
| | |
| | | public SysOss upload(MultipartFile file) { |
| | | String originalfileName = file.getOriginalFilename(); |
| | | String suffix = StringUtils.substring(originalfileName, originalfileName.lastIndexOf("."), originalfileName.length()); |
| | | IOssStrategy storage = OssFactory.instance(); |
| | | OssClient storage = OssFactory.instance(); |
| | | UploadResult uploadResult; |
| | | try { |
| | | uploadResult = storage.uploadSuffix(file.getBytes(), suffix, file.getContentType()); |
| | |
| | | oss.setFileSuffix(suffix); |
| | | oss.setFileName(uploadResult.getFilename()); |
| | | oss.setOriginalName(originalfileName); |
| | | oss.setService(storage.getServiceType().getValue()); |
| | | oss.setService(storage.getConfigKey()); |
| | | baseMapper.insert(oss); |
| | | return oss; |
| | | } |
| | |
| | | } |
| | | List<SysOss> list = baseMapper.selectBatchIds(ids); |
| | | for (SysOss sysOss : list) { |
| | | IOssStrategy storage = OssFactory.instance(sysOss.getService()); |
| | | OssClient storage = OssFactory.instance(sysOss.getService()); |
| | | storage.delete(sysOss.getUrl()); |
| | | } |
| | | return baseMapper.deleteBatchIds(ids) > 0; |
| | |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="é
ç½®key" prop="configKey"> |
| | | <el-select v-model="queryParams.configKey" placeholder="è¯·éæ©é
ç½®key" clearable size="small"> |
| | | <el-option |
| | | v-for="configKey in configKeyOptions" |
| | | :key="configKey.configKey" |
| | | :label="configKey.label" |
| | | :value="configKey.configKey" |
| | | <el-input |
| | | v-model="queryParams.configKey" |
| | | placeholder="é
ç½®key" |
| | | clearable |
| | | size="small" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¡¶åç§°" prop="bucketName"> |
| | | <el-input |
| | |
| | | <el-table-column label="主建" align="center" prop="ossConfigId" v-if="false"/> |
| | | <el-table-column label="é
ç½®key" align="center" prop="configKey" /> |
| | | <el-table-column label="访é®ç«ç¹" align="center" prop="endpoint" width="200" /> |
| | | <el-table-column label="èªå®ä¹åå" align="center" prop="domain" width="200" /> |
| | | <el-table-column label="æ¡¶åç§°" align="center" prop="bucketName" /> |
| | | <el-table-column label="åç¼" align="center" prop="prefix" /> |
| | | <el-table-column label="å" align="center" prop="region" /> |
| | |
| | | <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-form-item label="é
ç½®key" prop="configKey"> |
| | | <el-select v-model="form.configKey" placeholder="è¯·éæ©é
ç½®key"> |
| | | <el-option |
| | | v-for="configKey in configKeyOptions" |
| | | :key="configKey.configKey" |
| | | :label="configKey.label" |
| | | :value="configKey.configKey" |
| | | /> |
| | | </el-select> |
| | | <el-input v-model="form.configKey" placeholder="请è¾å
¥é
ç½®key" /> |
| | | </el-form-item> |
| | | <el-form-item label="访é®ç«ç¹" prop="endpoint"> |
| | | <el-input v-model="form.endpoint" placeholder="请è¾å
¥è®¿é®ç«ç¹" /> |
| | | </el-form-item> |
| | | <el-form-item label="èªå®ä¹åå" prop="domain"> |
| | | <el-input v-model="form.domain" placeholder="请è¾å
¥èªå®ä¹åå" /> |
| | | </el-form-item> |
| | | <el-form-item label="accessKey" prop="accessKey"> |
| | | <el-input v-model="form.accessKey" placeholder="请è¾å
¥accessKey" /> |
| | |
| | | total: 0, |
| | | // 对象åå¨é
ç½®è¡¨æ ¼æ°æ® |
| | | ossConfigList: [], |
| | | // configKeyOptions |
| | | configKeyOptions: [], |
| | | configKeyDatas: [ |
| | | { configKey: "minio", label: "Minio" }, |
| | | { configKey: "qiniu", label: "ä¸çäº" }, |
| | | { configKey: "aliyun", label: "é¿éäº" }, |
| | | { configKey: "qcloud", label: "è
¾è®¯äº" }, |
| | | ], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.configKeyOptions = this.configKeyDatas; |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢å¯¹è±¡åå¨é
ç½®å表 */ |
| | |
| | | bucketName: undefined, |
| | | prefix: undefined, |
| | | endpoint: undefined, |
| | | domain: undefined, |
| | | isHttps: "N", |
| | | region: undefined, |
| | | status: "1", |
| | |
| | | bucket_name varchar(255) default '', |
| | | prefix varchar(255) default '', |
| | | endpoint varchar(255) default '', |
| | | domain varchar(255) default '', |
| | | is_https char(1) default 'N', |
| | | region varchar(255) default '', |
| | | status char(1) default '1', |
| | |
| | | comment on column sys_oss_config.bucket_name is 'æ¡¶åç§°'; |
| | | comment on column sys_oss_config.prefix is 'åç¼'; |
| | | comment on column sys_oss_config.endpoint is '访é®ç«ç¹'; |
| | | comment on column sys_oss_config.domain is 'èªå®ä¹åå'; |
| | | comment on column sys_oss_config.is_https is 'æ¯å¦httpsï¼Y=æ¯,N=å¦ï¼'; |
| | | comment on column sys_oss_config.region is 'å'; |
| | | comment on column sys_oss_config.status is 'ç¶æï¼0=æ£å¸¸,1=åç¨ï¼'; |
| | |
| | | comment on column sys_oss_config.update_by is 'æ´æ°è
'; |
| | | comment on column sys_oss_config.update_time is 'æ´æ°æ¶é´'; |
| | | |
| | | insert into sys_oss_config values (1, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', 'http://localhost:9000', 'N', '', '0', '', NULL, 'admin', sysdate, 'admin', sysdate); |
| | | insert into sys_oss_config values (2, 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'http://XXX.XXXX.com', 'N', 'z0', '1', '', NULL, 'admin', sysdate, 'admin', sysdate); |
| | | insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'http://oss-cn-beijing.aliyuncs.com', 'N', '', '1', '', NULL, 'admin', sysdate, 'admin', sysdate); |
| | | insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'http://cos.ap-beijing.myqcloud.com', 'N', 'ap-beijing', '1', '', NULL, 'admin', sysdate, 'admin', sysdate); |
| | | insert into sys_oss_config values (1, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', 'localhost:9000', '','N', '', '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', '', NULL, 'admin', sysdate, 'admin', sysdate); |
| | | insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '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', '', NULL, 'admin', sysdate, 'admin', sysdate); |
| | | insert into sys_oss_config values (5, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', 'localhost:9000', '','N', '', '1', '', NULL, 'admin', sysdate, 'admin', sysdate); |
| | | |
| | | |
| | | -- ---------------------------- |
| | | -- é©å ï¼ç¨äºsessionè¿æ¥ä¹å èªå¨è®¾ç½®é»è®¤çdateç±»åæ ¼å¼å ç®åæ¶é´æ¥è¯¢ |
| | |
| | | bucket_name varchar(255) default ''::varchar, |
| | | prefix varchar(255) default ''::varchar, |
| | | endpoint varchar(255) default ''::varchar, |
| | | domain varchar(255) default ''::varchar, |
| | | is_https char default 'N'::bpchar, |
| | | region varchar(255) default ''::varchar, |
| | | status char default '1'::bpchar, |
| | |
| | | comment on column sys_oss_config.bucket_name is 'æ¡¶åç§°'; |
| | | comment on column sys_oss_config.prefix is 'åç¼'; |
| | | comment on column sys_oss_config.endpoint is '访é®ç«ç¹'; |
| | | comment on column sys_oss_config.domain is 'èªå®ä¹åå'; |
| | | comment on column sys_oss_config.is_https is 'æ¯å¦httpsï¼Y=æ¯,N=å¦ï¼'; |
| | | comment on column sys_oss_config.region is 'å'; |
| | | comment on column sys_oss_config.status is 'ç¶æï¼0=æ£å¸¸,1=åç¨ï¼'; |
| | |
| | | comment on column sys_oss_config.update_time is 'æ´æ°æ¶é´'; |
| | | comment on column sys_oss_config.remark is '夿³¨'; |
| | | |
| | | insert into sys_oss_config values (1, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', 'http://localhost:9000', 'N', '', '0', '', 'admin', now(), 'admin', now(), null); |
| | | insert into sys_oss_config values (2, 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'http://XXX.XXXX.com', 'N', 'z0', '1', '', 'admin', now(), 'admin', now(), null); |
| | | insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'http://oss-cn-beijing.aliyuncs.com', 'N', '', '1', '', 'admin', now(), 'admin', now(), null); |
| | | insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'http://cos.ap-beijing.myqcloud.com', 'N', 'ap-beijing', '1', '', 'admin', now(), 'admin', now(), null); |
| | | insert into sys_oss_config values (1, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', 'localhost:9000', '','N', '', '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', '', 'admin', now(), 'admin', now(), null); |
| | | insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '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', '', 'admin', now(), 'admin', now(), null); |
| | | insert into sys_oss_config values (5, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', 'localhost:9000', '','N', '', '1', '', 'admin', now(), 'admin', now(), NULL); |
| | | |
| | |
| | | bucket_name varchar(255) default '' comment 'æ¡¶åç§°', |
| | | prefix varchar(255) default '' comment 'åç¼', |
| | | endpoint varchar(255) default '' comment '访é®ç«ç¹', |
| | | domain varchar(255) default '' comment 'èªå®ä¹åå', |
| | | is_https char(1) default 'N' comment 'æ¯å¦httpsï¼Y=æ¯,N=å¦ï¼', |
| | | region varchar(255) default '' comment 'å', |
| | | status char(1) default '1' comment 'ç¶æï¼0=æ£å¸¸,1=åç¨ï¼', |
| | |
| | | primary key (oss_config_id) |
| | | ) engine=innodb comment='对象åå¨é
置表'; |
| | | |
| | | insert into sys_oss_config values (1, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', 'http://localhost:9000', 'N', '', '0', '', 'admin', sysdate(), 'admin', sysdate(), NULL); |
| | | insert into sys_oss_config values (2, 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'http://XXX.XXXX.com', 'N', 'z0', '1', '', 'admin', sysdate(), 'admin', sysdate(), NULL); |
| | | insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'http://oss-cn-beijing.aliyuncs.com', 'N', '', '1', '', 'admin', sysdate(), 'admin', sysdate(), NULL); |
| | | insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'http://cos.ap-beijing.myqcloud.com', 'N', 'ap-beijing', '1', '', 'admin', sysdate(), 'admin', sysdate(), NULL); |
| | | insert into sys_oss_config values (1, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', 'localhost:9000', '','N', '', '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', '', 'admin', sysdate(), 'admin', sysdate(), NULL); |
| | | insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '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', '', 'admin', sysdate(), 'admin', sysdate(), NULL); |
| | | insert into sys_oss_config values (5, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', 'localhost:9000', '','N', '', '1', '', 'admin', sysdate(), 'admin', sysdate(), NULL); |
| | | |
| | |
| | | [bucket_name] nvarchar(255) DEFAULT '' NULL, |
| | | [prefix] nvarchar(255) DEFAULT '' NULL, |
| | | [endpoint] nvarchar(255) DEFAULT '' NULL, |
| | | [domain] nvarchar(255) DEFAULT '' NULL, |
| | | [is_https] nchar(1) DEFAULT ('N') NULL, |
| | | [region] nvarchar(255) DEFAULT '' NULL, |
| | | [status] nchar(1) DEFAULT ('1') NULL, |
| | |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'sys_oss_config', |
| | | 'COLUMN', N'endpoint' |
| | | GO |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'èªå®ä¹åå', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'sys_oss_config', |
| | | 'COLUMN', N'domain' |
| | | GO |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'æ¯å¦httpsï¼Y=æ¯,N=å¦ï¼', |
| | |
| | | 'TABLE', N'sys_oss_config' |
| | | GO |
| | | |
| | | INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [is_https], [region], [status], [ext1], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'minio', N'lihongbo', N'lihongbo.123', N'ruoyi', N'', N'http://81.70.150.73:9000', N'N', N'', N'0', N'', N'admin', getdate(), N'admin', getdate(), NULL) |
| | | INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [status], [ext1], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'minio', N'ruoyi', N'ruoyi123', N'ruoyi', N'', N'localhost:9000', N'',N'N', N'', N'0', N'', N'admin', getdate(), N'admin', getdate(), NULL) |
| | | GO |
| | | INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [is_https], [region], [status], [ext1], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2', N'qiniu', N'XXXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi', N'', N'http://XXX.XXXX.com', N'N', N'z0', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL) |
| | | INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [status], [ext1], [create_by], [create_time], [update_by], [update_time], [remark]) 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'', N'admin', getdate(), N'admin', getdate(), NULL) |
| | | GO |
| | | INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [is_https], [region], [status], [ext1], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'3', N'aliyun', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi', N'', N'http://oss-cn-beijing.aliyuncs.com', N'N', N'', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL) |
| | | INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [status], [ext1], [create_by], [create_time], [update_by], [update_time], [remark]) 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'', N'admin', getdate(), N'admin', getdate(), NULL) |
| | | GO |
| | | INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [is_https], [region], [status], [ext1], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'4', N'qcloud', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi-1250000000', N'', N'http://cos.ap-beijing.myqcloud.com', N'N', N'ap-beijing', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL) |
| | | INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [status], [ext1], [create_by], [create_time], [update_by], [update_time], [remark]) 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'', N'admin', getdate(), N'admin', getdate(), NULL) |
| | | GO |
| | | INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [status], [ext1], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'4', N'image', N'ruoyi', N'ruoyi123', N'ruoyi', N'image', N'localhost:9000', N'',N'N', N'', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL) |
| | | GO |
¶Ô±ÈÐÂÎļþ |
| | |
| | | ALTER TABLE "SYS_OSS_CONFIG" ADD ("DOMAIN" VARCHAR2(255)); |
| | | |
| | | COMMENT ON COLUMN "SYS_OSS_CONFIG"."DOMAIN" IS 'èªå®ä¹åå'; |
| | | |
| | | update sys_oss_config set endpoint = 'localhost:9000' where oss_config_id = 1; |
| | | update sys_oss_config set endpoint = 's3-cn-north-1.qiniucs.com', region = '' where oss_config_id = 2; |
| | | update sys_oss_config set endpoint = 'oss-cn-beijing.aliyuncs.com' where oss_config_id = 3; |
| | | update sys_oss_config set endpoint = 'cos.ap-beijing.myqcloud.com' where oss_config_id = 4; |
| | | |
| | | insert into sys_oss_config values (5, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', 'localhost:9000', '','N', '', '1', '', NULL, 'admin', sysdate, 'admin', sysdate); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | ALTER TABLE "sys_oss_config" ADD COLUMN "domain" varchar(255); |
| | | |
| | | COMMENT ON COLUMN "sys_oss_config"."domain" IS 'èªå®ä¹åå'; |
| | | |
| | | update sys_oss_config set endpoint = 'localhost:9000' where oss_config_id = 1; |
| | | update sys_oss_config set endpoint = 's3-cn-north-1.qiniucs.com', region = '' where oss_config_id = 2; |
| | | update sys_oss_config set endpoint = 'oss-cn-beijing.aliyuncs.com' where oss_config_id = 3; |
| | | update sys_oss_config set endpoint = 'cos.ap-beijing.myqcloud.com' where oss_config_id = 4; |
| | | |
| | | insert into sys_oss_config values (5, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', 'localhost:9000', '','N', '', '1', '', 'admin', now(), 'admin', now(), NULL); |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | ALTER TABLE [sys_oss_config] ADD [domain] nvarchar(255) DEFAULT '' NULL |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'èªå®ä¹åå', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'sys_oss_config', |
| | | 'COLUMN', N'domain' |
| | | GO |
| | | |
| | | UPDATE [sys_oss_config] SET [access_key] = N'ruoyi', [secret_key] = N'ruoyi123', [endpoint] = N'localhost:9000' WHERE [oss_config_id] = 1 |
| | | GO |
| | | |
| | | UPDATE [sys_oss_config] SET [endpoint] = N's3-cn-north-1.qiniucs.com' WHERE [oss_config_id] = 2 |
| | | GO |
| | | |
| | | UPDATE [sys_oss_config] SET [endpoint] = N'oss-cn-beijing.aliyuncs.com' WHERE [oss_config_id] = 3 |
| | | GO |
| | | |
| | | UPDATE [sys_oss_config] SET [endpoint] = N'cos.ap-beijing.myqcloud.com' WHERE [oss_config_id] = 4 |
| | | GO |
| | | |
| | | INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [status], [ext1], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'4', N'image', N'ruoyi', N'ruoyi123', N'ruoyi', N'image', N'localhost:9000', N'',N'N', N'', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL) |
| | | GO |
¶Ô±ÈÐÂÎļþ |
| | |
| | | alter table sys_oss_config add column domain varchar(255) null default '' COMMENT 'èªå®ä¹åå'; |
| | | |
| | | update sys_oss_config set endpoint = 'localhost:9000' where oss_config_id = 1; |
| | | update sys_oss_config set endpoint = 's3-cn-north-1.qiniucs.com', region = '' where oss_config_id = 2; |
| | | update sys_oss_config set endpoint = 'oss-cn-beijing.aliyuncs.com' where oss_config_id = 3; |
| | | update sys_oss_config set endpoint = 'cos.ap-beijing.myqcloud.com' where oss_config_id = 4; |
| | | |
| | | insert into sys_oss_config values (5, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', 'localhost:9000', '','N', '', '1', '', 'admin', sysdate(), 'admin', sysdate(), NULL); |
| | | |