feat: oss模块生成代码

This commit is contained in:
landaiqing
2024-06-02 22:32:43 +08:00
parent a9d0bb01cc
commit b1788c7676
184 changed files with 12976 additions and 64 deletions

View File

@@ -8,7 +8,7 @@
# 数据库连接信息
jdbc:
dbName: schisandra-cloud-storage
tableName: schisandra_oss_aws
tableName: schisandra_oss_wangyi
url: jdbc:mysql://1.95.0.111:3306/
username: root
password: LDQ20020618xxx
@@ -24,7 +24,7 @@ params:
# 模块
module: oss
# controller 通用前缀
api: /oss/aws/
api: /oss/wangyi
# 生成对象是否移除前缀
removePre: false
# 使用内置函数赋值给变量 FunctionUtils 中替换

View File

@@ -21,7 +21,7 @@ import javax.annotation.Resource;
* @since 2024-06-02 21:48:16
*/
@RestController
@RequestMapping("/oss/aws//")
@RequestMapping("/oss/aws/")
@Slf4j
public class SchisandraOssAwsController {

View File

@@ -2,7 +2,6 @@ package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssBaiduDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssBaiduDTO;
import com.schisandra.oss.common.entity.Result;
@@ -16,13 +15,13 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* controller
* 百度云对象存储配置表 controller
*
* @author landaiqing
* @since 2024-05-17 21:17:28
* @since 2024-06-02 22:02:15
*/
@RestController
@RequestMapping("/oss/")
@RequestMapping("/oss/baidu/")
@Slf4j
public class SchisandraOssBaiduController {
@@ -30,7 +29,7 @@ public class SchisandraOssBaiduController {
private SchisandraOssBaiduDomainService schisandraOssBaiduDomainService;
/**
* 新增
* 新增百度云对象存储配置表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssBaiduDTO schisandraOssBaiduDTO) {
@@ -83,13 +82,13 @@ public class SchisandraOssBaiduController {
return Result.ok(schisandraOssBaiduDomainService.add(SchisandraOssBaiduBO));
} catch (Exception e) {
log.error("SchisandraOssBaiduController.register.error:{}", e.getMessage(), e);
return Result.fail("新增失败");
return Result.fail("新增百度云对象存储配置表失败");
}
}
/**
* 修改
* 修改百度云对象存储配置表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssBaiduDTO schisandraOssBaiduDTO) {
@@ -142,13 +141,13 @@ public class SchisandraOssBaiduController {
return Result.ok(schisandraOssBaiduDomainService.update(schisandraOssBaiduBO));
} catch (Exception e) {
log.error("SchisandraOssBaiduController.update.error:{}", e.getMessage(), e);
return Result.fail("更新信息失败");
return Result.fail("更新百度云对象存储配置表信息失败");
}
}
/**
* 删除
* 删除百度云对象存储配置表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssBaiduDTO schisandraOssBaiduDTO) {
@@ -201,7 +200,7 @@ public class SchisandraOssBaiduController {
return Result.ok(schisandraOssBaiduDomainService.delete(schisandraOssBaiduBO));
} catch (Exception e) {
log.error("SchisandraOssBaiduController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除信息失败");
return Result.fail("删除百度云对象存储配置表信息失败");
}
}

View File

@@ -0,0 +1,160 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssFtpDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssFtpDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssFtpBO;
import com.schisandra.oss.domain.service.SchisandraOssFtpDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* ftp存储配置表 controller
*
* @author landaiqing
* @since 2024-06-02 21:54:20
*/
@RestController
@RequestMapping("/oss/ftp/")
@Slf4j
public class SchisandraOssFtpController {
@Resource
private SchisandraOssFtpDomainService schisandraOssFtpDomainService;
/**
* 新增ftp存储配置表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssFtpDTO schisandraOssFtpDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssFtpController.add.dto:{}", JSON.toJSONString(schisandraOssFtpDTO));
}
Preconditions.checkNotNull(schisandraOssFtpDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getHost(), "主机不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getPort(), "端口不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getUser(), "用户名不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getPassword(), "密码不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getCharset(), "编码不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getMode(), "FTP连接模式,默认被动不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getBackToPwd(), "设置执行完操作是否返回当前目录,默认false不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getConnectionTimeout(), "连接超时时长,单位毫秒不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getSoTimeout(), "Socket连接超时时长单位毫秒不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getServerLanguageCode(), "设置服务器语言不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getSystemKey(), "设置服务器系统关键词不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssFtpBO SchisandraOssFtpBO = SchisandraOssFtpDTOConverter.INSTANCE.convertDTOToBO(schisandraOssFtpDTO);
return Result.ok(schisandraOssFtpDomainService.add(SchisandraOssFtpBO));
} catch (Exception e) {
log.error("SchisandraOssFtpController.register.error:{}", e.getMessage(), e);
return Result.fail("新增ftp存储配置表失败");
}
}
/**
* 修改ftp存储配置表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssFtpDTO schisandraOssFtpDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssFtpController.update.dto:{}", JSON.toJSONString(schisandraOssFtpDTO));
}
Preconditions.checkNotNull(schisandraOssFtpDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getHost(), "主机不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getPort(), "端口不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getUser(), "用户名不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getPassword(), "密码不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getCharset(), "编码不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getMode(), "FTP连接模式,默认被动不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getBackToPwd(), "设置执行完操作是否返回当前目录,默认false不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getConnectionTimeout(), "连接超时时长,单位毫秒不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getSoTimeout(), "Socket连接超时时长单位毫秒不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getServerLanguageCode(), "设置服务器语言不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getSystemKey(), "设置服务器系统关键词不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssFtpBO schisandraOssFtpBO = SchisandraOssFtpDTOConverter.INSTANCE.convertDTOToBO(schisandraOssFtpDTO);
return Result.ok(schisandraOssFtpDomainService.update(schisandraOssFtpBO));
} catch (Exception e) {
log.error("SchisandraOssFtpController.update.error:{}", e.getMessage(), e);
return Result.fail("更新ftp存储配置表信息失败");
}
}
/**
* 删除ftp存储配置表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssFtpDTO schisandraOssFtpDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssFtpController.delete.dto:{}", JSON.toJSONString(schisandraOssFtpDTO));
}
Preconditions.checkNotNull(schisandraOssFtpDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getHost(), "主机不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getPort(), "端口不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getUser(), "用户名不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getPassword(), "密码不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getCharset(), "编码不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getMode(), "FTP连接模式,默认被动不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getBackToPwd(), "设置执行完操作是否返回当前目录,默认false不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getConnectionTimeout(), "连接超时时长,单位毫秒不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getSoTimeout(), "Socket连接超时时长单位毫秒不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getServerLanguageCode(), "设置服务器语言不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getSystemKey(), "设置服务器系统关键词不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssFtpDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssFtpBO schisandraOssFtpBO = SchisandraOssFtpDTOConverter.INSTANCE.convertDTOToBO(schisandraOssFtpDTO);
return Result.ok(schisandraOssFtpDomainService.delete(schisandraOssFtpBO));
} catch (Exception e) {
log.error("SchisandraOssFtpController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除ftp存储配置表信息失败");
}
}
}

View File

@@ -0,0 +1,229 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssHuaweiDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssHuaweiDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssHuaweiBO;
import com.schisandra.oss.domain.service.SchisandraOssHuaweiDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 华为云对象存储配置表 controller
*
* @author landaiqing
* @since 2024-06-02 21:59:56
*/
@RestController
@RequestMapping("/oss/huawei/")
@Slf4j
public class SchisandraOssHuaweiController {
@Resource
private SchisandraOssHuaweiDomainService schisandraOssHuaweiDomainService;
/**
* 新增华为云对象存储配置表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssHuaweiDTO schisandraOssHuaweiDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssHuaweiController.add.dto:{}", JSON.toJSONString(schisandraOssHuaweiDTO));
}
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSecretKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getEndPoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getConnectionTimeout(), "建立HTTP/HTTPS连接的超时时间单位毫秒。默认为60000毫秒。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getIdleConnectionTime(), "如果空闲时间超过此参数的设定值则关闭连接单位毫秒。默认为30000毫秒。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getMaxIdleConnections(), "连接池中最大空闲连接数默认值1000。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getMaxConnections(), "最大允许的HTTP并发请求数。默认为1000。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getMaxErrorRetry(), "请求失败请求异常、服务端报500或503错误等后最大的重试次数。默认3次。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSocketTimeout(), "Socket层传输数据的超时时间单位毫秒。默认为60000毫秒。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getEndpointHttpPort(), "设置HTTP请求的端口号 (默认为80)。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getEndpointHttpsPort(), "定是否使用HTTPS连接OBS (默认为 “true”)。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getHttpsOnly(), "定是否使用HTTPS连接OBS (默认为 “true”)。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getPathStyle(), "指定是否启用对OBS的路径样式访问。“true” 表示启用了路径样式的访问,而 “false” (默认) 表示启用了虚拟托管样式的访问。注意: 如果启用了路径样式访问则不支持OBS 3.0的新bucket功能。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getHttpProxy(), "HTTP代理配置。默认为空。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getUploadStreamRetryBufferSize(), "上传流对象时使用的缓存大小单位字节。默认为512KB。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getValidateCertificate(), "是否验证服务端证书。默认为false。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getVerifyResponseContentType(), "是否验证响应头信息的ContentType。默认为true。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getReadBufferSize(), "从Socket流下载对象的缓存大小单位字节-1表示不设置缓存。默认为-1。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getWriteBufferSize(), "上传对象到Socket流时的缓存大小单位字节-1表示不设置缓存。默认为-1。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getIsStrictHostnameVerification(), "是否严格验证服务端主机名。默认为false。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getAuthType(), "设置身份验证类型。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSocketWriteBufferSize(), "Socket发送缓冲区大小单位字节对应java.net.SocketOptions.SO_SNDBUF参数。默认为-1表示不设置。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSocketReadBufferSize(), "Socket接收缓冲区大小单位字节对应java.net.SocketOptions.SO_RCVBUF参数。默认为-1表示不设置。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getKeepAlive(), "是否使用长连接访问OBS服务。默认为true。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getAuthTypeNegotiation(), "指定是否使用协议协商。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCname(), "是否通过自定义域名访问OBS服务。默认为false。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getDelimiter(), "将文件夹隔离器设置为斜线。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSslProvider(), "SSLContext的Provider默认使用JDK提供的SSLContext。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getHttpProtocolType(), "访问OBS服务端时使用的HTTP协议类型。默认为HTTP1.1协议。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getRetryOnConnectionFailureInOkhttp(), "是否开启Okhttp中的连接失败重试默认关闭不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getMaxRetryOnUnexpectedEndException(), "发生异常时最大重试次数不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssHuaweiBO SchisandraOssHuaweiBO = SchisandraOssHuaweiDTOConverter.INSTANCE.convertDTOToBO(schisandraOssHuaweiDTO);
return Result.ok(schisandraOssHuaweiDomainService.add(SchisandraOssHuaweiBO));
} catch (Exception e) {
log.error("SchisandraOssHuaweiController.register.error:{}", e.getMessage(), e);
return Result.fail("新增华为云对象存储配置表失败");
}
}
/**
* 修改华为云对象存储配置表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssHuaweiDTO schisandraOssHuaweiDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssHuaweiController.update.dto:{}", JSON.toJSONString(schisandraOssHuaweiDTO));
}
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSecretKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getEndPoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getConnectionTimeout(), "建立HTTP/HTTPS连接的超时时间单位毫秒。默认为60000毫秒。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getIdleConnectionTime(), "如果空闲时间超过此参数的设定值则关闭连接单位毫秒。默认为30000毫秒。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getMaxIdleConnections(), "连接池中最大空闲连接数默认值1000。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getMaxConnections(), "最大允许的HTTP并发请求数。默认为1000。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getMaxErrorRetry(), "请求失败请求异常、服务端报500或503错误等后最大的重试次数。默认3次。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSocketTimeout(), "Socket层传输数据的超时时间单位毫秒。默认为60000毫秒。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getEndpointHttpPort(), "设置HTTP请求的端口号 (默认为80)。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getEndpointHttpsPort(), "定是否使用HTTPS连接OBS (默认为 “true”)。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getHttpsOnly(), "定是否使用HTTPS连接OBS (默认为 “true”)。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getPathStyle(), "指定是否启用对OBS的路径样式访问。“true” 表示启用了路径样式的访问,而 “false” (默认) 表示启用了虚拟托管样式的访问。注意: 如果启用了路径样式访问则不支持OBS 3.0的新bucket功能。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getHttpProxy(), "HTTP代理配置。默认为空。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getUploadStreamRetryBufferSize(), "上传流对象时使用的缓存大小单位字节。默认为512KB。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getValidateCertificate(), "是否验证服务端证书。默认为false。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getVerifyResponseContentType(), "是否验证响应头信息的ContentType。默认为true。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getReadBufferSize(), "从Socket流下载对象的缓存大小单位字节-1表示不设置缓存。默认为-1。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getWriteBufferSize(), "上传对象到Socket流时的缓存大小单位字节-1表示不设置缓存。默认为-1。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getIsStrictHostnameVerification(), "是否严格验证服务端主机名。默认为false。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getAuthType(), "设置身份验证类型。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSocketWriteBufferSize(), "Socket发送缓冲区大小单位字节对应java.net.SocketOptions.SO_SNDBUF参数。默认为-1表示不设置。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSocketReadBufferSize(), "Socket接收缓冲区大小单位字节对应java.net.SocketOptions.SO_RCVBUF参数。默认为-1表示不设置。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getKeepAlive(), "是否使用长连接访问OBS服务。默认为true。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getAuthTypeNegotiation(), "指定是否使用协议协商。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCname(), "是否通过自定义域名访问OBS服务。默认为false。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getDelimiter(), "将文件夹隔离器设置为斜线。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSslProvider(), "SSLContext的Provider默认使用JDK提供的SSLContext。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getHttpProtocolType(), "访问OBS服务端时使用的HTTP协议类型。默认为HTTP1.1协议。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getRetryOnConnectionFailureInOkhttp(), "是否开启Okhttp中的连接失败重试默认关闭不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getMaxRetryOnUnexpectedEndException(), "发生异常时最大重试次数不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssHuaweiBO schisandraOssHuaweiBO = SchisandraOssHuaweiDTOConverter.INSTANCE.convertDTOToBO(schisandraOssHuaweiDTO);
return Result.ok(schisandraOssHuaweiDomainService.update(schisandraOssHuaweiBO));
} catch (Exception e) {
log.error("SchisandraOssHuaweiController.update.error:{}", e.getMessage(), e);
return Result.fail("更新华为云对象存储配置表信息失败");
}
}
/**
* 删除华为云对象存储配置表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssHuaweiDTO schisandraOssHuaweiDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssHuaweiController.delete.dto:{}", JSON.toJSONString(schisandraOssHuaweiDTO));
}
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSecretKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getEndPoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getConnectionTimeout(), "建立HTTP/HTTPS连接的超时时间单位毫秒。默认为60000毫秒。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getIdleConnectionTime(), "如果空闲时间超过此参数的设定值则关闭连接单位毫秒。默认为30000毫秒。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getMaxIdleConnections(), "连接池中最大空闲连接数默认值1000。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getMaxConnections(), "最大允许的HTTP并发请求数。默认为1000。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getMaxErrorRetry(), "请求失败请求异常、服务端报500或503错误等后最大的重试次数。默认3次。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSocketTimeout(), "Socket层传输数据的超时时间单位毫秒。默认为60000毫秒。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getEndpointHttpPort(), "设置HTTP请求的端口号 (默认为80)。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getEndpointHttpsPort(), "定是否使用HTTPS连接OBS (默认为 “true”)。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getHttpsOnly(), "定是否使用HTTPS连接OBS (默认为 “true”)。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getPathStyle(), "指定是否启用对OBS的路径样式访问。“true” 表示启用了路径样式的访问,而 “false” (默认) 表示启用了虚拟托管样式的访问。注意: 如果启用了路径样式访问则不支持OBS 3.0的新bucket功能。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getHttpProxy(), "HTTP代理配置。默认为空。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getUploadStreamRetryBufferSize(), "上传流对象时使用的缓存大小单位字节。默认为512KB。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getValidateCertificate(), "是否验证服务端证书。默认为false。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getVerifyResponseContentType(), "是否验证响应头信息的ContentType。默认为true。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getReadBufferSize(), "从Socket流下载对象的缓存大小单位字节-1表示不设置缓存。默认为-1。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getWriteBufferSize(), "上传对象到Socket流时的缓存大小单位字节-1表示不设置缓存。默认为-1。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getIsStrictHostnameVerification(), "是否严格验证服务端主机名。默认为false。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getAuthType(), "设置身份验证类型。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSocketWriteBufferSize(), "Socket发送缓冲区大小单位字节对应java.net.SocketOptions.SO_SNDBUF参数。默认为-1表示不设置。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSocketReadBufferSize(), "Socket接收缓冲区大小单位字节对应java.net.SocketOptions.SO_RCVBUF参数。默认为-1表示不设置。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getKeepAlive(), "是否使用长连接访问OBS服务。默认为true。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getAuthTypeNegotiation(), "指定是否使用协议协商。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCname(), "是否通过自定义域名访问OBS服务。默认为false。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getDelimiter(), "将文件夹隔离器设置为斜线。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getSslProvider(), "SSLContext的Provider默认使用JDK提供的SSLContext。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getHttpProtocolType(), "访问OBS服务端时使用的HTTP协议类型。默认为HTTP1.1协议。不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getRetryOnConnectionFailureInOkhttp(), "是否开启Okhttp中的连接失败重试默认关闭不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getMaxRetryOnUnexpectedEndException(), "发生异常时最大重试次数不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssHuaweiDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssHuaweiBO schisandraOssHuaweiBO = SchisandraOssHuaweiDTOConverter.INSTANCE.convertDTOToBO(schisandraOssHuaweiDTO);
return Result.ok(schisandraOssHuaweiDomainService.delete(schisandraOssHuaweiBO));
} catch (Exception e) {
log.error("SchisandraOssHuaweiController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除华为云对象存储配置表信息失败");
}
}
}

View File

@@ -0,0 +1,253 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssJdDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssJdDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssJdBO;
import com.schisandra.oss.domain.service.SchisandraOssJdDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 京东云对象存储配置表 controller
*
* @author landaiqing
* @since 2024-06-02 22:07:10
*/
@RestController
@RequestMapping("/oss/jd/")
@Slf4j
public class SchisandraOssJdController {
@Resource
private SchisandraOssJdDomainService schisandraOssJdDomainService;
/**
* 新增京东云对象存储配置表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssJdDTO schisandraOssJdDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJdController.add.dto:{}", JSON.toJSONString(schisandraOssJdDTO));
}
Preconditions.checkNotNull(schisandraOssJdDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getEndpoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSecretKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getRegion(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getConnectionTimeout(), "建立连接的超时时间单位毫秒。默认为50000毫秒不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getMaxConnections(), "允许打开的最大HTTP连接数。默认为1024不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getMaxErrorRetry(), "请求失败后最大的重试次数不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getThrottleRetries(), "是否限制重试的默认值。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProtocol(), "连接协议类型不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyProtocol(), "连接到HTTP代理时要使用的协议。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyDomain(), "访问NTLM验证的代理服务器的Windows域名不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyHost(), "代理服务器主机地址不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyPassword(), "代理服务器验证的密码不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyPort(), "代理服务器端口不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyUsername(), "代理服务器验证的用户名不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyWorkstation(), "NTLM代理服务器的Windows工作站名称不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getNonProxyHosts(), "指定不通过代理应访问的主机。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getDisableSocketProxy(), "是否禁用Socket代理不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getPreemptiveBasicProxyAuth(), "是否使用基本身份验证对代理服务器进行抢先身份验证不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSocketTimeout(), "Socket层传输数据的超时时间单位毫秒。默认为50000毫秒不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getRequestTimeout(), "请求的默认超时时间。默认为0禁用的。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getClientExecutionTimeout(), "请求的默认超时时间。默认为0禁用的。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUserAgentPrefix(), "公共HTTP请求头前缀。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUseReaper(), "是否使用com.amazonaws.http.IdleConnectionReaper管理旧连接不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUseGzip(), "是否使用gzip解压缩不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSocketSendBufferSizeHint(), "Socket发送缓冲区的大小提示(以字节为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSocketReceiveBufferSizeHint(), "Socket接收缓冲区的大小提示(以字节为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSignerOverride(), "设置签名算法对请求进行签名。如果未明确设置客户端将通过提取SDK中的配置文件来确定要使用的算法不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getResponseMetadataCacheSize(), "响应元数据缓存大小不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUseExpectContinue(), "是否使用USE_EXPECT_CONTINUE作为期望值不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCacheResponseMetadata(), "是否缓存响应元数据不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getConnectionTTL(), "连接TTL (生存时间)。Http连接由连接管理器用TTL缓存。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getConnectionMaxIdleMillis(), "连接池中连接的最大空闲时间 (以毫秒为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getValidateAfterInActivityMillis(), "在必须验证连接是否仍处于打开状态之前,连接可以在连接池中处于空闲状态。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getTcpKeepAlive(), "是否使用TCP KeepAlive的默认值。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getHeaders(), "所有请求的公共请求头不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getMaxConsecutiveRetriesBeforeThrottling(), "请求失败最大重试次数不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getDisableHostPrefixInjection(), "是否禁用主机前缀不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getRetryMode(), "重试模式不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssJdBO SchisandraOssJdBO = SchisandraOssJdDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJdDTO);
return Result.ok(schisandraOssJdDomainService.add(SchisandraOssJdBO));
} catch (Exception e) {
log.error("SchisandraOssJdController.register.error:{}", e.getMessage(), e);
return Result.fail("新增京东云对象存储配置表失败");
}
}
/**
* 修改京东云对象存储配置表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssJdDTO schisandraOssJdDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJdController.update.dto:{}", JSON.toJSONString(schisandraOssJdDTO));
}
Preconditions.checkNotNull(schisandraOssJdDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getEndpoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSecretKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getRegion(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getConnectionTimeout(), "建立连接的超时时间单位毫秒。默认为50000毫秒不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getMaxConnections(), "允许打开的最大HTTP连接数。默认为1024不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getMaxErrorRetry(), "请求失败后最大的重试次数不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getThrottleRetries(), "是否限制重试的默认值。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProtocol(), "连接协议类型不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyProtocol(), "连接到HTTP代理时要使用的协议。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyDomain(), "访问NTLM验证的代理服务器的Windows域名不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyHost(), "代理服务器主机地址不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyPassword(), "代理服务器验证的密码不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyPort(), "代理服务器端口不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyUsername(), "代理服务器验证的用户名不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyWorkstation(), "NTLM代理服务器的Windows工作站名称不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getNonProxyHosts(), "指定不通过代理应访问的主机。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getDisableSocketProxy(), "是否禁用Socket代理不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getPreemptiveBasicProxyAuth(), "是否使用基本身份验证对代理服务器进行抢先身份验证不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSocketTimeout(), "Socket层传输数据的超时时间单位毫秒。默认为50000毫秒不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getRequestTimeout(), "请求的默认超时时间。默认为0禁用的。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getClientExecutionTimeout(), "请求的默认超时时间。默认为0禁用的。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUserAgentPrefix(), "公共HTTP请求头前缀。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUseReaper(), "是否使用com.amazonaws.http.IdleConnectionReaper管理旧连接不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUseGzip(), "是否使用gzip解压缩不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSocketSendBufferSizeHint(), "Socket发送缓冲区的大小提示(以字节为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSocketReceiveBufferSizeHint(), "Socket接收缓冲区的大小提示(以字节为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSignerOverride(), "设置签名算法对请求进行签名。如果未明确设置客户端将通过提取SDK中的配置文件来确定要使用的算法不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getResponseMetadataCacheSize(), "响应元数据缓存大小不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUseExpectContinue(), "是否使用USE_EXPECT_CONTINUE作为期望值不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCacheResponseMetadata(), "是否缓存响应元数据不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getConnectionTTL(), "连接TTL (生存时间)。Http连接由连接管理器用TTL缓存。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getConnectionMaxIdleMillis(), "连接池中连接的最大空闲时间 (以毫秒为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getValidateAfterInActivityMillis(), "在必须验证连接是否仍处于打开状态之前,连接可以在连接池中处于空闲状态。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getTcpKeepAlive(), "是否使用TCP KeepAlive的默认值。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getHeaders(), "所有请求的公共请求头不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getMaxConsecutiveRetriesBeforeThrottling(), "请求失败最大重试次数不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getDisableHostPrefixInjection(), "是否禁用主机前缀不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getRetryMode(), "重试模式不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssJdBO schisandraOssJdBO = SchisandraOssJdDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJdDTO);
return Result.ok(schisandraOssJdDomainService.update(schisandraOssJdBO));
} catch (Exception e) {
log.error("SchisandraOssJdController.update.error:{}", e.getMessage(), e);
return Result.fail("更新京东云对象存储配置表信息失败");
}
}
/**
* 删除京东云对象存储配置表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssJdDTO schisandraOssJdDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJdController.delete.dto:{}", JSON.toJSONString(schisandraOssJdDTO));
}
Preconditions.checkNotNull(schisandraOssJdDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getEndpoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSecretKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getRegion(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getConnectionTimeout(), "建立连接的超时时间单位毫秒。默认为50000毫秒不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getMaxConnections(), "允许打开的最大HTTP连接数。默认为1024不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getMaxErrorRetry(), "请求失败后最大的重试次数不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getThrottleRetries(), "是否限制重试的默认值。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProtocol(), "连接协议类型不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyProtocol(), "连接到HTTP代理时要使用的协议。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyDomain(), "访问NTLM验证的代理服务器的Windows域名不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyHost(), "代理服务器主机地址不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyPassword(), "代理服务器验证的密码不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyPort(), "代理服务器端口不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyUsername(), "代理服务器验证的用户名不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getProxyWorkstation(), "NTLM代理服务器的Windows工作站名称不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getNonProxyHosts(), "指定不通过代理应访问的主机。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getDisableSocketProxy(), "是否禁用Socket代理不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getPreemptiveBasicProxyAuth(), "是否使用基本身份验证对代理服务器进行抢先身份验证不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSocketTimeout(), "Socket层传输数据的超时时间单位毫秒。默认为50000毫秒不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getRequestTimeout(), "请求的默认超时时间。默认为0禁用的。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getClientExecutionTimeout(), "请求的默认超时时间。默认为0禁用的。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUserAgentPrefix(), "公共HTTP请求头前缀。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUseReaper(), "是否使用com.amazonaws.http.IdleConnectionReaper管理旧连接不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUseGzip(), "是否使用gzip解压缩不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSocketSendBufferSizeHint(), "Socket发送缓冲区的大小提示(以字节为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSocketReceiveBufferSizeHint(), "Socket接收缓冲区的大小提示(以字节为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getSignerOverride(), "设置签名算法对请求进行签名。如果未明确设置客户端将通过提取SDK中的配置文件来确定要使用的算法不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getResponseMetadataCacheSize(), "响应元数据缓存大小不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUseExpectContinue(), "是否使用USE_EXPECT_CONTINUE作为期望值不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCacheResponseMetadata(), "是否缓存响应元数据不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getConnectionTTL(), "连接TTL (生存时间)。Http连接由连接管理器用TTL缓存。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getConnectionMaxIdleMillis(), "连接池中连接的最大空闲时间 (以毫秒为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getValidateAfterInActivityMillis(), "在必须验证连接是否仍处于打开状态之前,连接可以在连接池中处于空闲状态。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getTcpKeepAlive(), "是否使用TCP KeepAlive的默认值。不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getHeaders(), "所有请求的公共请求头不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getMaxConsecutiveRetriesBeforeThrottling(), "请求失败最大重试次数不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getDisableHostPrefixInjection(), "是否禁用主机前缀不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getRetryMode(), "重试模式不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssJdDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssJdBO schisandraOssJdBO = SchisandraOssJdDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJdDTO);
return Result.ok(schisandraOssJdDomainService.delete(schisandraOssJdBO));
} catch (Exception e) {
log.error("SchisandraOssJdController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除京东云对象存储配置表信息失败");
}
}
}

View File

@@ -0,0 +1,133 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssJdbcDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssJdbcDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcBO;
import com.schisandra.oss.domain.service.SchisandraOssJdbcDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* jdbc存储配置表 controller
*
* @author landaiqing
* @since 2024-06-02 22:08:16
*/
@RestController
@RequestMapping("/oss/jdbc/")
@Slf4j
public class SchisandraOssJdbcController {
@Resource
private SchisandraOssJdbcDomainService schisandraOssJdbcDomainService;
/**
* 新增jdbc存储配置表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssJdbcDTO schisandraOssJdbcDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJdbcController.add.dto:{}", JSON.toJSONString(schisandraOssJdbcDTO));
}
Preconditions.checkNotNull(schisandraOssJdbcDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getDataSourceName(), "系统数据源Bean名称(适用于系统多数据源配置)不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUrl(), "对象存储数据源不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getType(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getDriver(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUsername(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getPassword(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssJdbcBO SchisandraOssJdbcBO = SchisandraOssJdbcDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJdbcDTO);
return Result.ok(schisandraOssJdbcDomainService.add(SchisandraOssJdbcBO));
} catch (Exception e) {
log.error("SchisandraOssJdbcController.register.error:{}", e.getMessage(), e);
return Result.fail("新增jdbc存储配置表失败");
}
}
/**
* 修改jdbc存储配置表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssJdbcDTO schisandraOssJdbcDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJdbcController.update.dto:{}", JSON.toJSONString(schisandraOssJdbcDTO));
}
Preconditions.checkNotNull(schisandraOssJdbcDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getDataSourceName(), "系统数据源Bean名称(适用于系统多数据源配置)不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUrl(), "对象存储数据源不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getType(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getDriver(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUsername(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getPassword(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssJdbcBO schisandraOssJdbcBO = SchisandraOssJdbcDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJdbcDTO);
return Result.ok(schisandraOssJdbcDomainService.update(schisandraOssJdbcBO));
} catch (Exception e) {
log.error("SchisandraOssJdbcController.update.error:{}", e.getMessage(), e);
return Result.fail("更新jdbc存储配置表信息失败");
}
}
/**
* 删除jdbc存储配置表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssJdbcDTO schisandraOssJdbcDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJdbcController.delete.dto:{}", JSON.toJSONString(schisandraOssJdbcDTO));
}
Preconditions.checkNotNull(schisandraOssJdbcDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getDataSourceName(), "系统数据源Bean名称(适用于系统多数据源配置)不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUrl(), "对象存储数据源不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getType(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getDriver(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUsername(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getPassword(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssJdbcBO schisandraOssJdbcBO = SchisandraOssJdbcDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJdbcDTO);
return Result.ok(schisandraOssJdbcDomainService.delete(schisandraOssJdbcBO));
} catch (Exception e) {
log.error("SchisandraOssJdbcController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除jdbc存储配置表信息失败");
}
}
}

View File

@@ -0,0 +1,115 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssJdbcDataDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssJdbcDataDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcDataBO;
import com.schisandra.oss.domain.service.SchisandraOssJdbcDataDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* jdbc存储数据表 controller
*
* @author landaiqing
* @since 2024-06-02 22:08:55
*/
@RestController
@RequestMapping("/oss/jdbc/data/")
@Slf4j
public class SchisandraOssJdbcDataController {
@Resource
private SchisandraOssJdbcDataDomainService schisandraOssJdbcDataDomainService;
/**
* 新增jdbc存储数据表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssJdbcDataDTO schisandraOssJdbcDataDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJdbcDataController.add.dto:{}", JSON.toJSONString(schisandraOssJdbcDataDTO));
}
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getData(), "数据不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssJdbcDataBO SchisandraOssJdbcDataBO = SchisandraOssJdbcDataDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJdbcDataDTO);
return Result.ok(schisandraOssJdbcDataDomainService.add(SchisandraOssJdbcDataBO));
} catch (Exception e) {
log.error("SchisandraOssJdbcDataController.register.error:{}", e.getMessage(), e);
return Result.fail("新增jdbc存储数据表失败");
}
}
/**
* 修改jdbc存储数据表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssJdbcDataDTO schisandraOssJdbcDataDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJdbcDataController.update.dto:{}", JSON.toJSONString(schisandraOssJdbcDataDTO));
}
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getData(), "数据不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssJdbcDataBO schisandraOssJdbcDataBO = SchisandraOssJdbcDataDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJdbcDataDTO);
return Result.ok(schisandraOssJdbcDataDomainService.update(schisandraOssJdbcDataBO));
} catch (Exception e) {
log.error("SchisandraOssJdbcDataController.update.error:{}", e.getMessage(), e);
return Result.fail("更新jdbc存储数据表信息失败");
}
}
/**
* 删除jdbc存储数据表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssJdbcDataDTO schisandraOssJdbcDataDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJdbcDataController.delete.dto:{}", JSON.toJSONString(schisandraOssJdbcDataDTO));
}
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getData(), "数据不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJdbcDataDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssJdbcDataBO schisandraOssJdbcDataBO = SchisandraOssJdbcDataDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJdbcDataDTO);
return Result.ok(schisandraOssJdbcDataDomainService.delete(schisandraOssJdbcDataBO));
} catch (Exception e) {
log.error("SchisandraOssJdbcDataController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除jdbc存储数据表信息失败");
}
}
}

View File

@@ -0,0 +1,130 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssJdbcStoreDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssJdbcStoreDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcStoreBO;
import com.schisandra.oss.domain.service.SchisandraOssJdbcStoreDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* jdbc存储信息表 controller
*
* @author landaiqing
* @since 2024-06-02 22:11:22
*/
@RestController
@RequestMapping("/oss/jdbc/store/")
@Slf4j
public class SchisandraOssJdbcStoreController {
@Resource
private SchisandraOssJdbcStoreDomainService schisandraOssJdbcStoreDomainService;
/**
* 新增jdbc存储信息表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssJdbcStoreDTO schisandraOssJdbcStoreDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJdbcStoreController.add.dto:{}", JSON.toJSONString(schisandraOssJdbcStoreDTO));
}
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getId(), "主键不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getName(), "文件/目录名不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getPath(), "路径不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getSize(), "文件大小不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getParentId(), "父级目录ID不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getType(), "类型(D:目录;F:文件)不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getDataId(), "数据ID不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssJdbcStoreBO SchisandraOssJdbcStoreBO = SchisandraOssJdbcStoreDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJdbcStoreDTO);
return Result.ok(schisandraOssJdbcStoreDomainService.add(SchisandraOssJdbcStoreBO));
} catch (Exception e) {
log.error("SchisandraOssJdbcStoreController.register.error:{}", e.getMessage(), e);
return Result.fail("新增jdbc存储信息表失败");
}
}
/**
* 修改jdbc存储信息表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssJdbcStoreDTO schisandraOssJdbcStoreDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJdbcStoreController.update.dto:{}", JSON.toJSONString(schisandraOssJdbcStoreDTO));
}
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getId(), "主键不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getName(), "文件/目录名不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getPath(), "路径不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getSize(), "文件大小不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getParentId(), "父级目录ID不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getType(), "类型(D:目录;F:文件)不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getDataId(), "数据ID不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssJdbcStoreBO schisandraOssJdbcStoreBO = SchisandraOssJdbcStoreDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJdbcStoreDTO);
return Result.ok(schisandraOssJdbcStoreDomainService.update(schisandraOssJdbcStoreBO));
} catch (Exception e) {
log.error("SchisandraOssJdbcStoreController.update.error:{}", e.getMessage(), e);
return Result.fail("更新jdbc存储信息表信息失败");
}
}
/**
* 删除jdbc存储信息表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssJdbcStoreDTO schisandraOssJdbcStoreDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJdbcStoreController.delete.dto:{}", JSON.toJSONString(schisandraOssJdbcStoreDTO));
}
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getId(), "主键不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getName(), "文件/目录名不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getPath(), "路径不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getSize(), "文件大小不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getParentId(), "父级目录ID不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getType(), "类型(D:目录;F:文件)不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getDataId(), "数据ID不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJdbcStoreDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssJdbcStoreBO schisandraOssJdbcStoreBO = SchisandraOssJdbcStoreDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJdbcStoreDTO);
return Result.ok(schisandraOssJdbcStoreDomainService.delete(schisandraOssJdbcStoreBO));
} catch (Exception e) {
log.error("SchisandraOssJdbcStoreController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除jdbc存储信息表信息失败");
}
}
}

View File

@@ -0,0 +1,175 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssJinshanDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssJinshanDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssJinshanBO;
import com.schisandra.oss.domain.service.SchisandraOssJinshanDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 金山云对象存储配置表 controller
*
* @author landaiqing
* @since 2024-06-02 22:13:26
*/
@RestController
@RequestMapping("/oss/jinshan/")
@Slf4j
public class SchisandraOssJinshanController {
@Resource
private SchisandraOssJinshanDomainService schisandraOssJinshanDomainService;
/**
* 新增金山云对象存储配置表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssJinshanDTO schisandraOssJinshanDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJinshanController.add.dto:{}", JSON.toJSONString(schisandraOssJinshanDTO));
}
Preconditions.checkNotNull(schisandraOssJinshanDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getAccessKeyId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getAccessKeySecret(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getEndpoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getRegion(), "服务地址,参考{@linkplain http://ks3.ksyun.com/doc/api/index.html Doc}");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getSecurityToken(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getProtocol(), "http或者https不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getVersion(), "签名版本不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getPathStyleAccess(), "是否使用path style access方式访问不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getAllowAnonymous(), "允许客户端发送匿名请求不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getFlowRedirect(), "当服务端返回307时是否自动跳转");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getDomainMode(), "是否使用绑定的域名作为endpoint不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getSignerClass(), "签名类不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getUseGzip(), "是否压缩不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssJinshanBO SchisandraOssJinshanBO = SchisandraOssJinshanDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJinshanDTO);
return Result.ok(schisandraOssJinshanDomainService.add(SchisandraOssJinshanBO));
} catch (Exception e) {
log.error("SchisandraOssJinshanController.register.error:{}", e.getMessage(), e);
return Result.fail("新增金山云对象存储配置表失败");
}
}
/**
* 修改金山云对象存储配置表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssJinshanDTO schisandraOssJinshanDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJinshanController.update.dto:{}", JSON.toJSONString(schisandraOssJinshanDTO));
}
Preconditions.checkNotNull(schisandraOssJinshanDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getAccessKeyId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getAccessKeySecret(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getEndpoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getRegion(), "服务地址,参考{@linkplain http://ks3.ksyun.com/doc/api/index.html Doc}");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getSecurityToken(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getProtocol(), "http或者https不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getVersion(), "签名版本不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getPathStyleAccess(), "是否使用path style access方式访问不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getAllowAnonymous(), "允许客户端发送匿名请求不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getFlowRedirect(), "当服务端返回307时是否自动跳");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getDomainMode(), "是否使用绑定的域名作为endpoint不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getSignerClass(), "签名类不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getUseGzip(), "是否压缩不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssJinshanBO schisandraOssJinshanBO = SchisandraOssJinshanDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJinshanDTO);
return Result.ok(schisandraOssJinshanDomainService.update(schisandraOssJinshanBO));
} catch (Exception e) {
log.error("SchisandraOssJinshanController.update.error:{}", e.getMessage(), e);
return Result.fail("更新金山云对象存储配置表信息失败");
}
}
/**
* 删除金山云对象存储配置表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssJinshanDTO schisandraOssJinshanDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssJinshanController.delete.dto:{}", JSON.toJSONString(schisandraOssJinshanDTO));
}
Preconditions.checkNotNull(schisandraOssJinshanDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getAccessKeyId(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getAccessKeySecret(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getEndpoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getRegion(), "服务地址,参考{@linkplain http://ks3.ksyun.com/doc/api/index.html Doc}");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getSecurityToken(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getProtocol(), "http或者https不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getVersion(), "签名版本不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getPathStyleAccess(), "是否使用path style access方式访问不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getAllowAnonymous(), "允许客户端发送匿名请求不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getFlowRedirect(), "当服务端返回307时是否自动跳转");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getDomainMode(), "是否使用绑定的域名作为endpoint不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getSignerClass(), "签名类不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getUseGzip(), "是否压缩不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssJinshanDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssJinshanBO schisandraOssJinshanBO = SchisandraOssJinshanDTOConverter.INSTANCE.convertDTOToBO(schisandraOssJinshanDTO);
return Result.ok(schisandraOssJinshanDomainService.delete(schisandraOssJinshanBO));
} catch (Exception e) {
log.error("SchisandraOssJinshanController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除金山云对象存储配置表信息失败");
}
}
}

View File

@@ -0,0 +1,118 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssLocalDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssLocalDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssLocalBO;
import com.schisandra.oss.domain.service.SchisandraOssLocalDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 本地存储配置表 controller
*
* @author landaiqing
* @since 2024-06-02 22:18:08
*/
@RestController
@RequestMapping("/oss/local/")
@Slf4j
public class SchisandraOssLocalController {
@Resource
private SchisandraOssLocalDomainService schisandraOssLocalDomainService;
/**
* 新增本地存储配置表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssLocalDTO schisandraOssLocalDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssLocalController.add.dto:{}", JSON.toJSONString(schisandraOssLocalDTO));
}
Preconditions.checkNotNull(schisandraOssLocalDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssLocalBO SchisandraOssLocalBO = SchisandraOssLocalDTOConverter.INSTANCE.convertDTOToBO(schisandraOssLocalDTO);
return Result.ok(schisandraOssLocalDomainService.add(SchisandraOssLocalBO));
} catch (Exception e) {
log.error("SchisandraOssLocalController.register.error:{}", e.getMessage(), e);
return Result.fail("新增本地存储配置表失败");
}
}
/**
* 修改本地存储配置表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssLocalDTO schisandraOssLocalDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssLocalController.update.dto:{}", JSON.toJSONString(schisandraOssLocalDTO));
}
Preconditions.checkNotNull(schisandraOssLocalDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssLocalBO schisandraOssLocalBO = SchisandraOssLocalDTOConverter.INSTANCE.convertDTOToBO(schisandraOssLocalDTO);
return Result.ok(schisandraOssLocalDomainService.update(schisandraOssLocalBO));
} catch (Exception e) {
log.error("SchisandraOssLocalController.update.error:{}", e.getMessage(), e);
return Result.fail("更新本地存储配置表信息失败");
}
}
/**
* 删除本地存储配置表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssLocalDTO schisandraOssLocalDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssLocalController.delete.dto:{}", JSON.toJSONString(schisandraOssLocalDTO));
}
Preconditions.checkNotNull(schisandraOssLocalDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssLocalDTO.getExtraJson(), "额外字段不能为空");
SchisandraOssLocalBO schisandraOssLocalBO = SchisandraOssLocalDTOConverter.INSTANCE.convertDTOToBO(schisandraOssLocalDTO);
return Result.ok(schisandraOssLocalDomainService.delete(schisandraOssLocalBO));
} catch (Exception e) {
log.error("SchisandraOssLocalController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除本地存储配置表信息失败");
}
}
}

View File

@@ -0,0 +1,157 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssPinganDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssPinganDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssPinganBO;
import com.schisandra.oss.domain.service.SchisandraOssPinganDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 平安云对象存储配置表 controller
*
* @author landaiqing
* @since 2024-06-02 22:19:22
*/
@RestController
@RequestMapping("/oss/pingan/")
@Slf4j
public class SchisandraOssPinganController {
@Resource
private SchisandraOssPinganDomainService schisandraOssPinganDomainService;
/**
* 新增平安云对象存储配置表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssPinganDTO schisandraOssPinganDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssPinganController.add.dto:{}", JSON.toJSONString(schisandraOssPinganDTO));
}
Preconditions.checkNotNull(schisandraOssPinganDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getSystemUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getUserAgent(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getObsUrl(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getObsAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getObsSecret(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getRepresentPathInKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getDomainName(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
SchisandraOssPinganBO SchisandraOssPinganBO = SchisandraOssPinganDTOConverter.INSTANCE.convertDTOToBO(schisandraOssPinganDTO);
return Result.ok(schisandraOssPinganDomainService.add(SchisandraOssPinganBO));
} catch (Exception e) {
log.error("SchisandraOssPinganController.register.error:{}", e.getMessage(), e);
return Result.fail("新增平安云对象存储配置表失败");
}
}
/**
* 修改平安云对象存储配置表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssPinganDTO schisandraOssPinganDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssPinganController.update.dto:{}", JSON.toJSONString(schisandraOssPinganDTO));
}
Preconditions.checkNotNull(schisandraOssPinganDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getSystemUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getUserAgent(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getObsUrl(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getObsAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getObsSecret(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getRepresentPathInKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getDomainName(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
SchisandraOssPinganBO schisandraOssPinganBO = SchisandraOssPinganDTOConverter.INSTANCE.convertDTOToBO(schisandraOssPinganDTO);
return Result.ok(schisandraOssPinganDomainService.update(schisandraOssPinganBO));
} catch (Exception e) {
log.error("SchisandraOssPinganController.update.error:{}", e.getMessage(), e);
return Result.fail("更新平安云对象存储配置表信息失败");
}
}
/**
* 删除平安云对象存储配置表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssPinganDTO schisandraOssPinganDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssPinganController.delete.dto:{}", JSON.toJSONString(schisandraOssPinganDTO));
}
Preconditions.checkNotNull(schisandraOssPinganDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getSystemUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getUserAgent(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getObsUrl(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getObsAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getObsSecret(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getRepresentPathInKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getDomainName(), "不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
Preconditions.checkNotNull(schisandraOssPinganDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
SchisandraOssPinganBO schisandraOssPinganBO = SchisandraOssPinganDTOConverter.INSTANCE.convertDTOToBO(schisandraOssPinganDTO);
return Result.ok(schisandraOssPinganDomainService.delete(schisandraOssPinganBO));
} catch (Exception e) {
log.error("SchisandraOssPinganController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除平安云对象存储配置表信息失败");
}
}
}

View File

@@ -0,0 +1,166 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssQingyunDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssQingyunDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssQingyunBO;
import com.schisandra.oss.domain.service.SchisandraOssQingyunDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 青云对象存储配置表 controller
*
* @author landaiqing
* @since 2024-06-02 22:21:09
*/
@RestController
@RequestMapping("/oss/qingyun/")
@Slf4j
public class SchisandraOssQingyunController {
@Resource
private SchisandraOssQingyunDomainService schisandraOssQingyunDomainService;
/**
* 新增青云对象存储配置表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssQingyunDTO schisandraOssQingyunDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssQingyunController.add.dto:{}", JSON.toJSONString(schisandraOssQingyunDTO));
}
Preconditions.checkNotNull(schisandraOssQingyunDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getEndpoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getAccessSecret(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getZone(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCnameSupport(), "是否支持CNAME作为Endpoint默认不支持CNAME。不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getAdditionalUserAgent(), "附加的用户代理不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getVirtualHostEnabled(), "是否启用虚拟Host不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getReadTimeout(), "读超时时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getWriteTimeout(), "写超时时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getConnectionTimeout(), "连接超时时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssQingyunBO SchisandraOssQingyunBO = SchisandraOssQingyunDTOConverter.INSTANCE.convertDTOToBO(schisandraOssQingyunDTO);
return Result.ok(schisandraOssQingyunDomainService.add(SchisandraOssQingyunBO));
} catch (Exception e) {
log.error("SchisandraOssQingyunController.register.error:{}", e.getMessage(), e);
return Result.fail("新增青云对象存储配置表失败");
}
}
/**
* 修改青云对象存储配置表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssQingyunDTO schisandraOssQingyunDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssQingyunController.update.dto:{}", JSON.toJSONString(schisandraOssQingyunDTO));
}
Preconditions.checkNotNull(schisandraOssQingyunDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getEndpoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getAccessSecret(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getZone(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCnameSupport(), "是否支持CNAME作为Endpoint默认不支持CNAME。不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getAdditionalUserAgent(), "附加的用户代理不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getVirtualHostEnabled(), "是否启用虚拟Host不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getReadTimeout(), "读超时时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getWriteTimeout(), "写超时时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getConnectionTimeout(), "连接超时时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssQingyunBO schisandraOssQingyunBO = SchisandraOssQingyunDTOConverter.INSTANCE.convertDTOToBO(schisandraOssQingyunDTO);
return Result.ok(schisandraOssQingyunDomainService.update(schisandraOssQingyunBO));
} catch (Exception e) {
log.error("SchisandraOssQingyunController.update.error:{}", e.getMessage(), e);
return Result.fail("更新青云对象存储配置表信息失败");
}
}
/**
* 删除青云对象存储配置表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssQingyunDTO schisandraOssQingyunDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssQingyunController.delete.dto:{}", JSON.toJSONString(schisandraOssQingyunDTO));
}
Preconditions.checkNotNull(schisandraOssQingyunDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getEndpoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getAccessSecret(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getZone(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCnameSupport(), "是否支持CNAME作为Endpoint默认不支持CNAME。不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getAdditionalUserAgent(), "附加的用户代理不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getVirtualHostEnabled(), "是否启用虚拟Host不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getReadTimeout(), "读超时时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getWriteTimeout(), "写超时时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getConnectionTimeout(), "连接超时时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssQingyunDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssQingyunBO schisandraOssQingyunBO = SchisandraOssQingyunDTOConverter.INSTANCE.convertDTOToBO(schisandraOssQingyunDTO);
return Result.ok(schisandraOssQingyunDomainService.delete(schisandraOssQingyunBO));
} catch (Exception e) {
log.error("SchisandraOssQingyunController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除青云对象存储配置表信息失败");
}
}
}

View File

@@ -0,0 +1,181 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssQiniuDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssQiniuDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssQiniuBO;
import com.schisandra.oss.domain.service.SchisandraOssQiniuDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 七牛云对象存储配置表 controller
*
* @author landaiqing
* @since 2024-06-02 22:25:11
*/
@RestController
@RequestMapping("/oss/qiniu/")
@Slf4j
public class SchisandraOssQiniuController {
@Resource
private SchisandraOssQiniuDomainService schisandraOssQiniuDomainService;
/**
* 新增七牛云对象存储配置表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssQiniuDTO schisandraOssQiniuDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssQiniuController.add.dto:{}", JSON.toJSONString(schisandraOssQiniuDTO));
}
Preconditions.checkNotNull(schisandraOssQiniuDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getSecretKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getRegion(), "使用的Region不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUseHttpsDomains(), "空间相关上传管理操作是否使用 https , 默认 是不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getAccUpHostFirst(), "空间相关上传管理操作是否使用代理加速上传,默认 是不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUseDefaultUpHostIfNone(), "使用 AutoRegion 时,如果从区域信息得到上传 host 失败,使用默认的上传域名上传,默认 是upload.qiniup.com,uploadz1.qiniup.com,upload-z2.qiniup.com,upload-na0.qiniup.com,upload-as0.qiniup.com不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getPutThreshold(), "如果文件大小大于此值则使用断点上传, 否则使用Form上传不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getConnectTimeout(), "连接超时时间 单位秒(默认10s)不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getWriteTimeout(), "写超时时间 单位秒(默认 0 , 不超时)不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getReadTimeout(), "回复超时时间 单位秒(默认30s)不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getDispatcherMaxRequests(), "底层HTTP库所有的并发执行的请求数量不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getDispatcherMaxRequestsPerHost(), "底层HTTP库对每个独立的Host进行并发请求的数量不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getConnectionPoolMaxIdleCount(), "底层HTTP库中复用连接对象的最大空闲数量不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getConnectionPoolMaxIdleMinutes(), "底层HTTP库中复用连接对象的回收周期单位分钟不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getRetryMax(), "上传失败重试次数不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssQiniuBO SchisandraOssQiniuBO = SchisandraOssQiniuDTOConverter.INSTANCE.convertDTOToBO(schisandraOssQiniuDTO);
return Result.ok(schisandraOssQiniuDomainService.add(SchisandraOssQiniuBO));
} catch (Exception e) {
log.error("SchisandraOssQiniuController.register.error:{}", e.getMessage(), e);
return Result.fail("新增七牛云对象存储配置表失败");
}
}
/**
* 修改七牛云对象存储配置表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssQiniuDTO schisandraOssQiniuDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssQiniuController.update.dto:{}", JSON.toJSONString(schisandraOssQiniuDTO));
}
Preconditions.checkNotNull(schisandraOssQiniuDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getSecretKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getRegion(), "使用的Region不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUseHttpsDomains(), "空间相关上传管理操作是否使用 https , 默认 是不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getAccUpHostFirst(), "空间相关上传管理操作是否使用代理加速上传,默认 是不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUseDefaultUpHostIfNone(), "使用 AutoRegion 时,如果从区域信息得到上传 host 失败,使用默认的上传域名上传,默认 是upload.qiniup.com,uploadz1.qiniup.com,upload-z2.qiniup.com,upload-na0.qiniup.com,upload-as0.qiniup.com不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getPutThreshold(), "如果文件大小大于此值则使用断点上传, 否则使用Form上传不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getConnectTimeout(), "连接超时时间 单位秒(默认10s)不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getWriteTimeout(), "写超时时间 单位秒(默认 0 , 不超时)不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getReadTimeout(), "回复超时时间 单位秒(默认30s)不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getDispatcherMaxRequests(), "底层HTTP库所有的并发执行的请求数量不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getDispatcherMaxRequestsPerHost(), "底层HTTP库对每个独立的Host进行并发请求的数量不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getConnectionPoolMaxIdleCount(), "底层HTTP库中复用连接对象的最大空闲数量不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getConnectionPoolMaxIdleMinutes(), "底层HTTP库中复用连接对象的回收周期单位分钟不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getRetryMax(), "上传失败重试次数不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssQiniuBO schisandraOssQiniuBO = SchisandraOssQiniuDTOConverter.INSTANCE.convertDTOToBO(schisandraOssQiniuDTO);
return Result.ok(schisandraOssQiniuDomainService.update(schisandraOssQiniuBO));
} catch (Exception e) {
log.error("SchisandraOssQiniuController.update.error:{}", e.getMessage(), e);
return Result.fail("更新七牛云对象存储配置表信息失败");
}
}
/**
* 删除七牛云对象存储配置表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssQiniuDTO schisandraOssQiniuDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssQiniuController.delete.dto:{}", JSON.toJSONString(schisandraOssQiniuDTO));
}
Preconditions.checkNotNull(schisandraOssQiniuDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getSecretKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getRegion(), "使用的Region不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUseHttpsDomains(), "空间相关上传管理操作是否使用 https , 默认 是不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getAccUpHostFirst(), "空间相关上传管理操作是否使用代理加速上传,默认 是不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUseDefaultUpHostIfNone(), "使用 AutoRegion 时,如果从区域信息得到上传 host 失败,使用默认的上传域名上传,默认 是upload.qiniup.com,uploadz1.qiniup.com,upload-z2.qiniup.com,upload-na0.qiniup.com,upload-as0.qiniup.com不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getPutThreshold(), "如果文件大小大于此值则使用断点上传, 否则使用Form上传不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getConnectTimeout(), "连接超时时间 单位秒(默认10s)不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getWriteTimeout(), "写超时时间 单位秒(默认 0 , 不超时)不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getReadTimeout(), "回复超时时间 单位秒(默认30s)不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getDispatcherMaxRequests(), "底层HTTP库所有的并发执行的请求数量不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getDispatcherMaxRequestsPerHost(), "底层HTTP库对每个独立的Host进行并发请求的数量不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getConnectionPoolMaxIdleCount(), "底层HTTP库中复用连接对象的最大空闲数量不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getConnectionPoolMaxIdleMinutes(), "底层HTTP库中复用连接对象的回收周期单位分钟不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getRetryMax(), "上传失败重试次数不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssQiniuDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssQiniuBO schisandraOssQiniuBO = SchisandraOssQiniuDTOConverter.INSTANCE.convertDTOToBO(schisandraOssQiniuDTO);
return Result.ok(schisandraOssQiniuDomainService.delete(schisandraOssQiniuBO));
} catch (Exception e) {
log.error("SchisandraOssQiniuController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除七牛云对象存储配置表信息失败");
}
}
}

View File

@@ -21,7 +21,7 @@ import javax.annotation.Resource;
* @since 2024-06-02 21:38:56
*/
@RestController
@RequestMapping("/oss/tencent//")
@RequestMapping("/oss/tencent/")
@Slf4j
public class SchisandraOssTencentController {

View File

@@ -0,0 +1,163 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssUcloudDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssUcloudDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssUcloudBO;
import com.schisandra.oss.domain.service.SchisandraOssUcloudDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* ucloud对象存储配置表 controller
*
* @author landaiqing
* @since 2024-06-02 22:27:45
*/
@RestController
@RequestMapping("/oss/ucloud/")
@Slf4j
public class SchisandraOssUcloudController {
@Resource
private SchisandraOssUcloudDomainService schisandraOssUcloudDomainService;
/**
* 新增ucloud对象存储配置表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssUcloudDTO schisandraOssUcloudDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssUcloudController.add.dto:{}", JSON.toJSONString(schisandraOssUcloudDTO));
}
Preconditions.checkNotNull(schisandraOssUcloudDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getPublicKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getPrivateKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCustomHost(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getTimeoutConnect(), "连接超时时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getTimeoutRead(), "读超时时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getTimeoutWrite(), "写超时时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getMaxIdleConnections(), "okhttp最大空闲连接数5不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getKeepAliveDuration(), "okhttp活动链接存货时间5分钟不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getKeepAliveTimeUnit(), "okhttp活动链接存货时间单位, (分钟)不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssUcloudBO SchisandraOssUcloudBO = SchisandraOssUcloudDTOConverter.INSTANCE.convertDTOToBO(schisandraOssUcloudDTO);
return Result.ok(schisandraOssUcloudDomainService.add(SchisandraOssUcloudBO));
} catch (Exception e) {
log.error("SchisandraOssUcloudController.register.error:{}", e.getMessage(), e);
return Result.fail("新增ucloud对象存储配置表失败");
}
}
/**
* 修改ucloud对象存储配置表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssUcloudDTO schisandraOssUcloudDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssUcloudController.update.dto:{}", JSON.toJSONString(schisandraOssUcloudDTO));
}
Preconditions.checkNotNull(schisandraOssUcloudDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getPublicKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getPrivateKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCustomHost(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getTimeoutConnect(), "连接超时时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getTimeoutRead(), "读超时时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getTimeoutWrite(), "写超时时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getMaxIdleConnections(), "okhttp最大空闲连接数5不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getKeepAliveDuration(), "okhttp活动链接存货时间5分钟不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getKeepAliveTimeUnit(), "okhttp活动链接存货时间单位, (分钟)不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssUcloudBO schisandraOssUcloudBO = SchisandraOssUcloudDTOConverter.INSTANCE.convertDTOToBO(schisandraOssUcloudDTO);
return Result.ok(schisandraOssUcloudDomainService.update(schisandraOssUcloudBO));
} catch (Exception e) {
log.error("SchisandraOssUcloudController.update.error:{}", e.getMessage(), e);
return Result.fail("更新ucloud对象存储配置表信息失败");
}
}
/**
* 删除ucloud对象存储配置表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssUcloudDTO schisandraOssUcloudDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssUcloudController.delete.dto:{}", JSON.toJSONString(schisandraOssUcloudDTO));
}
Preconditions.checkNotNull(schisandraOssUcloudDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getPublicKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getPrivateKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCustomHost(), "不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getTimeoutConnect(), "连接超时时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getTimeoutRead(), "读超时时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getTimeoutWrite(), "写超时时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getMaxIdleConnections(), "okhttp最大空闲连接数5不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getKeepAliveDuration(), "okhttp活动链接存货时间5分钟不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getKeepAliveTimeUnit(), "okhttp活动链接存货时间单位, (分钟)不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssUcloudDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssUcloudBO schisandraOssUcloudBO = SchisandraOssUcloudDTOConverter.INSTANCE.convertDTOToBO(schisandraOssUcloudDTO);
return Result.ok(schisandraOssUcloudDomainService.delete(schisandraOssUcloudBO));
} catch (Exception e) {
log.error("SchisandraOssUcloudController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除ucloud对象存储配置表信息失败");
}
}
}

View File

@@ -0,0 +1,148 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssUpDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssUpDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssUpBO;
import com.schisandra.oss.domain.service.SchisandraOssUpDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 又拍云对象存储配置表 controller
*
* @author landaiqing
* @since 2024-06-02 22:29:27
*/
@RestController
@RequestMapping("/oss/up/")
@Slf4j
public class SchisandraOssUpController {
@Resource
private SchisandraOssUpDomainService schisandraOssUpDomainService;
/**
* 新增又拍云对象存储配置表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssUpDTO schisandraOssUpDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssUpController.add.dto:{}", JSON.toJSONString(schisandraOssUpDTO));
}
Preconditions.checkNotNull(schisandraOssUpDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getUserName(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getPassword(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getTimeout(), "默认的超时时间30秒不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getApiDomain(), "默认为自动识别接入点不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssUpBO SchisandraOssUpBO = SchisandraOssUpDTOConverter.INSTANCE.convertDTOToBO(schisandraOssUpDTO);
return Result.ok(schisandraOssUpDomainService.add(SchisandraOssUpBO));
} catch (Exception e) {
log.error("SchisandraOssUpController.register.error:{}", e.getMessage(), e);
return Result.fail("新增又拍云对象存储配置表失败");
}
}
/**
* 修改又拍云对象存储配置表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssUpDTO schisandraOssUpDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssUpController.update.dto:{}", JSON.toJSONString(schisandraOssUpDTO));
}
Preconditions.checkNotNull(schisandraOssUpDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getUserName(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getPassword(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getTimeout(), "默认的超时时间30秒不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getApiDomain(), "默认为自动识别接入点不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssUpBO schisandraOssUpBO = SchisandraOssUpDTOConverter.INSTANCE.convertDTOToBO(schisandraOssUpDTO);
return Result.ok(schisandraOssUpDomainService.update(schisandraOssUpBO));
} catch (Exception e) {
log.error("SchisandraOssUpController.update.error:{}", e.getMessage(), e);
return Result.fail("更新又拍云对象存储配置表信息失败");
}
}
/**
* 删除又拍云对象存储配置表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssUpDTO schisandraOssUpDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssUpController.delete.dto:{}", JSON.toJSONString(schisandraOssUpDTO));
}
Preconditions.checkNotNull(schisandraOssUpDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getUserName(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getPassword(), "不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getTimeout(), "默认的超时时间30秒不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getApiDomain(), "默认为自动识别接入点不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssUpDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssUpBO schisandraOssUpBO = SchisandraOssUpDTOConverter.INSTANCE.convertDTOToBO(schisandraOssUpDTO);
return Result.ok(schisandraOssUpDomainService.delete(schisandraOssUpBO));
} catch (Exception e) {
log.error("SchisandraOssUpController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除又拍云对象存储配置表信息失败");
}
}
}

View File

@@ -0,0 +1,190 @@
package com.schisandra.oss.application.controller;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.schisandra.oss.application.convert.SchisandraOssWangyiDTOConverter;
import com.schisandra.oss.application.dto.SchisandraOssWangyiDTO;
import com.schisandra.oss.common.entity.Result;
import com.schisandra.oss.domain.bo.SchisandraOssWangyiBO;
import com.schisandra.oss.domain.service.SchisandraOssWangyiDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 网易数帆对象存储配置表 controller
*
* @author landaiqing
* @since 2024-06-02 22:31:37
*/
@RestController
@RequestMapping("/oss/wangyi/")
@Slf4j
public class SchisandraOssWangyiController {
@Resource
private SchisandraOssWangyiDomainService schisandraOssWangyiDomainService;
/**
* 新增网易数帆对象存储配置表
*/
@RequestMapping("add")
public Result<Boolean> add(@RequestBody SchisandraOssWangyiDTO schisandraOssWangyiDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssWangyiController.add.dto:{}", JSON.toJSONString(schisandraOssWangyiDTO));
}
Preconditions.checkNotNull(schisandraOssWangyiDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getSecretKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getEndpoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getConnectionTimeout(), "连接超时时间不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getMaxConnections(), "最大连接池大小。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getMaxErrorRetry(), "最大失败重试次数不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getIsSubDomain(), "是否使用子域名不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProtocol(), "连接OSS所采用的协议HTTP或HTTPS默认为HTTP。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyDomain(), "代理服务器的域该域可以执行NTLM认证不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyHost(), "代理服务器主机地址不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyPassword(), "代理服务器验证的密码不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyPort(), "代理服务器端口不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyUsername(), "代理服务器验证的用户名不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyWorkstation(), "代理主机的NTLM身份验证服务器不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getSocketTimeout(), "Socket层传输数据的超时时间单位毫秒。默认为50000毫秒。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getUserAgent(), "用户代理指HTTP的User-Agent头不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getSocketReceiveBufferSizeHint(), "Socket接收缓冲区的大小提示(以字节为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getSocketSendBufferSizeHint(), "Socket发送缓冲区的大小提示(以字节为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssWangyiBO SchisandraOssWangyiBO = SchisandraOssWangyiDTOConverter.INSTANCE.convertDTOToBO(schisandraOssWangyiDTO);
return Result.ok(schisandraOssWangyiDomainService.add(SchisandraOssWangyiBO));
} catch (Exception e) {
log.error("SchisandraOssWangyiController.register.error:{}", e.getMessage(), e);
return Result.fail("新增网易数帆对象存储配置表失败");
}
}
/**
* 修改网易数帆对象存储配置表
*/
@RequestMapping("update")
public Result<Boolean> update(@RequestBody SchisandraOssWangyiDTO schisandraOssWangyiDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssWangyiController.update.dto:{}", JSON.toJSONString(schisandraOssWangyiDTO));
}
Preconditions.checkNotNull(schisandraOssWangyiDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getSecretKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getEndpoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getConnectionTimeout(), "连接超时时间不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getMaxConnections(), "最大连接池大小。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getMaxErrorRetry(), "最大失败重试次数不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getIsSubDomain(), "是否使用子域名不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProtocol(), "连接OSS所采用的协议HTTP或HTTPS默认为HTTP。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyDomain(), "代理服务器的域该域可以执行NTLM认证不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyHost(), "代理服务器主机地址不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyPassword(), "代理服务器验证的密码不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyPort(), "代理服务器端口不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyUsername(), "代理服务器验证的用户名不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyWorkstation(), "代理主机的NTLM身份验证服务器不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getSocketTimeout(), "Socket层传输数据的超时时间单位毫秒。默认为50000毫秒。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getUserAgent(), "用户代理指HTTP的User-Agent头不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getSocketReceiveBufferSizeHint(), "Socket接收缓冲区的大小提示(以字节为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getSocketSendBufferSizeHint(), "Socket发送缓冲区的大小提示(以字节为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssWangyiBO schisandraOssWangyiBO = SchisandraOssWangyiDTOConverter.INSTANCE.convertDTOToBO(schisandraOssWangyiDTO);
return Result.ok(schisandraOssWangyiDomainService.update(schisandraOssWangyiBO));
} catch (Exception e) {
log.error("SchisandraOssWangyiController.update.error:{}", e.getMessage(), e);
return Result.fail("更新网易数帆对象存储配置表信息失败");
}
}
/**
* 删除网易数帆对象存储配置表
*/
@RequestMapping("delete")
public Result<Boolean> delete(@RequestBody SchisandraOssWangyiDTO schisandraOssWangyiDTO) {
try {
if (log.isInfoEnabled()) {
log.info("SchisandraOssWangyiController.delete.dto:{}", JSON.toJSONString(schisandraOssWangyiDTO));
}
Preconditions.checkNotNull(schisandraOssWangyiDTO.getId(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getUserId(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getAccessKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getSecretKey(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getEndpoint(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getBucketName(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getBasePath(), "不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getConnectionTimeout(), "连接超时时间不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getMaxConnections(), "最大连接池大小。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getMaxErrorRetry(), "最大失败重试次数不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getIsSubDomain(), "是否使用子域名不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProtocol(), "连接OSS所采用的协议HTTP或HTTPS默认为HTTP。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyDomain(), "代理服务器的域该域可以执行NTLM认证不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyHost(), "代理服务器主机地址不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyPassword(), "代理服务器验证的密码不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyPort(), "代理服务器端口不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyUsername(), "代理服务器验证的用户名不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getProxyWorkstation(), "代理主机的NTLM身份验证服务器不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getSocketTimeout(), "Socket层传输数据的超时时间单位毫秒。默认为50000毫秒。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getUserAgent(), "用户代理指HTTP的User-Agent头不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getSocketReceiveBufferSizeHint(), "Socket接收缓冲区的大小提示(以字节为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getSocketSendBufferSizeHint(), "Socket发送缓冲区的大小提示(以字节为单位)。不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getPartSize(), "分片大小,默认5MB不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getTaskNum(), "并发线程数,默认等于CPU的核数不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getStatus(), "状态不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getOpenAdvancedSetup(), "是否开启高级设置不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getCreatedBy(), "创建人不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getCreatedTime(), "创建时间不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getUpdateTime(), "更新时间不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getUpdateBy(), "更新人不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getExtraJson(), "额外字段不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getCreateBucket(), "当桶不存在,是否创建不能为空");
Preconditions.checkNotNull(schisandraOssWangyiDTO.getCheckBucket(), "启动检测桶,是否存在不能为空");
SchisandraOssWangyiBO schisandraOssWangyiBO = SchisandraOssWangyiDTOConverter.INSTANCE.convertDTOToBO(schisandraOssWangyiDTO);
return Result.ok(schisandraOssWangyiDomainService.delete(schisandraOssWangyiBO));
} catch (Exception e) {
log.error("SchisandraOssWangyiController.delete.error:{}", e.getMessage(), e);
return Result.fail("删除网易数帆对象存储配置表信息失败");
}
}
}

View File

@@ -1,16 +1,15 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssBaiduDTO;
import com.schisandra.oss.domain.bo.SchisandraOssBaiduBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* dto转换器
* 百度云对象存储配置表 dto转换器
*
* @author landaiqing
* @since 2024-05-17 21:17:28
* @since 2024-06-02 22:02:15
*/
@Mapper
public interface SchisandraOssBaiduDTOConverter {
@@ -18,5 +17,6 @@ public interface SchisandraOssBaiduDTOConverter {
SchisandraOssBaiduDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssBaiduDTOConverter.class);
SchisandraOssBaiduBO convertDTOToBO(SchisandraOssBaiduDTO schisandraOssBaiduDTO);
SchisandraOssBaiduDTO convertBOToDTO(SchisandraOssBaiduBO schisandraOssBaiduBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssFtpDTO;
import com.schisandra.oss.domain.bo.SchisandraOssFtpBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* ftp存储配置表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 21:54:20
*/
@Mapper
public interface SchisandraOssFtpDTOConverter {
SchisandraOssFtpDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssFtpDTOConverter.class);
SchisandraOssFtpBO convertDTOToBO(SchisandraOssFtpDTO schisandraOssFtpDTO);
SchisandraOssFtpDTO convertBOToDTO(SchisandraOssFtpBO schisandraOssFtpBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssHuaweiDTO;
import com.schisandra.oss.domain.bo.SchisandraOssHuaweiBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 华为云对象存储配置表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 21:59:56
*/
@Mapper
public interface SchisandraOssHuaweiDTOConverter {
SchisandraOssHuaweiDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssHuaweiDTOConverter.class);
SchisandraOssHuaweiBO convertDTOToBO(SchisandraOssHuaweiDTO schisandraOssHuaweiDTO);
SchisandraOssHuaweiDTO convertBOToDTO(SchisandraOssHuaweiBO schisandraOssHuaweiBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssJdDTO;
import com.schisandra.oss.domain.bo.SchisandraOssJdBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 京东云对象存储配置表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 22:07:10
*/
@Mapper
public interface SchisandraOssJdDTOConverter {
SchisandraOssJdDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssJdDTOConverter.class);
SchisandraOssJdBO convertDTOToBO(SchisandraOssJdDTO schisandraOssJdDTO);
SchisandraOssJdDTO convertBOToDTO(SchisandraOssJdBO schisandraOssJdBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssJdbcDTO;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* jdbc存储配置表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 22:08:16
*/
@Mapper
public interface SchisandraOssJdbcDTOConverter {
SchisandraOssJdbcDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssJdbcDTOConverter.class);
SchisandraOssJdbcBO convertDTOToBO(SchisandraOssJdbcDTO schisandraOssJdbcDTO);
SchisandraOssJdbcDTO convertBOToDTO(SchisandraOssJdbcBO schisandraOssJdbcBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssJdbcDataDTO;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcDataBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* jdbc存储数据表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 22:08:55
*/
@Mapper
public interface SchisandraOssJdbcDataDTOConverter {
SchisandraOssJdbcDataDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssJdbcDataDTOConverter.class);
SchisandraOssJdbcDataBO convertDTOToBO(SchisandraOssJdbcDataDTO schisandraOssJdbcDataDTO);
SchisandraOssJdbcDataDTO convertBOToDTO(SchisandraOssJdbcDataBO schisandraOssJdbcDataBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssJdbcStoreDTO;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcStoreBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* jdbc存储信息表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 22:11:22
*/
@Mapper
public interface SchisandraOssJdbcStoreDTOConverter {
SchisandraOssJdbcStoreDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssJdbcStoreDTOConverter.class);
SchisandraOssJdbcStoreBO convertDTOToBO(SchisandraOssJdbcStoreDTO schisandraOssJdbcStoreDTO);
SchisandraOssJdbcStoreDTO convertBOToDTO(SchisandraOssJdbcStoreBO schisandraOssJdbcStoreBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssJinshanDTO;
import com.schisandra.oss.domain.bo.SchisandraOssJinshanBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 金山云对象存储配置表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 22:13:26
*/
@Mapper
public interface SchisandraOssJinshanDTOConverter {
SchisandraOssJinshanDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssJinshanDTOConverter.class);
SchisandraOssJinshanBO convertDTOToBO(SchisandraOssJinshanDTO schisandraOssJinshanDTO);
SchisandraOssJinshanDTO convertBOToDTO(SchisandraOssJinshanBO schisandraOssJinshanBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssLocalDTO;
import com.schisandra.oss.domain.bo.SchisandraOssLocalBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 本地存储配置表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 22:18:08
*/
@Mapper
public interface SchisandraOssLocalDTOConverter {
SchisandraOssLocalDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssLocalDTOConverter.class);
SchisandraOssLocalBO convertDTOToBO(SchisandraOssLocalDTO schisandraOssLocalDTO);
SchisandraOssLocalDTO convertBOToDTO(SchisandraOssLocalBO schisandraOssLocalBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssPinganDTO;
import com.schisandra.oss.domain.bo.SchisandraOssPinganBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 平安云对象存储配置表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 22:19:22
*/
@Mapper
public interface SchisandraOssPinganDTOConverter {
SchisandraOssPinganDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssPinganDTOConverter.class);
SchisandraOssPinganBO convertDTOToBO(SchisandraOssPinganDTO schisandraOssPinganDTO);
SchisandraOssPinganDTO convertBOToDTO(SchisandraOssPinganBO schisandraOssPinganBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssQingyunDTO;
import com.schisandra.oss.domain.bo.SchisandraOssQingyunBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 青云对象存储配置表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 22:21:09
*/
@Mapper
public interface SchisandraOssQingyunDTOConverter {
SchisandraOssQingyunDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssQingyunDTOConverter.class);
SchisandraOssQingyunBO convertDTOToBO(SchisandraOssQingyunDTO schisandraOssQingyunDTO);
SchisandraOssQingyunDTO convertBOToDTO(SchisandraOssQingyunBO schisandraOssQingyunBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssQiniuDTO;
import com.schisandra.oss.domain.bo.SchisandraOssQiniuBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 七牛云对象存储配置表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 22:25:11
*/
@Mapper
public interface SchisandraOssQiniuDTOConverter {
SchisandraOssQiniuDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssQiniuDTOConverter.class);
SchisandraOssQiniuBO convertDTOToBO(SchisandraOssQiniuDTO schisandraOssQiniuDTO);
SchisandraOssQiniuDTO convertBOToDTO(SchisandraOssQiniuBO schisandraOssQiniuBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssUcloudDTO;
import com.schisandra.oss.domain.bo.SchisandraOssUcloudBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* ucloud对象存储配置表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 22:27:45
*/
@Mapper
public interface SchisandraOssUcloudDTOConverter {
SchisandraOssUcloudDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssUcloudDTOConverter.class);
SchisandraOssUcloudBO convertDTOToBO(SchisandraOssUcloudDTO schisandraOssUcloudDTO);
SchisandraOssUcloudDTO convertBOToDTO(SchisandraOssUcloudBO schisandraOssUcloudBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssUpDTO;
import com.schisandra.oss.domain.bo.SchisandraOssUpBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 又拍云对象存储配置表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 22:29:27
*/
@Mapper
public interface SchisandraOssUpDTOConverter {
SchisandraOssUpDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssUpDTOConverter.class);
SchisandraOssUpBO convertDTOToBO(SchisandraOssUpDTO schisandraOssUpDTO);
SchisandraOssUpDTO convertBOToDTO(SchisandraOssUpBO schisandraOssUpBO);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.application.convert;
import com.schisandra.oss.application.dto.SchisandraOssWangyiDTO;
import com.schisandra.oss.domain.bo.SchisandraOssWangyiBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 网易数帆对象存储配置表 dto转换器
*
* @author landaiqing
* @since 2024-06-02 22:31:37
*/
@Mapper
public interface SchisandraOssWangyiDTOConverter {
SchisandraOssWangyiDTOConverter INSTANCE = Mappers.getMapper(SchisandraOssWangyiDTOConverter.class);
SchisandraOssWangyiBO convertDTOToBO(SchisandraOssWangyiDTO schisandraOssWangyiDTO);
SchisandraOssWangyiDTO convertBOToDTO(SchisandraOssWangyiBO schisandraOssWangyiBO);
}

View File

@@ -6,10 +6,10 @@ import java.io.Serializable;
import java.util.Date;
/**
* dto
* 百度云对象存储配置表 dto
*
* @author landaiqing
* @since 2024-05-17 21:17:28
* @since 2024-06-02 22:02:15
*/
@Data
public class SchisandraOssBaiduDTO implements Serializable {

View File

@@ -0,0 +1,138 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* ftp存储配置表 dto
*
* @author landaiqing
* @since 2024-06-02 21:54:20
*/
@Data
public class SchisandraOssFtpDTO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
* 主机
*/
private String host;
/**
* 端口
*/
private Integer port;
/**
* 用户名
*/
private String user;
/**
* 密码
*/
private String password;
/**
* 编码
*/
private String charset;
/**
* FTP连接模式,默认被动
*/
private String mode;
/**
* 设置执行完操作是否返回当前目录,默认false
*/
private String backToPwd;
/**
* 连接超时时长,单位毫秒
*/
private Long connectionTimeout;
/**
* Socket连接超时时长单位毫秒
*/
private Long soTimeout;
/**
* 设置服务器语言
*/
private String serverLanguageCode;
/**
* 设置服务器系统关键词
*/
private String systemKey;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
}

View File

@@ -0,0 +1,253 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 华为云对象存储配置表 dto
*
* @author landaiqing
* @since 2024-06-02 21:59:56
*/
@Data
public class SchisandraOssHuaweiDTO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
*
*/
private String accessKey;
/**
*
*/
private String secretKey;
/**
*
*/
private String endPoint;
/**
*
*/
private String bucketName;
/**
* 建立HTTP/HTTPS连接的超时时间单位毫秒。默认为60000毫秒。
*/
private Integer connectionTimeout;
/**
* 如果空闲时间超过此参数的设定值则关闭连接单位毫秒。默认为30000毫秒。
*/
private Integer idleConnectionTime;
/**
* 连接池中最大空闲连接数默认值1000。
*/
private Integer maxIdleConnections;
/**
* 最大允许的HTTP并发请求数。默认为1000。
*/
private Integer maxConnections;
/**
* 请求失败请求异常、服务端报500或503错误等后最大的重试次数。默认3次。
*/
private Integer maxErrorRetry;
/**
* Socket层传输数据的超时时间单位毫秒。默认为60000毫秒。
*/
private Integer socketTimeout;
/**
* 设置HTTP请求的端口号 (默认为80)。
*/
private Integer endpointHttpPort;
/**
* 定是否使用HTTPS连接OBS (默认为 “true”)。
*/
private String endpointHttpsPort;
/**
* 定是否使用HTTPS连接OBS (默认为 “true”)。
*/
private String httpsOnly;
/**
* 指定是否启用对OBS的路径样式访问。“true” 表示启用了路径样式的访问,而 “false” (默认) 表示启用了虚拟托管样式的访问。注意: 如果启用了路径样式访问则不支持OBS 3.0的新bucket功能。
*/
private String pathStyle;
/**
* HTTP代理配置。默认为空。
*/
private String httpProxy;
/**
* 上传流对象时使用的缓存大小单位字节。默认为512KB。
*/
private Integer uploadStreamRetryBufferSize;
/**
* 是否验证服务端证书。默认为false。
*/
private String validateCertificate;
/**
* 是否验证响应头信息的ContentType。默认为true。
*/
private String verifyResponseContentType;
/**
* 从Socket流下载对象的缓存大小单位字节-1表示不设置缓存。默认为-1。
*/
private Integer readBufferSize;
/**
* 上传对象到Socket流时的缓存大小单位字节-1表示不设置缓存。默认为-1。
*/
private Double writeBufferSize;
/**
* 是否严格验证服务端主机名。默认为false。
*/
private String isStrictHostnameVerification;
/**
* 设置身份验证类型。
*/
private String authType;
/**
* Socket发送缓冲区大小单位字节对应java.net.SocketOptions.SO_SNDBUF参数。默认为-1表示不设置。
*/
private Integer socketWriteBufferSize;
/**
* Socket接收缓冲区大小单位字节对应java.net.SocketOptions.SO_RCVBUF参数。默认为-1表示不设置。
*/
private Integer socketReadBufferSize;
/**
* 是否使用长连接访问OBS服务。默认为true。
*/
private String keepAlive;
/**
* 指定是否使用协议协商。
*/
private String authTypeNegotiation;
/**
* 是否通过自定义域名访问OBS服务。默认为false。
*/
private String cname;
/**
* 将文件夹隔离器设置为斜线。
*/
private String delimiter;
/**
* SSLContext的Provider默认使用JDK提供的SSLContext。
*/
private String sslProvider;
/**
* 访问OBS服务端时使用的HTTP协议类型。默认为HTTP1.1协议。
*/
private String httpProtocolType;
/**
* 是否开启Okhttp中的连接失败重试默认关闭
*/
private String retryOnConnectionFailureInOkhttp;
/**
* 发生异常时最大重试次数
*/
private String maxRetryOnUnexpectedEndException;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,293 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 京东云对象存储配置表 dto
*
* @author landaiqing
* @since 2024-06-02 22:07:10
*/
@Data
public class SchisandraOssJdDTO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
*
*/
private String bucketName;
/**
*
*/
private String endpoint;
/**
*
*/
private String accessKey;
/**
*
*/
private String secretKey;
/**
*
*/
private String region;
/**
* 建立连接的超时时间单位毫秒。默认为50000毫秒
*/
private Integer connectionTimeout;
/**
* 允许打开的最大HTTP连接数。默认为1024
*/
private Integer maxConnections;
/**
* 请求失败后最大的重试次数
*/
private Integer maxErrorRetry;
/**
* 是否限制重试的默认值。
*/
private String throttleRetries;
/**
* 连接协议类型
*/
private String protocol;
/**
* 连接到HTTP代理时要使用的协议。
*/
private String proxyProtocol;
/**
* 访问NTLM验证的代理服务器的Windows域名
*/
private String proxyDomain;
/**
* 代理服务器主机地址
*/
private String proxyHost;
/**
* 代理服务器验证的密码
*/
private String proxyPassword;
/**
* 代理服务器端口
*/
private String proxyPort;
/**
* 代理服务器验证的用户名
*/
private String proxyUsername;
/**
* NTLM代理服务器的Windows工作站名称
*/
private String proxyWorkstation;
/**
* 指定不通过代理应访问的主机。
*/
private String nonProxyHosts;
/**
* 是否禁用Socket代理
*/
private String disableSocketProxy;
/**
* 是否使用基本身份验证对代理服务器进行抢先身份验证
*/
private String preemptiveBasicProxyAuth;
/**
* Socket层传输数据的超时时间单位毫秒。默认为50000毫秒
*/
private Integer socketTimeout;
/**
* 请求的默认超时时间。默认为0禁用的。
*/
private Integer requestTimeout;
/**
* 请求的默认超时时间。默认为0禁用的。
*/
private Integer clientExecutionTimeout;
/**
* 公共HTTP请求头前缀。
*/
private String userAgentPrefix;
/**
* 是否使用com.amazonaws.http.IdleConnectionReaper管理旧连接
*/
private String useReaper;
/**
* 是否使用gzip解压缩
*/
private String useGzip;
/**
* Socket发送缓冲区的大小提示(以字节为单位)。
*/
private Integer socketSendBufferSizeHint;
/**
* Socket接收缓冲区的大小提示(以字节为单位)。
*/
private Integer socketReceiveBufferSizeHint;
/**
* 设置签名算法对请求进行签名。如果未明确设置客户端将通过提取SDK中的配置文件来确定要使用的算法
*/
private String signerOverride;
/**
* 响应元数据缓存大小
*/
private Integer responseMetadataCacheSize;
/**
* 是否使用USE_EXPECT_CONTINUE作为期望值
*/
private String useExpectContinue;
/**
* 是否缓存响应元数据
*/
private String cacheResponseMetadata;
/**
* 连接TTL (生存时间)。Http连接由连接管理器用TTL缓存。
*/
private Long connectionTTL;
/**
* 连接池中连接的最大空闲时间 (以毫秒为单位)。
*/
private Long connectionMaxIdleMillis;
/**
* 在必须验证连接是否仍处于打开状态之前,连接可以在连接池中处于空闲状态。
*/
private Integer validateAfterInActivityMillis;
/**
* 是否使用TCP KeepAlive的默认值。
*/
private String tcpKeepAlive;
/**
* 所有请求的公共请求头
*/
private String headers;
/**
* 请求失败最大重试次数
*/
private Integer maxConsecutiveRetriesBeforeThrottling;
/**
* 是否禁用主机前缀
*/
private String disableHostPrefixInjection;
/**
* 重试模式
*/
private String retryMode;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,93 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* jdbc存储配置表 dto
*
* @author landaiqing
* @since 2024-06-02 22:08:16
*/
@Data
public class SchisandraOssJdbcDTO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
* 系统数据源Bean名称(适用于系统多数据源配置)
*/
private String dataSourceName;
/**
* 对象存储数据源
*/
private String url;
/**
*
*/
private String type;
/**
*
*/
private String driver;
/**
*
*/
private String username;
/**
*
*/
private String password;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
}

View File

@@ -0,0 +1,63 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* jdbc存储数据表 dto
*
* @author landaiqing
* @since 2024-06-02 22:08:55
*/
@Data
public class SchisandraOssJdbcDataDTO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
* 数据
*/
private byte[] data;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
}

View File

@@ -0,0 +1,88 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* jdbc存储信息表 dto
*
* @author landaiqing
* @since 2024-06-02 22:11:22
*/
@Data
public class SchisandraOssJdbcStoreDTO implements Serializable {
/**
* 主键
*/
private Long id;
/**
*
*/
private Long userId;
/**
* 文件/目录名
*/
private String name;
/**
* 路径
*/
private String path;
/**
* 文件大小
*/
private Double size;
/**
* 父级目录ID
*/
private Integer parentId;
/**
* 类型(D:目录;F:文件)
*/
private String type;
/**
* 数据ID
*/
private String dataId;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
}

View File

@@ -0,0 +1,170 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 金山云对象存储配置表 dto
*
* @author landaiqing
* @since 2024-06-02 22:13:26
*/
@Data
public class SchisandraOssJinshanDTO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String accessKeyId;
/**
*
*/
private String accessKeySecret;
/**
*
*/
private String bucketName;
/**
*
*/
private String endpoint;
/**
* 服务地址,参考 http://ks3.ksyun.com/doc/api/index.html Doc
* 中国(杭州):kss.ksyun.com
* 中国杭州cdn:kssws.ks-cdn.com
* 美国(圣克拉拉):ks3-us-west-1.ksyun.com
* 中国(北京):ks3-cn-beijing.ksyun.com
* 中国(香港):ks3-cn-hk-1.ksyun.com
* 中国(上海):ks3-cn-shanghai.ksyun.com
*/
private String region;
/**
*
*/
private String securityToken;
/**
*
*/
private String basePath;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* http或者https
*/
private String protocol;
/**
* 签名版本
*/
private String version;
/**
* 是否使用path style access方式访问
*/
private String pathStyleAccess;
/**
* 允许客户端发送匿名请求
*/
private String allowAnonymous;
/**
* 当服务端返回307时是否自动跳转
* 主要发生在用Region A的endpoint请求Region B的endpoint
*/
private String flowRedirect;
/**
* 是否使用绑定的域名作为endpoint
*/
private String domainMode;
/**
* 签名类
*/
private String signerClass;
/**
* 是否压缩
*/
private String useGzip;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 状态
*/
private String status;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,68 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 本地存储配置表 dto
*
* @author landaiqing
* @since 2024-06-02 22:18:08
*/
@Data
public class SchisandraOssLocalDTO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
* 状态
*/
private String status;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
}

View File

@@ -0,0 +1,133 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 平安云对象存储配置表 dto
*
* @author landaiqing
* @since 2024-06-02 22:19:22
*/
@Data
public class SchisandraOssPinganDTO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long systemUserId;
/**
*
*/
private String userAgent;
/**
*
*/
private String obsUrl;
/**
*
*/
private String obsAccessKey;
/**
*
*/
private String obsSecret;
/**
*
*/
private String userId;
/**
*
*/
private String basePath;
/**
*
*/
private String bucketName;
/**
*
*/
private String representPathInKey;
/**
*
*/
private String domainName;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
}

View File

@@ -0,0 +1,148 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 青云对象存储配置表 dto
*
* @author landaiqing
* @since 2024-06-02 22:21:09
*/
@Data
public class SchisandraOssQingyunDTO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String endpoint;
/**
*
*/
private String accessKey;
/**
*
*/
private String accessSecret;
/**
*
*/
private String bucketName;
/**
*
*/
private String zone;
/**
*
*/
private String basePath;
/**
* 是否支持CNAME作为Endpoint默认不支持CNAME。
*/
private String cnameSupport;
/**
* 附加的用户代理
*/
private String additionalUserAgent;
/**
* 是否启用虚拟Host
*/
private String virtualHostEnabled;
/**
* 读超时时间
*/
private Integer readTimeout;
/**
* 写超时时间
*/
private Integer writeTimeout;
/**
* 连接超时时间
*/
private Integer connectionTimeout;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,173 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 七牛云对象存储配置表 dto
*
* @author landaiqing
* @since 2024-06-02 22:25:11
*/
@Data
public class SchisandraOssQiniuDTO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
*
*/
private String accessKey;
/**
*
*/
private String secretKey;
/**
*
*/
private String bucketName;
/**
* 使用的Region
*/
private String region;
/**
* 空间相关上传管理操作是否使用 https , 默认 是
*/
private String useHttpsDomains;
/**
* 空间相关上传管理操作是否使用代理加速上传,默认 是
*/
private String accUpHostFirst;
/**
* 使用 AutoRegion 时,如果从区域信息得到上传 host 失败,使用默认的上传域名上传,默认 是upload.qiniup.com,uploadz1.qiniup.com,upload-z2.qiniup.com,upload-na0.qiniup.com,upload-as0.qiniup.com
*/
private String useDefaultUpHostIfNone;
/**
* 如果文件大小大于此值则使用断点上传, 否则使用Form上传
*/
private String putThreshold;
/**
* 连接超时时间 单位秒(默认10s)
*/
private Integer connectTimeout;
/**
* 写超时时间 单位秒(默认 0 , 不超时)
*/
private Integer writeTimeout;
/**
* 回复超时时间 单位秒(默认30s)
*/
private Integer readTimeout;
/**
* 底层HTTP库所有的并发执行的请求数量
*/
private Integer dispatcherMaxRequests;
/**
* 底层HTTP库对每个独立的Host进行并发请求的数量
*/
private Integer dispatcherMaxRequestsPerHost;
/**
* 底层HTTP库中复用连接对象的最大空闲数量
*/
private Integer connectionPoolMaxIdleCount;
/**
* 底层HTTP库中复用连接对象的回收周期单位分钟
*/
private Integer connectionPoolMaxIdleMinutes;
/**
* 上传失败重试次数
*/
private String retryMax;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,143 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* ucloud对象存储配置表 dto
*
* @author landaiqing
* @since 2024-06-02 22:27:45
*/
@Data
public class SchisandraOssUcloudDTO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
*
*/
private String bucketName;
/**
*
*/
private String publicKey;
/**
*
*/
private String privateKey;
/**
*
*/
private String customHost;
/**
* 连接超时时间
*/
private Long timeoutConnect;
/**
* 读超时时间
*/
private Long timeoutRead;
/**
* 写超时时间
*/
private Long timeoutWrite;
/**
* okhttp最大空闲连接数5
*/
private Integer maxIdleConnections;
/**
* okhttp活动链接存货时间5分钟
*/
private Long keepAliveDuration;
/**
* okhttp活动链接存货时间单位, (分钟)
*/
private String keepAliveTimeUnit;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,118 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 又拍云对象存储配置表 dto
*
* @author landaiqing
* @since 2024-06-02 22:29:27
*/
@Data
public class SchisandraOssUpDTO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
*
*/
private String bucketName;
/**
*
*/
private String userName;
/**
*
*/
private String password;
/**
* 默认的超时时间30秒
*/
private Integer timeout;
/**
* 默认为自动识别接入点
*/
private String apiDomain;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,188 @@
package com.schisandra.oss.application.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 网易数帆对象存储配置表 dto
*
* @author landaiqing
* @since 2024-06-02 22:31:37
*/
@Data
public class SchisandraOssWangyiDTO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String accessKey;
/**
*
*/
private String secretKey;
/**
*
*/
private String endpoint;
/**
*
*/
private String bucketName;
/**
*
*/
private String basePath;
/**
* 连接超时时间
*/
private Integer connectionTimeout;
/**
* 最大连接池大小。
*/
private Integer maxConnections;
/**
* 最大失败重试次数
*/
private Integer maxErrorRetry;
/**
* 是否使用子域名
*/
private String isSubDomain;
/**
* 连接OSS所采用的协议HTTP或HTTPS默认为HTTP。
*/
private String protocol;
/**
* 代理服务器的域该域可以执行NTLM认证
*/
private String proxyDomain;
/**
* 代理服务器主机地址
*/
private String proxyHost;
/**
* 代理服务器验证的密码
*/
private String proxyPassword;
/**
* 代理服务器端口
*/
private Integer proxyPort;
/**
* 代理服务器验证的用户名
*/
private String proxyUsername;
/**
* 代理主机的NTLM身份验证服务器
*/
private String proxyWorkstation;
/**
* Socket层传输数据的超时时间单位毫秒。默认为50000毫秒。
*/
private Integer socketTimeout;
/**
* 用户代理指HTTP的User-Agent头
*/
private String userAgent;
/**
* Socket接收缓冲区的大小提示(以字节为单位)。
*/
private Integer socketReceiveBufferSizeHint;
/**
* Socket发送缓冲区的大小提示(以字节为单位)。
*/
private Integer socketSendBufferSizeHint;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -4,12 +4,11 @@ import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* bo
* 百度云对象存储配置表 bo
*
* @author landaiqing
* @since 2024-05-17 21:17:28
* @since 2024-06-02 22:02:15
*/
@Data
public class SchisandraOssBaiduBO implements Serializable {

View File

@@ -0,0 +1,137 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* ftp存储配置表 bo
*
* @author landaiqing
* @since 2024-06-02 21:54:20
*/
@Data
public class SchisandraOssFtpBO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
* 主机
*/
private String host;
/**
* 端口
*/
private Integer port;
/**
* 用户名
*/
private String user;
/**
* 密码
*/
private String password;
/**
* 编码
*/
private String charset;
/**
* FTP连接模式,默认被动
*/
private String mode;
/**
* 设置执行完操作是否返回当前目录,默认false
*/
private String backToPwd;
/**
* 连接超时时长,单位毫秒
*/
private Long connectionTimeout;
/**
* Socket连接超时时长单位毫秒
*/
private Long soTimeout;
/**
* 设置服务器语言
*/
private String serverLanguageCode;
/**
* 设置服务器系统关键词
*/
private String systemKey;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
}

View File

@@ -0,0 +1,252 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 华为云对象存储配置表 bo
*
* @author landaiqing
* @since 2024-06-02 21:59:56
*/
@Data
public class SchisandraOssHuaweiBO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
*
*/
private String accessKey;
/**
*
*/
private String secretKey;
/**
*
*/
private String endPoint;
/**
*
*/
private String bucketName;
/**
* 建立HTTP/HTTPS连接的超时时间单位毫秒。默认为60000毫秒。
*/
private Integer connectionTimeout;
/**
* 如果空闲时间超过此参数的设定值则关闭连接单位毫秒。默认为30000毫秒。
*/
private Integer idleConnectionTime;
/**
* 连接池中最大空闲连接数默认值1000。
*/
private Integer maxIdleConnections;
/**
* 最大允许的HTTP并发请求数。默认为1000。
*/
private Integer maxConnections;
/**
* 请求失败请求异常、服务端报500或503错误等后最大的重试次数。默认3次。
*/
private Integer maxErrorRetry;
/**
* Socket层传输数据的超时时间单位毫秒。默认为60000毫秒。
*/
private Integer socketTimeout;
/**
* 设置HTTP请求的端口号 (默认为80)。
*/
private Integer endpointHttpPort;
/**
* 定是否使用HTTPS连接OBS (默认为 “true”)。
*/
private String endpointHttpsPort;
/**
* 定是否使用HTTPS连接OBS (默认为 “true”)。
*/
private String httpsOnly;
/**
* 指定是否启用对OBS的路径样式访问。“true” 表示启用了路径样式的访问,而 “false” (默认) 表示启用了虚拟托管样式的访问。注意: 如果启用了路径样式访问则不支持OBS 3.0的新bucket功能。
*/
private String pathStyle;
/**
* HTTP代理配置。默认为空。
*/
private String httpProxy;
/**
* 上传流对象时使用的缓存大小单位字节。默认为512KB。
*/
private Integer uploadStreamRetryBufferSize;
/**
* 是否验证服务端证书。默认为false。
*/
private String validateCertificate;
/**
* 是否验证响应头信息的ContentType。默认为true。
*/
private String verifyResponseContentType;
/**
* 从Socket流下载对象的缓存大小单位字节-1表示不设置缓存。默认为-1。
*/
private Integer readBufferSize;
/**
* 上传对象到Socket流时的缓存大小单位字节-1表示不设置缓存。默认为-1。
*/
private Double writeBufferSize;
/**
* 是否严格验证服务端主机名。默认为false。
*/
private String isStrictHostnameVerification;
/**
* 设置身份验证类型。
*/
private String authType;
/**
* Socket发送缓冲区大小单位字节对应java.net.SocketOptions.SO_SNDBUF参数。默认为-1表示不设置。
*/
private Integer socketWriteBufferSize;
/**
* Socket接收缓冲区大小单位字节对应java.net.SocketOptions.SO_RCVBUF参数。默认为-1表示不设置。
*/
private Integer socketReadBufferSize;
/**
* 是否使用长连接访问OBS服务。默认为true。
*/
private String keepAlive;
/**
* 指定是否使用协议协商。
*/
private String authTypeNegotiation;
/**
* 是否通过自定义域名访问OBS服务。默认为false。
*/
private String cname;
/**
* 将文件夹隔离器设置为斜线。
*/
private String delimiter;
/**
* SSLContext的Provider默认使用JDK提供的SSLContext。
*/
private String sslProvider;
/**
* 访问OBS服务端时使用的HTTP协议类型。默认为HTTP1.1协议。
*/
private String httpProtocolType;
/**
* 是否开启Okhttp中的连接失败重试默认关闭
*/
private String retryOnConnectionFailureInOkhttp;
/**
* 发生异常时最大重试次数
*/
private String maxRetryOnUnexpectedEndException;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,292 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 京东云对象存储配置表 bo
*
* @author landaiqing
* @since 2024-06-02 22:07:10
*/
@Data
public class SchisandraOssJdBO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
*
*/
private String bucketName;
/**
*
*/
private String endpoint;
/**
*
*/
private String accessKey;
/**
*
*/
private String secretKey;
/**
*
*/
private String region;
/**
* 建立连接的超时时间单位毫秒。默认为50000毫秒
*/
private Integer connectionTimeout;
/**
* 允许打开的最大HTTP连接数。默认为1024
*/
private Integer maxConnections;
/**
* 请求失败后最大的重试次数
*/
private Integer maxErrorRetry;
/**
* 是否限制重试的默认值。
*/
private String throttleRetries;
/**
* 连接协议类型
*/
private String protocol;
/**
* 连接到HTTP代理时要使用的协议。
*/
private String proxyProtocol;
/**
* 访问NTLM验证的代理服务器的Windows域名
*/
private String proxyDomain;
/**
* 代理服务器主机地址
*/
private String proxyHost;
/**
* 代理服务器验证的密码
*/
private String proxyPassword;
/**
* 代理服务器端口
*/
private String proxyPort;
/**
* 代理服务器验证的用户名
*/
private String proxyUsername;
/**
* NTLM代理服务器的Windows工作站名称
*/
private String proxyWorkstation;
/**
* 指定不通过代理应访问的主机。
*/
private String nonProxyHosts;
/**
* 是否禁用Socket代理
*/
private String disableSocketProxy;
/**
* 是否使用基本身份验证对代理服务器进行抢先身份验证
*/
private String preemptiveBasicProxyAuth;
/**
* Socket层传输数据的超时时间单位毫秒。默认为50000毫秒
*/
private Integer socketTimeout;
/**
* 请求的默认超时时间。默认为0禁用的。
*/
private Integer requestTimeout;
/**
* 请求的默认超时时间。默认为0禁用的。
*/
private Integer clientExecutionTimeout;
/**
* 公共HTTP请求头前缀。
*/
private String userAgentPrefix;
/**
* 是否使用com.amazonaws.http.IdleConnectionReaper管理旧连接
*/
private String useReaper;
/**
* 是否使用gzip解压缩
*/
private String useGzip;
/**
* Socket发送缓冲区的大小提示(以字节为单位)。
*/
private Integer socketSendBufferSizeHint;
/**
* Socket接收缓冲区的大小提示(以字节为单位)。
*/
private Integer socketReceiveBufferSizeHint;
/**
* 设置签名算法对请求进行签名。如果未明确设置客户端将通过提取SDK中的配置文件来确定要使用的算法
*/
private String signerOverride;
/**
* 响应元数据缓存大小
*/
private Integer responseMetadataCacheSize;
/**
* 是否使用USE_EXPECT_CONTINUE作为期望值
*/
private String useExpectContinue;
/**
* 是否缓存响应元数据
*/
private String cacheResponseMetadata;
/**
* 连接TTL (生存时间)。Http连接由连接管理器用TTL缓存。
*/
private Long connectionTTL;
/**
* 连接池中连接的最大空闲时间 (以毫秒为单位)。
*/
private Long connectionMaxIdleMillis;
/**
* 在必须验证连接是否仍处于打开状态之前,连接可以在连接池中处于空闲状态。
*/
private Integer validateAfterInActivityMillis;
/**
* 是否使用TCP KeepAlive的默认值。
*/
private String tcpKeepAlive;
/**
* 所有请求的公共请求头
*/
private String headers;
/**
* 请求失败最大重试次数
*/
private Integer maxConsecutiveRetriesBeforeThrottling;
/**
* 是否禁用主机前缀
*/
private String disableHostPrefixInjection;
/**
* 重试模式
*/
private String retryMode;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,92 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* jdbc存储配置表 bo
*
* @author landaiqing
* @since 2024-06-02 22:08:16
*/
@Data
public class SchisandraOssJdbcBO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
* 系统数据源Bean名称(适用于系统多数据源配置)
*/
private String dataSourceName;
/**
* 对象存储数据源
*/
private String url;
/**
*
*/
private String type;
/**
*
*/
private String driver;
/**
*
*/
private String username;
/**
*
*/
private String password;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
}

View File

@@ -0,0 +1,62 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* jdbc存储数据表 bo
*
* @author landaiqing
* @since 2024-06-02 22:08:55
*/
@Data
public class SchisandraOssJdbcDataBO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
* 数据
*/
private byte[] data;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
}

View File

@@ -0,0 +1,87 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* jdbc存储信息表 bo
*
* @author landaiqing
* @since 2024-06-02 22:11:22
*/
@Data
public class SchisandraOssJdbcStoreBO implements Serializable {
/**
* 主键
*/
private Long id;
/**
*
*/
private Long userId;
/**
* 文件/目录名
*/
private String name;
/**
* 路径
*/
private String path;
/**
* 文件大小
*/
private Double size;
/**
* 父级目录ID
*/
private Integer parentId;
/**
* 类型(D:目录;F:文件)
*/
private String type;
/**
* 数据ID
*/
private String dataId;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
}

View File

@@ -0,0 +1,170 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 金山云对象存储配置表 bo
*
* @author landaiqing
* @since 2024-06-02 22:13:26
*/
@Data
public class SchisandraOssJinshanBO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String accessKeyId;
/**
*
*/
private String accessKeySecret;
/**
*
*/
private String bucketName;
/**
*
*/
private String endpoint;
/**
* 服务地址,参考 http://ks3.ksyun.com/doc/api/index.html Doc
* 中国(杭州):kss.ksyun.com
* 中国杭州cdn:kssws.ks-cdn.com
* 美国(圣克拉拉):ks3-us-west-1.ksyun.com
* 中国(北京):ks3-cn-beijing.ksyun.com
* 中国(香港):ks3-cn-hk-1.ksyun.com
* 中国(上海):ks3-cn-shanghai.ksyun.com
*/
private String region;
/**
*
*/
private String securityToken;
/**
*
*/
private String basePath;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* http或者https
*/
private String protocol;
/**
* 签名版本
*/
private String version;
/**
* 是否使用path style access方式访问
*/
private String pathStyleAccess;
/**
* 允许客户端发送匿名请求
*/
private String allowAnonymous;
/**
* 当服务端返回307时是否自动跳转
* 主要发生在用Region A的endpoint请求Region B的endpoint
*/
private String flowRedirect;
/**
* 是否使用绑定的域名作为endpoint
*/
private String domainMode;
/**
* 签名类
*/
private String signerClass;
/**
* 是否压缩
*/
private String useGzip;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 状态
*/
private String status;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,67 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 本地存储配置表 bo
*
* @author landaiqing
* @since 2024-06-02 22:18:08
*/
@Data
public class SchisandraOssLocalBO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
* 状态
*/
private String status;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
}

View File

@@ -0,0 +1,132 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 平安云对象存储配置表 bo
*
* @author landaiqing
* @since 2024-06-02 22:19:22
*/
@Data
public class SchisandraOssPinganBO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long systemUserId;
/**
*
*/
private String userAgent;
/**
*
*/
private String obsUrl;
/**
*
*/
private String obsAccessKey;
/**
*
*/
private String obsSecret;
/**
*
*/
private String userId;
/**
*
*/
private String basePath;
/**
*
*/
private String bucketName;
/**
*
*/
private String representPathInKey;
/**
*
*/
private String domainName;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
}

View File

@@ -0,0 +1,147 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 青云对象存储配置表 bo
*
* @author landaiqing
* @since 2024-06-02 22:21:09
*/
@Data
public class SchisandraOssQingyunBO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String endpoint;
/**
*
*/
private String accessKey;
/**
*
*/
private String accessSecret;
/**
*
*/
private String bucketName;
/**
*
*/
private String zone;
/**
*
*/
private String basePath;
/**
* 是否支持CNAME作为Endpoint默认不支持CNAME。
*/
private String cnameSupport;
/**
* 附加的用户代理
*/
private String additionalUserAgent;
/**
* 是否启用虚拟Host
*/
private String virtualHostEnabled;
/**
* 读超时时间
*/
private Integer readTimeout;
/**
* 写超时时间
*/
private Integer writeTimeout;
/**
* 连接超时时间
*/
private Integer connectionTimeout;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,172 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 七牛云对象存储配置表 bo
*
* @author landaiqing
* @since 2024-06-02 22:25:11
*/
@Data
public class SchisandraOssQiniuBO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
*
*/
private String accessKey;
/**
*
*/
private String secretKey;
/**
*
*/
private String bucketName;
/**
* 使用的Region
*/
private String region;
/**
* 空间相关上传管理操作是否使用 https , 默认 是
*/
private String useHttpsDomains;
/**
* 空间相关上传管理操作是否使用代理加速上传,默认 是
*/
private String accUpHostFirst;
/**
* 使用 AutoRegion 时,如果从区域信息得到上传 host 失败,使用默认的上传域名上传,默认 是upload.qiniup.com,uploadz1.qiniup.com,upload-z2.qiniup.com,upload-na0.qiniup.com,upload-as0.qiniup.com
*/
private String useDefaultUpHostIfNone;
/**
* 如果文件大小大于此值则使用断点上传, 否则使用Form上传
*/
private String putThreshold;
/**
* 连接超时时间 单位秒(默认10s)
*/
private Integer connectTimeout;
/**
* 写超时时间 单位秒(默认 0 , 不超时)
*/
private Integer writeTimeout;
/**
* 回复超时时间 单位秒(默认30s)
*/
private Integer readTimeout;
/**
* 底层HTTP库所有的并发执行的请求数量
*/
private Integer dispatcherMaxRequests;
/**
* 底层HTTP库对每个独立的Host进行并发请求的数量
*/
private Integer dispatcherMaxRequestsPerHost;
/**
* 底层HTTP库中复用连接对象的最大空闲数量
*/
private Integer connectionPoolMaxIdleCount;
/**
* 底层HTTP库中复用连接对象的回收周期单位分钟
*/
private Integer connectionPoolMaxIdleMinutes;
/**
* 上传失败重试次数
*/
private String retryMax;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,142 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* ucloud对象存储配置表 bo
*
* @author landaiqing
* @since 2024-06-02 22:27:45
*/
@Data
public class SchisandraOssUcloudBO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
*
*/
private String bucketName;
/**
*
*/
private String publicKey;
/**
*
*/
private String privateKey;
/**
*
*/
private String customHost;
/**
* 连接超时时间
*/
private Long timeoutConnect;
/**
* 读超时时间
*/
private Long timeoutRead;
/**
* 写超时时间
*/
private Long timeoutWrite;
/**
* okhttp最大空闲连接数5
*/
private Integer maxIdleConnections;
/**
* okhttp活动链接存货时间5分钟
*/
private Long keepAliveDuration;
/**
* okhttp活动链接存货时间单位, (分钟)
*/
private String keepAliveTimeUnit;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,117 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 又拍云对象存储配置表 bo
*
* @author landaiqing
* @since 2024-06-02 22:29:27
*/
@Data
public class SchisandraOssUpBO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String basePath;
/**
*
*/
private String bucketName;
/**
*
*/
private String userName;
/**
*
*/
private String password;
/**
* 默认的超时时间30秒
*/
private Integer timeout;
/**
* 默认为自动识别接入点
*/
private String apiDomain;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -0,0 +1,187 @@
package com.schisandra.oss.domain.bo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 网易数帆对象存储配置表 bo
*
* @author landaiqing
* @since 2024-06-02 22:31:37
*/
@Data
public class SchisandraOssWangyiBO implements Serializable {
/**
*
*/
private Long id;
/**
*
*/
private Long userId;
/**
*
*/
private String accessKey;
/**
*
*/
private String secretKey;
/**
*
*/
private String endpoint;
/**
*
*/
private String bucketName;
/**
*
*/
private String basePath;
/**
* 连接超时时间
*/
private Integer connectionTimeout;
/**
* 最大连接池大小。
*/
private Integer maxConnections;
/**
* 最大失败重试次数
*/
private Integer maxErrorRetry;
/**
* 是否使用子域名
*/
private String isSubDomain;
/**
* 连接OSS所采用的协议HTTP或HTTPS默认为HTTP。
*/
private String protocol;
/**
* 代理服务器的域该域可以执行NTLM认证
*/
private String proxyDomain;
/**
* 代理服务器主机地址
*/
private String proxyHost;
/**
* 代理服务器验证的密码
*/
private String proxyPassword;
/**
* 代理服务器端口
*/
private Integer proxyPort;
/**
* 代理服务器验证的用户名
*/
private String proxyUsername;
/**
* 代理主机的NTLM身份验证服务器
*/
private String proxyWorkstation;
/**
* Socket层传输数据的超时时间单位毫秒。默认为50000毫秒。
*/
private Integer socketTimeout;
/**
* 用户代理指HTTP的User-Agent头
*/
private String userAgent;
/**
* Socket接收缓冲区的大小提示(以字节为单位)。
*/
private Integer socketReceiveBufferSizeHint;
/**
* Socket发送缓冲区的大小提示(以字节为单位)。
*/
private Integer socketSendBufferSizeHint;
/**
* 分片大小,默认5MB
*/
private Integer partSize;
/**
* 并发线程数,默认等于CPU的核数
*/
private Integer taskNum;
/**
* 状态
*/
private String status;
/**
* 是否开启高级设置
*/
private String openAdvancedSetup;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 是否删除 0 未删除 1已删除
*/
private Integer isDeleted;
/**
* 额外字段
*/
private String extraJson;
/**
* 当桶不存在,是否创建
*/
private String createBucket;
/**
* 启动检测桶,是否存在
*/
private String checkBucket;
}

View File

@@ -1,16 +1,15 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssBaiduBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssBaidu;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* bo转换器
* 百度云对象存储配置表 bo转换器
*
* @author landaiqing
* @since 2024-05-17 21:17:28
* @since 2024-06-02 22:02:15
*/
@Mapper
public interface SchisandraOssBaiduBOConverter {
@@ -18,5 +17,6 @@ public interface SchisandraOssBaiduBOConverter {
SchisandraOssBaiduBOConverter INSTANCE = Mappers.getMapper(SchisandraOssBaiduBOConverter.class);
SchisandraOssBaidu convertBOToEntity(SchisandraOssBaiduBO schisandraOssBaiduBO);
SchisandraOssBaiduBO convertEntityToBO(SchisandraOssBaidu schisandraOssBaidu);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssFtpBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssFtp;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* ftp存储配置表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 21:54:20
*/
@Mapper
public interface SchisandraOssFtpBOConverter {
SchisandraOssFtpBOConverter INSTANCE = Mappers.getMapper(SchisandraOssFtpBOConverter.class);
SchisandraOssFtp convertBOToEntity(SchisandraOssFtpBO schisandraOssFtpBO);
SchisandraOssFtpBO convertEntityToBO(SchisandraOssFtp schisandraOssFtp);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssHuaweiBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssHuawei;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 华为云对象存储配置表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 21:59:56
*/
@Mapper
public interface SchisandraOssHuaweiBOConverter {
SchisandraOssHuaweiBOConverter INSTANCE = Mappers.getMapper(SchisandraOssHuaweiBOConverter.class);
SchisandraOssHuawei convertBOToEntity(SchisandraOssHuaweiBO schisandraOssHuaweiBO);
SchisandraOssHuaweiBO convertEntityToBO(SchisandraOssHuawei schisandraOssHuawei);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssJdBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssJd;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 京东云对象存储配置表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 22:07:10
*/
@Mapper
public interface SchisandraOssJdBOConverter {
SchisandraOssJdBOConverter INSTANCE = Mappers.getMapper(SchisandraOssJdBOConverter.class);
SchisandraOssJd convertBOToEntity(SchisandraOssJdBO schisandraOssJdBO);
SchisandraOssJdBO convertEntityToBO(SchisandraOssJd schisandraOssJd);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssJdbc;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* jdbc存储配置表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 22:08:16
*/
@Mapper
public interface SchisandraOssJdbcBOConverter {
SchisandraOssJdbcBOConverter INSTANCE = Mappers.getMapper(SchisandraOssJdbcBOConverter.class);
SchisandraOssJdbc convertBOToEntity(SchisandraOssJdbcBO schisandraOssJdbcBO);
SchisandraOssJdbcBO convertEntityToBO(SchisandraOssJdbc schisandraOssJdbc);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcDataBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssJdbcData;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* jdbc存储数据表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 22:08:55
*/
@Mapper
public interface SchisandraOssJdbcDataBOConverter {
SchisandraOssJdbcDataBOConverter INSTANCE = Mappers.getMapper(SchisandraOssJdbcDataBOConverter.class);
SchisandraOssJdbcData convertBOToEntity(SchisandraOssJdbcDataBO schisandraOssJdbcDataBO);
SchisandraOssJdbcDataBO convertEntityToBO(SchisandraOssJdbcData schisandraOssJdbcData);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcStoreBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssJdbcStore;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* jdbc存储信息表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 22:11:22
*/
@Mapper
public interface SchisandraOssJdbcStoreBOConverter {
SchisandraOssJdbcStoreBOConverter INSTANCE = Mappers.getMapper(SchisandraOssJdbcStoreBOConverter.class);
SchisandraOssJdbcStore convertBOToEntity(SchisandraOssJdbcStoreBO schisandraOssJdbcStoreBO);
SchisandraOssJdbcStoreBO convertEntityToBO(SchisandraOssJdbcStore schisandraOssJdbcStore);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssJinshanBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssJinshan;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 金山云对象存储配置表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 22:13:26
*/
@Mapper
public interface SchisandraOssJinshanBOConverter {
SchisandraOssJinshanBOConverter INSTANCE = Mappers.getMapper(SchisandraOssJinshanBOConverter.class);
SchisandraOssJinshan convertBOToEntity(SchisandraOssJinshanBO schisandraOssJinshanBO);
SchisandraOssJinshanBO convertEntityToBO(SchisandraOssJinshan schisandraOssJinshan);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssLocalBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssLocal;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 本地存储配置表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 22:18:08
*/
@Mapper
public interface SchisandraOssLocalBOConverter {
SchisandraOssLocalBOConverter INSTANCE = Mappers.getMapper(SchisandraOssLocalBOConverter.class);
SchisandraOssLocal convertBOToEntity(SchisandraOssLocalBO schisandraOssLocalBO);
SchisandraOssLocalBO convertEntityToBO(SchisandraOssLocal schisandraOssLocal);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssPinganBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssPingan;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 平安云对象存储配置表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 22:19:22
*/
@Mapper
public interface SchisandraOssPinganBOConverter {
SchisandraOssPinganBOConverter INSTANCE = Mappers.getMapper(SchisandraOssPinganBOConverter.class);
SchisandraOssPingan convertBOToEntity(SchisandraOssPinganBO schisandraOssPinganBO);
SchisandraOssPinganBO convertEntityToBO(SchisandraOssPingan schisandraOssPingan);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssQingyunBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssQingyun;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 青云对象存储配置表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 22:21:09
*/
@Mapper
public interface SchisandraOssQingyunBOConverter {
SchisandraOssQingyunBOConverter INSTANCE = Mappers.getMapper(SchisandraOssQingyunBOConverter.class);
SchisandraOssQingyun convertBOToEntity(SchisandraOssQingyunBO schisandraOssQingyunBO);
SchisandraOssQingyunBO convertEntityToBO(SchisandraOssQingyun schisandraOssQingyun);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssQiniuBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssQiniu;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 七牛云对象存储配置表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 22:25:11
*/
@Mapper
public interface SchisandraOssQiniuBOConverter {
SchisandraOssQiniuBOConverter INSTANCE = Mappers.getMapper(SchisandraOssQiniuBOConverter.class);
SchisandraOssQiniu convertBOToEntity(SchisandraOssQiniuBO schisandraOssQiniuBO);
SchisandraOssQiniuBO convertEntityToBO(SchisandraOssQiniu schisandraOssQiniu);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssUcloudBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssUcloud;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* ucloud对象存储配置表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 22:27:45
*/
@Mapper
public interface SchisandraOssUcloudBOConverter {
SchisandraOssUcloudBOConverter INSTANCE = Mappers.getMapper(SchisandraOssUcloudBOConverter.class);
SchisandraOssUcloud convertBOToEntity(SchisandraOssUcloudBO schisandraOssUcloudBO);
SchisandraOssUcloudBO convertEntityToBO(SchisandraOssUcloud schisandraOssUcloud);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssUpBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssUp;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 又拍云对象存储配置表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 22:29:27
*/
@Mapper
public interface SchisandraOssUpBOConverter {
SchisandraOssUpBOConverter INSTANCE = Mappers.getMapper(SchisandraOssUpBOConverter.class);
SchisandraOssUp convertBOToEntity(SchisandraOssUpBO schisandraOssUpBO);
SchisandraOssUpBO convertEntityToBO(SchisandraOssUp schisandraOssUp);
}

View File

@@ -0,0 +1,22 @@
package com.schisandra.oss.domain.convert;
import com.schisandra.oss.domain.bo.SchisandraOssWangyiBO;
import com.schisandra.oss.infra.basic.entity.SchisandraOssWangyi;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* 网易数帆对象存储配置表 bo转换器
*
* @author landaiqing
* @since 2024-06-02 22:31:37
*/
@Mapper
public interface SchisandraOssWangyiBOConverter {
SchisandraOssWangyiBOConverter INSTANCE = Mappers.getMapper(SchisandraOssWangyiBOConverter.class);
SchisandraOssWangyi convertBOToEntity(SchisandraOssWangyiBO schisandraOssWangyiBO);
SchisandraOssWangyiBO convertEntityToBO(SchisandraOssWangyi schisandraOssWangyi);
}

View File

@@ -3,25 +3,25 @@ package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssBaiduBO;
/**
* 领域service
* 百度云对象存储配置表 领域service
*
* @author landaiqing
* @since 2024-05-17 21:17:28
* @since 2024-06-02 22:02:15
*/
public interface SchisandraOssBaiduDomainService {
/**
* 添加 信息
* 添加 百度云对象存储配置表 信息
*/
Boolean add(SchisandraOssBaiduBO schisandraOssBaiduBO);
/**
* 更新 信息
* 更新 百度云对象存储配置表 信息
*/
Boolean update(SchisandraOssBaiduBO schisandraOssBaiduBO);
/**
* 删除 信息
* 删除 百度云对象存储配置表 信息
*/
Boolean delete(SchisandraOssBaiduBO schisandraOssBaiduBO);

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssFtpBO;
/**
* ftp存储配置表 领域service
*
* @author landaiqing
* @since 2024-06-02 21:54:20
*/
public interface SchisandraOssFtpDomainService {
/**
* 添加 ftp存储配置表 信息
*/
Boolean add(SchisandraOssFtpBO schisandraOssFtpBO);
/**
* 更新 ftp存储配置表 信息
*/
Boolean update(SchisandraOssFtpBO schisandraOssFtpBO);
/**
* 删除 ftp存储配置表 信息
*/
Boolean delete(SchisandraOssFtpBO schisandraOssFtpBO);
}

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssHuaweiBO;
/**
* 华为云对象存储配置表 领域service
*
* @author landaiqing
* @since 2024-06-02 21:59:56
*/
public interface SchisandraOssHuaweiDomainService {
/**
* 添加 华为云对象存储配置表 信息
*/
Boolean add(SchisandraOssHuaweiBO schisandraOssHuaweiBO);
/**
* 更新 华为云对象存储配置表 信息
*/
Boolean update(SchisandraOssHuaweiBO schisandraOssHuaweiBO);
/**
* 删除 华为云对象存储配置表 信息
*/
Boolean delete(SchisandraOssHuaweiBO schisandraOssHuaweiBO);
}

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssJdBO;
/**
* 京东云对象存储配置表 领域service
*
* @author landaiqing
* @since 2024-06-02 22:07:10
*/
public interface SchisandraOssJdDomainService {
/**
* 添加 京东云对象存储配置表 信息
*/
Boolean add(SchisandraOssJdBO schisandraOssJdBO);
/**
* 更新 京东云对象存储配置表 信息
*/
Boolean update(SchisandraOssJdBO schisandraOssJdBO);
/**
* 删除 京东云对象存储配置表 信息
*/
Boolean delete(SchisandraOssJdBO schisandraOssJdBO);
}

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcDataBO;
/**
* jdbc存储数据表 领域service
*
* @author landaiqing
* @since 2024-06-02 22:08:55
*/
public interface SchisandraOssJdbcDataDomainService {
/**
* 添加 jdbc存储数据表 信息
*/
Boolean add(SchisandraOssJdbcDataBO schisandraOssJdbcDataBO);
/**
* 更新 jdbc存储数据表 信息
*/
Boolean update(SchisandraOssJdbcDataBO schisandraOssJdbcDataBO);
/**
* 删除 jdbc存储数据表 信息
*/
Boolean delete(SchisandraOssJdbcDataBO schisandraOssJdbcDataBO);
}

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcBO;
/**
* jdbc存储配置表 领域service
*
* @author landaiqing
* @since 2024-06-02 22:08:16
*/
public interface SchisandraOssJdbcDomainService {
/**
* 添加 jdbc存储配置表 信息
*/
Boolean add(SchisandraOssJdbcBO schisandraOssJdbcBO);
/**
* 更新 jdbc存储配置表 信息
*/
Boolean update(SchisandraOssJdbcBO schisandraOssJdbcBO);
/**
* 删除 jdbc存储配置表 信息
*/
Boolean delete(SchisandraOssJdbcBO schisandraOssJdbcBO);
}

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcStoreBO;
/**
* jdbc存储信息表 领域service
*
* @author landaiqing
* @since 2024-06-02 22:11:22
*/
public interface SchisandraOssJdbcStoreDomainService {
/**
* 添加 jdbc存储信息表 信息
*/
Boolean add(SchisandraOssJdbcStoreBO schisandraOssJdbcStoreBO);
/**
* 更新 jdbc存储信息表 信息
*/
Boolean update(SchisandraOssJdbcStoreBO schisandraOssJdbcStoreBO);
/**
* 删除 jdbc存储信息表 信息
*/
Boolean delete(SchisandraOssJdbcStoreBO schisandraOssJdbcStoreBO);
}

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssJinshanBO;
/**
* 金山云对象存储配置表 领域service
*
* @author landaiqing
* @since 2024-06-02 22:13:26
*/
public interface SchisandraOssJinshanDomainService {
/**
* 添加 金山云对象存储配置表 信息
*/
Boolean add(SchisandraOssJinshanBO schisandraOssJinshanBO);
/**
* 更新 金山云对象存储配置表 信息
*/
Boolean update(SchisandraOssJinshanBO schisandraOssJinshanBO);
/**
* 删除 金山云对象存储配置表 信息
*/
Boolean delete(SchisandraOssJinshanBO schisandraOssJinshanBO);
}

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssLocalBO;
/**
* 本地存储配置表 领域service
*
* @author landaiqing
* @since 2024-06-02 22:18:08
*/
public interface SchisandraOssLocalDomainService {
/**
* 添加 本地存储配置表 信息
*/
Boolean add(SchisandraOssLocalBO schisandraOssLocalBO);
/**
* 更新 本地存储配置表 信息
*/
Boolean update(SchisandraOssLocalBO schisandraOssLocalBO);
/**
* 删除 本地存储配置表 信息
*/
Boolean delete(SchisandraOssLocalBO schisandraOssLocalBO);
}

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssPinganBO;
/**
* 平安云对象存储配置表 领域service
*
* @author landaiqing
* @since 2024-06-02 22:19:22
*/
public interface SchisandraOssPinganDomainService {
/**
* 添加 平安云对象存储配置表 信息
*/
Boolean add(SchisandraOssPinganBO schisandraOssPinganBO);
/**
* 更新 平安云对象存储配置表 信息
*/
Boolean update(SchisandraOssPinganBO schisandraOssPinganBO);
/**
* 删除 平安云对象存储配置表 信息
*/
Boolean delete(SchisandraOssPinganBO schisandraOssPinganBO);
}

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssQingyunBO;
/**
* 青云对象存储配置表 领域service
*
* @author landaiqing
* @since 2024-06-02 22:21:09
*/
public interface SchisandraOssQingyunDomainService {
/**
* 添加 青云对象存储配置表 信息
*/
Boolean add(SchisandraOssQingyunBO schisandraOssQingyunBO);
/**
* 更新 青云对象存储配置表 信息
*/
Boolean update(SchisandraOssQingyunBO schisandraOssQingyunBO);
/**
* 删除 青云对象存储配置表 信息
*/
Boolean delete(SchisandraOssQingyunBO schisandraOssQingyunBO);
}

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssQiniuBO;
/**
* 七牛云对象存储配置表 领域service
*
* @author landaiqing
* @since 2024-06-02 22:25:11
*/
public interface SchisandraOssQiniuDomainService {
/**
* 添加 七牛云对象存储配置表 信息
*/
Boolean add(SchisandraOssQiniuBO schisandraOssQiniuBO);
/**
* 更新 七牛云对象存储配置表 信息
*/
Boolean update(SchisandraOssQiniuBO schisandraOssQiniuBO);
/**
* 删除 七牛云对象存储配置表 信息
*/
Boolean delete(SchisandraOssQiniuBO schisandraOssQiniuBO);
}

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssUcloudBO;
/**
* ucloud对象存储配置表 领域service
*
* @author landaiqing
* @since 2024-06-02 22:27:45
*/
public interface SchisandraOssUcloudDomainService {
/**
* 添加 ucloud对象存储配置表 信息
*/
Boolean add(SchisandraOssUcloudBO schisandraOssUcloudBO);
/**
* 更新 ucloud对象存储配置表 信息
*/
Boolean update(SchisandraOssUcloudBO schisandraOssUcloudBO);
/**
* 删除 ucloud对象存储配置表 信息
*/
Boolean delete(SchisandraOssUcloudBO schisandraOssUcloudBO);
}

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssUpBO;
/**
* 又拍云对象存储配置表 领域service
*
* @author landaiqing
* @since 2024-06-02 22:29:27
*/
public interface SchisandraOssUpDomainService {
/**
* 添加 又拍云对象存储配置表 信息
*/
Boolean add(SchisandraOssUpBO schisandraOssUpBO);
/**
* 更新 又拍云对象存储配置表 信息
*/
Boolean update(SchisandraOssUpBO schisandraOssUpBO);
/**
* 删除 又拍云对象存储配置表 信息
*/
Boolean delete(SchisandraOssUpBO schisandraOssUpBO);
}

View File

@@ -0,0 +1,28 @@
package com.schisandra.oss.domain.service;
import com.schisandra.oss.domain.bo.SchisandraOssWangyiBO;
/**
* 网易数帆对象存储配置表 领域service
*
* @author landaiqing
* @since 2024-06-02 22:31:37
*/
public interface SchisandraOssWangyiDomainService {
/**
* 添加 网易数帆对象存储配置表 信息
*/
Boolean add(SchisandraOssWangyiBO schisandraOssWangyiBO);
/**
* 更新 网易数帆对象存储配置表 信息
*/
Boolean update(SchisandraOssWangyiBO schisandraOssWangyiBO);
/**
* 删除 网易数帆对象存储配置表 信息
*/
Boolean delete(SchisandraOssWangyiBO schisandraOssWangyiBO);
}

View File

@@ -1,8 +1,8 @@
package com.schisandra.oss.domain.service.impl;
import com.schisandra.oss.common.enums.IsDeletedFlagEnum;
import com.schisandra.oss.domain.bo.SchisandraOssBaiduBO;
import com.schisandra.oss.domain.convert.SchisandraOssBaiduBOConverter;
import com.schisandra.oss.domain.bo.SchisandraOssBaiduBO;
import com.schisandra.oss.domain.service.SchisandraOssBaiduDomainService;
import com.schisandra.oss.infra.basic.entity.SchisandraOssBaidu;
import com.schisandra.oss.infra.basic.service.SchisandraOssBaiduService;
@@ -12,10 +12,10 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* 领域service实现了
* 百度云对象存储配置表 领域service实现了
*
* @author landaiqing
* @since 2024-05-17 21:17:28
* @since 2024-06-02 22:02:15
*/
@Service
@Slf4j

View File

@@ -0,0 +1,48 @@
package com.schisandra.oss.domain.service.impl;
import com.schisandra.oss.common.enums.IsDeletedFlagEnum;
import com.schisandra.oss.domain.convert.SchisandraOssFtpBOConverter;
import com.schisandra.oss.domain.bo.SchisandraOssFtpBO;
import com.schisandra.oss.domain.service.SchisandraOssFtpDomainService;
import com.schisandra.oss.infra.basic.entity.SchisandraOssFtp;
import com.schisandra.oss.infra.basic.service.SchisandraOssFtpService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* ftp存储配置表 领域service实现了
*
* @author landaiqing
* @since 2024-06-02 21:54:20
*/
@Service
@Slf4j
public class SchisandraOssFtpDomainServiceImpl implements SchisandraOssFtpDomainService {
@Resource
private SchisandraOssFtpService schisandraOssFtpService;
@Override
public Boolean add(SchisandraOssFtpBO schisandraOssFtpBO) {
SchisandraOssFtp schisandraOssFtp = SchisandraOssFtpBOConverter.INSTANCE.convertBOToEntity(schisandraOssFtpBO);
schisandraOssFtp.setIsDeleted(IsDeletedFlagEnum.UN_DELETED.getCode());
return schisandraOssFtpService.insert(schisandraOssFtp) > 0;
}
@Override
public Boolean update(SchisandraOssFtpBO schisandraOssFtpBO) {
SchisandraOssFtp schisandraOssFtp = SchisandraOssFtpBOConverter.INSTANCE.convertBOToEntity(schisandraOssFtpBO);
return schisandraOssFtpService.update(schisandraOssFtp) > 0;
}
@Override
public Boolean delete(SchisandraOssFtpBO schisandraOssFtpBO) {
SchisandraOssFtp schisandraOssFtp = new SchisandraOssFtp();
schisandraOssFtp.setId(schisandraOssFtpBO.getId());
schisandraOssFtp.setIsDeleted(IsDeletedFlagEnum.DELETED.getCode());
return schisandraOssFtpService.update(schisandraOssFtp) > 0;
}
}

View File

@@ -0,0 +1,48 @@
package com.schisandra.oss.domain.service.impl;
import com.schisandra.oss.common.enums.IsDeletedFlagEnum;
import com.schisandra.oss.domain.convert.SchisandraOssHuaweiBOConverter;
import com.schisandra.oss.domain.bo.SchisandraOssHuaweiBO;
import com.schisandra.oss.domain.service.SchisandraOssHuaweiDomainService;
import com.schisandra.oss.infra.basic.entity.SchisandraOssHuawei;
import com.schisandra.oss.infra.basic.service.SchisandraOssHuaweiService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* 华为云对象存储配置表 领域service实现了
*
* @author landaiqing
* @since 2024-06-02 21:59:56
*/
@Service
@Slf4j
public class SchisandraOssHuaweiDomainServiceImpl implements SchisandraOssHuaweiDomainService {
@Resource
private SchisandraOssHuaweiService schisandraOssHuaweiService;
@Override
public Boolean add(SchisandraOssHuaweiBO schisandraOssHuaweiBO) {
SchisandraOssHuawei schisandraOssHuawei = SchisandraOssHuaweiBOConverter.INSTANCE.convertBOToEntity(schisandraOssHuaweiBO);
schisandraOssHuawei.setIsDeleted(IsDeletedFlagEnum.UN_DELETED.getCode());
return schisandraOssHuaweiService.insert(schisandraOssHuawei) > 0;
}
@Override
public Boolean update(SchisandraOssHuaweiBO schisandraOssHuaweiBO) {
SchisandraOssHuawei schisandraOssHuawei = SchisandraOssHuaweiBOConverter.INSTANCE.convertBOToEntity(schisandraOssHuaweiBO);
return schisandraOssHuaweiService.update(schisandraOssHuawei) > 0;
}
@Override
public Boolean delete(SchisandraOssHuaweiBO schisandraOssHuaweiBO) {
SchisandraOssHuawei schisandraOssHuawei = new SchisandraOssHuawei();
schisandraOssHuawei.setId(schisandraOssHuaweiBO.getId());
schisandraOssHuawei.setIsDeleted(IsDeletedFlagEnum.DELETED.getCode());
return schisandraOssHuaweiService.update(schisandraOssHuawei) > 0;
}
}

View File

@@ -0,0 +1,48 @@
package com.schisandra.oss.domain.service.impl;
import com.schisandra.oss.common.enums.IsDeletedFlagEnum;
import com.schisandra.oss.domain.convert.SchisandraOssJdBOConverter;
import com.schisandra.oss.domain.bo.SchisandraOssJdBO;
import com.schisandra.oss.domain.service.SchisandraOssJdDomainService;
import com.schisandra.oss.infra.basic.entity.SchisandraOssJd;
import com.schisandra.oss.infra.basic.service.SchisandraOssJdService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* 京东云对象存储配置表 领域service实现了
*
* @author landaiqing
* @since 2024-06-02 22:07:10
*/
@Service
@Slf4j
public class SchisandraOssJdDomainServiceImpl implements SchisandraOssJdDomainService {
@Resource
private SchisandraOssJdService schisandraOssJdService;
@Override
public Boolean add(SchisandraOssJdBO schisandraOssJdBO) {
SchisandraOssJd schisandraOssJd = SchisandraOssJdBOConverter.INSTANCE.convertBOToEntity(schisandraOssJdBO);
schisandraOssJd.setIsDeleted(IsDeletedFlagEnum.UN_DELETED.getCode());
return schisandraOssJdService.insert(schisandraOssJd) > 0;
}
@Override
public Boolean update(SchisandraOssJdBO schisandraOssJdBO) {
SchisandraOssJd schisandraOssJd = SchisandraOssJdBOConverter.INSTANCE.convertBOToEntity(schisandraOssJdBO);
return schisandraOssJdService.update(schisandraOssJd) > 0;
}
@Override
public Boolean delete(SchisandraOssJdBO schisandraOssJdBO) {
SchisandraOssJd schisandraOssJd = new SchisandraOssJd();
schisandraOssJd.setId(schisandraOssJdBO.getId());
schisandraOssJd.setIsDeleted(IsDeletedFlagEnum.DELETED.getCode());
return schisandraOssJdService.update(schisandraOssJd) > 0;
}
}

View File

@@ -0,0 +1,48 @@
package com.schisandra.oss.domain.service.impl;
import com.schisandra.oss.common.enums.IsDeletedFlagEnum;
import com.schisandra.oss.domain.convert.SchisandraOssJdbcDataBOConverter;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcDataBO;
import com.schisandra.oss.domain.service.SchisandraOssJdbcDataDomainService;
import com.schisandra.oss.infra.basic.entity.SchisandraOssJdbcData;
import com.schisandra.oss.infra.basic.service.SchisandraOssJdbcDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* jdbc存储数据表 领域service实现了
*
* @author landaiqing
* @since 2024-06-02 22:08:55
*/
@Service
@Slf4j
public class SchisandraOssJdbcDataDomainServiceImpl implements SchisandraOssJdbcDataDomainService {
@Resource
private SchisandraOssJdbcDataService schisandraOssJdbcDataService;
@Override
public Boolean add(SchisandraOssJdbcDataBO schisandraOssJdbcDataBO) {
SchisandraOssJdbcData schisandraOssJdbcData = SchisandraOssJdbcDataBOConverter.INSTANCE.convertBOToEntity(schisandraOssJdbcDataBO);
schisandraOssJdbcData.setIsDeleted(IsDeletedFlagEnum.UN_DELETED.getCode());
return schisandraOssJdbcDataService.insert(schisandraOssJdbcData) > 0;
}
@Override
public Boolean update(SchisandraOssJdbcDataBO schisandraOssJdbcDataBO) {
SchisandraOssJdbcData schisandraOssJdbcData = SchisandraOssJdbcDataBOConverter.INSTANCE.convertBOToEntity(schisandraOssJdbcDataBO);
return schisandraOssJdbcDataService.update(schisandraOssJdbcData) > 0;
}
@Override
public Boolean delete(SchisandraOssJdbcDataBO schisandraOssJdbcDataBO) {
SchisandraOssJdbcData schisandraOssJdbcData = new SchisandraOssJdbcData();
schisandraOssJdbcData.setId(schisandraOssJdbcDataBO.getId());
schisandraOssJdbcData.setIsDeleted(IsDeletedFlagEnum.DELETED.getCode());
return schisandraOssJdbcDataService.update(schisandraOssJdbcData) > 0;
}
}

View File

@@ -0,0 +1,48 @@
package com.schisandra.oss.domain.service.impl;
import com.schisandra.oss.common.enums.IsDeletedFlagEnum;
import com.schisandra.oss.domain.convert.SchisandraOssJdbcBOConverter;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcBO;
import com.schisandra.oss.domain.service.SchisandraOssJdbcDomainService;
import com.schisandra.oss.infra.basic.entity.SchisandraOssJdbc;
import com.schisandra.oss.infra.basic.service.SchisandraOssJdbcService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* jdbc存储配置表 领域service实现了
*
* @author landaiqing
* @since 2024-06-02 22:08:16
*/
@Service
@Slf4j
public class SchisandraOssJdbcDomainServiceImpl implements SchisandraOssJdbcDomainService {
@Resource
private SchisandraOssJdbcService schisandraOssJdbcService;
@Override
public Boolean add(SchisandraOssJdbcBO schisandraOssJdbcBO) {
SchisandraOssJdbc schisandraOssJdbc = SchisandraOssJdbcBOConverter.INSTANCE.convertBOToEntity(schisandraOssJdbcBO);
schisandraOssJdbc.setIsDeleted(IsDeletedFlagEnum.UN_DELETED.getCode());
return schisandraOssJdbcService.insert(schisandraOssJdbc) > 0;
}
@Override
public Boolean update(SchisandraOssJdbcBO schisandraOssJdbcBO) {
SchisandraOssJdbc schisandraOssJdbc = SchisandraOssJdbcBOConverter.INSTANCE.convertBOToEntity(schisandraOssJdbcBO);
return schisandraOssJdbcService.update(schisandraOssJdbc) > 0;
}
@Override
public Boolean delete(SchisandraOssJdbcBO schisandraOssJdbcBO) {
SchisandraOssJdbc schisandraOssJdbc = new SchisandraOssJdbc();
schisandraOssJdbc.setId(schisandraOssJdbcBO.getId());
schisandraOssJdbc.setIsDeleted(IsDeletedFlagEnum.DELETED.getCode());
return schisandraOssJdbcService.update(schisandraOssJdbc) > 0;
}
}

View File

@@ -0,0 +1,48 @@
package com.schisandra.oss.domain.service.impl;
import com.schisandra.oss.common.enums.IsDeletedFlagEnum;
import com.schisandra.oss.domain.convert.SchisandraOssJdbcStoreBOConverter;
import com.schisandra.oss.domain.bo.SchisandraOssJdbcStoreBO;
import com.schisandra.oss.domain.service.SchisandraOssJdbcStoreDomainService;
import com.schisandra.oss.infra.basic.entity.SchisandraOssJdbcStore;
import com.schisandra.oss.infra.basic.service.SchisandraOssJdbcStoreService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* jdbc存储信息表 领域service实现了
*
* @author landaiqing
* @since 2024-06-02 22:11:22
*/
@Service
@Slf4j
public class SchisandraOssJdbcStoreDomainServiceImpl implements SchisandraOssJdbcStoreDomainService {
@Resource
private SchisandraOssJdbcStoreService schisandraOssJdbcStoreService;
@Override
public Boolean add(SchisandraOssJdbcStoreBO schisandraOssJdbcStoreBO) {
SchisandraOssJdbcStore schisandraOssJdbcStore = SchisandraOssJdbcStoreBOConverter.INSTANCE.convertBOToEntity(schisandraOssJdbcStoreBO);
schisandraOssJdbcStore.setIsDeleted(IsDeletedFlagEnum.UN_DELETED.getCode());
return schisandraOssJdbcStoreService.insert(schisandraOssJdbcStore) > 0;
}
@Override
public Boolean update(SchisandraOssJdbcStoreBO schisandraOssJdbcStoreBO) {
SchisandraOssJdbcStore schisandraOssJdbcStore = SchisandraOssJdbcStoreBOConverter.INSTANCE.convertBOToEntity(schisandraOssJdbcStoreBO);
return schisandraOssJdbcStoreService.update(schisandraOssJdbcStore) > 0;
}
@Override
public Boolean delete(SchisandraOssJdbcStoreBO schisandraOssJdbcStoreBO) {
SchisandraOssJdbcStore schisandraOssJdbcStore = new SchisandraOssJdbcStore();
schisandraOssJdbcStore.setId(schisandraOssJdbcStoreBO.getId());
schisandraOssJdbcStore.setIsDeleted(IsDeletedFlagEnum.DELETED.getCode());
return schisandraOssJdbcStoreService.update(schisandraOssJdbcStore) > 0;
}
}

Some files were not shown because too many files have changed in this diff Show More