feat: 返回当前用户该厂商所有数据
This commit is contained in:
@@ -141,7 +141,6 @@ public class SchisandraOssAliController {
|
||||
log.error("SchisandraOssAliController.register.error:{}", e.getMessage(), e);
|
||||
return Result.fail("新增失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -390,56 +389,10 @@ public class SchisandraOssAliController {
|
||||
|
||||
|
||||
private void parameterCheck(SchisandraOssAliDTO schisandraOssAliDTO) {
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getUserId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getEndpoint(), "OSS地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getAccessKeyId(), "AccessKey ID不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getAccessKeySecret(), "AccessKey Secret不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getSecurityToken(), "security Token不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getBucketName(), "Bucket名称不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getBasePath(), "数据存储路径不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getUserAgent(), "用户代理,指HTTP的User-Agent头。默认为aliyun-sdk-java。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getMaxErrorRetry(), "请求失败后最大的重试次数。默认3次。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getConnectionRequestTimeout(), "从连接池中获取连接的超时时间(单位:毫秒)。默认不超时。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getConnectionTimeout(), "建立连接的超时时间(单位:毫秒)。默认为50000毫秒。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getSocketTimeout(), "Socket层传输数据的超时时间(单位:毫秒)。默认为50000毫秒。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getMaxConnections(), "允许打开的最大HTTP连接数。默认为1024不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getConnectionTTL(), "连接TTL (生存时间)。Http连接由连接管理器用TTL缓存。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getUseReaper(), "是否使用com.aliyun.oss.common.comm.IdleConnectionReaper管理过期连接,默认开启不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getIdleConnectionTime(), "连接空闲超时时间,超时则关闭连接(单位:毫秒)。默认为60000毫秒。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getProtocol(), "连接OSS所采用的协议(HTTP或HTTPS),默认为HTTP。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getProxyHost(), "代理服务器主机地址。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getProxyPort(), "代理服务器端口。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getProxyUsername(), "代理服务器验证的用户名。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getProxyPassword(), "代理服务器验证的密码。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getProxyDomain(), "代理服务器的域,该域可以执行NTLM认证不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getProxyWorkstation(), "代理主机的NTLM身份验证服务器不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getSupportCname(), "是否支持CNAME作为Endpoint,默认支持CNAME。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getCnameExcludeList(), "设置不可变排除的CName列表 ---- 任何以该列表中的项目结尾的域都不会进行Cname解析。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getSldEnabled(), "是否开启二级域名(Second Level Domain)的访问方式,默认不开启。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getRequestTimeout(), "请求超时时间,单位:毫秒。默认情况下是5分钟。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getRequestTimeoutEnabled(), "是否启用请求超时校验。默认情况下,它是禁用的。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getSlowRequestsThreshold(), "设置慢请求的延迟阈值。如果请求的延迟大于延迟,则将记录该请求。默认情况下,阈值为5分钟。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getDefaultHeaders(), "设置默认的http头。所有请求头将自动添加到每个请求中。如果在请求中也指定了相同的请求头,则默认的标头将被覆盖。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getCrcCheckEnabled(), "是否在上传和下载时启用CRC校验,默认启用不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getSignatureVersion(), "所有请求设置签名版本不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getTickOffset(), "设置OSS服务端时间和本地时间之间的差异,以毫秒为单位。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getRedirectEnable(), "是否开启HTTP重定向。 说明: Java SDK 3.10.1及以上版本支持设置是否开启HTTP重定向,默认开启。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getVerifySSLEnable(), "是否开启SSL证书校验。 * 说明: Java SDK 3.10.1及以上版本支持设置是否开启SSL证书校验,默认开启。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getLogConnectionPoolStats(), "是否开启日志记录连接池统计信息不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getUseSystemPropertyValues(), "是否使用系统属性值不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getPartSize(), "分片大小,默认5MB不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getStatus(), "状态不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getCreatedBy(), "创建人不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getCreatedTime(), "创建时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getUpdateTime(), "更新时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getUpdateBy(), "更新人不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getExtraJson(), "额外字段不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssAliDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -420,7 +420,6 @@ public class SchisandraOssMinioController {
|
||||
* 新增
|
||||
*/
|
||||
@PostMapping("add")
|
||||
@RequestMapping("add")
|
||||
public Result<Boolean> addMinioOss(@RequestBody SchisandraOssMinioDTO schisandraOssMinioDTO) {
|
||||
|
||||
try {
|
||||
@@ -428,14 +427,13 @@ public class SchisandraOssMinioController {
|
||||
log.info("SchisandraOssMinioController.add.dto:{}", JSON.toJSONString(schisandraOssMinioDTO));
|
||||
}
|
||||
|
||||
// parameterCheck(schisandraOssMinioDTO);
|
||||
parameterCheck(schisandraOssMinioDTO);
|
||||
SchisandraOssMinioBO SchisandraOssMinioBO = SchisandraOssMinioDTOConverter.INSTANCE.convertDTOToBO(schisandraOssMinioDTO);
|
||||
return Result.ok(schisandraOssMinioDomainService.add(SchisandraOssMinioBO));
|
||||
} catch (Exception e) {
|
||||
log.error("SchisandraOssMinioController.register.error:{}", e.getMessage(), e);
|
||||
return Result.fail("新增失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -497,39 +495,12 @@ public class SchisandraOssMinioController {
|
||||
|
||||
|
||||
private void parameterCheck(SchisandraOssMinioDTO schisandraOssMinioDTO) {
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getUserId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getEndpoint(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getAccessKey(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getSecretKey(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getBucketName(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getPort(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getBasePath(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getFileHost(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getDownloadHost(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getUploadHost(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getConnectTimeout(), "连接超时时间(单位:毫秒)不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getWriteTimeout(), "写超时时间(单位:毫秒)不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getReadTimeout(), "读超时时间(单位:毫秒)不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getCallTimeout(), "调用超时时间(单位:毫秒)不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getFollowRedirects(), "是否支持重定向,默认支持不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getFollowSslRedirects(), "是否支持HTTP到HTTPS,HTTPS到HTTP的重定向,默认支持不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getRetryOnConnectionFailure(), "是否开始连接失败重试,默认不支持不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getPingInterval(), "连接健康检测间隔时长(单位:毫秒)不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getPartSize(), "分片大小,默认5MB不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getImgSize(), "图片大小限制,单位:m不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getFileSize(), "文件大小限制,单位:m不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getExtraJson(), "额外json不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getStatus(), "状态不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getCreatedBy(), "创建人不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getCreatedTime(), "创建时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getUpdateTime(), "更新时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getUpdateBy(), "更新人不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssMinioDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -372,7 +372,6 @@ public class SchisandraOssQiniuController {
|
||||
if (log.isInfoEnabled()) {
|
||||
log.info("SchisandraOssQiniuController.update.dto:{}", JSON.toJSONString(schisandraOssQiniuDTO));
|
||||
}
|
||||
|
||||
SchisandraOssQiniuBO schisandraOssQiniuBO = SchisandraOssQiniuDTOConverter.INSTANCE.convertDTOToBO(schisandraOssQiniuDTO);
|
||||
return Result.ok(schisandraOssQiniuDomainService.update(schisandraOssQiniuBO));
|
||||
} catch (Exception e) {
|
||||
|
@@ -61,6 +61,20 @@ public class SchisandraOssTencentController {
|
||||
@Resource
|
||||
private SchisandraOssTencentDomainService schisandraOssTencentDomainService;
|
||||
|
||||
/**
|
||||
* 返回当前用户tencent表所有数据
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("return_online")
|
||||
public Result returnOnline(Long userId) {
|
||||
List<SchisandraOssTencentBO> list = schisandraOssTencentDomainService.selectAllPresent(userId);
|
||||
if(list.isEmpty()){
|
||||
return Result.fail();
|
||||
}
|
||||
return Result.ok(SchisandraOssTencentDTOConverter.INSTANCE.convertBOToDTOList(list));
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回tencent表所有数据
|
||||
*
|
||||
@@ -388,42 +402,7 @@ public class SchisandraOssTencentController {
|
||||
if (log.isInfoEnabled()) {
|
||||
log.info("SchisandraOssTencentController.delete.dto:{}", JSON.toJSONString(schisandraOssTencentDTO));
|
||||
}
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getUserId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getBasePath(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getBucketName(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getSecretId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getSecretKey(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getRegion(), "地域不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getHttpProtocol(), "连接OSS所采用的协议(HTTP或HTTPS),默认为HTTPS。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getEndPointSuffix(), "域名后缀不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getHttpProxyIp(), "http proxy代理,如果使用http proxy代理,需要设置IP与端口不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getHttpProxyPort(), "代理服务器端口不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getProxyUserName(), "代理服务器验证的用户名。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getProxyPassword(), "代理服务器验证的密码。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getUseBasicAuth(), "是否使用基本身份验证不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getSignExpired(), "多次签名的过期时间,单位秒不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getConnectionRequestTimeout(), "获取连接的超时时间, 单位ms不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getConnectionTimeout(), "默认连接超时, 单位ms不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getSocketTimeout(), "SOCKET读取超时时间, 单位ms不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getMaxConnectionsCount(), "最大HTTP连接数不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getIdleConnectionAlive(), "空闲连接存活时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getUserAgent(), "user_agent标识不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getReadLimit(), "读取限制不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getCiSpecialRequest(), "数据万象特殊请求配置不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getMaxErrorRetry(), "请求失败后最大的重试次数。默认3次。不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getExtraJson(), "额外json不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getStatus(), "状态不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getCreatedBy(), "创建人不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getCreatedTime(), "创建时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getUpdateTime(), "更新时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getUpdateBy(), "更新人不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getPartSize(), "分片大小,默认5MB不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
|
||||
extracted(schisandraOssTencentDTO);
|
||||
SchisandraOssTencentBO schisandraOssTencentBO = SchisandraOssTencentDTOConverter.INSTANCE.convertDTOToBO(schisandraOssTencentDTO);
|
||||
return Result.ok(schisandraOssTencentDomainService.delete(schisandraOssTencentBO));
|
||||
} catch (Exception e) {
|
||||
@@ -433,4 +412,13 @@ public class SchisandraOssTencentController {
|
||||
|
||||
}
|
||||
|
||||
private static void extracted(SchisandraOssTencentDTO schisandraOssTencentDTO) {
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getUserId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getBasePath(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getBucketName(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getSecretId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getSecretKey(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraOssTencentDTO.getRegion(), "地域不能为空");
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user