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("删除京东云对象存储配置表信息失败");
        }

    }

}
