Commit d62c8513 authored by tanyang's avatar tanyang

修改了默认文件存储配置,影响所有文件存储相关

parent ae7af772
......@@ -11,6 +11,7 @@ import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.tenant.helper.TenantHelper;
import com.dsk.system.domain.SysConfig;
import com.dsk.system.mapper.SysConfigMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
......@@ -19,6 +20,7 @@ import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Slf4j
@Component
public class DskOpenApiUtil {
......@@ -72,6 +74,7 @@ public class DskOpenApiUtil {
try {
if (ObjectUtils.isEmpty(config)) initApiConfig();
AccClient.init(config);
log.error(">>>>>>config:"+JSONUtil.toJsonStr(config));
Map<String, ?> res = AccClient.request(reqBodyType, path, bodyMap);
if (!res.containsKey("headers") || !res.containsKey("body")) {
throw new RuntimeException(String.format("请求无返回:path=%s", path));
......@@ -127,6 +130,7 @@ public class DskOpenApiUtil {
SysConfig accessKeyId = sysConfigMapper.selectOne(Wrappers.<SysConfig>lambdaQuery().eq(SysConfig::getTenantId, TenantConstants.DEFAULT_TENANT_ID).eq(SysConfig::getConfigKey, "dsk-Appkey"));
SysConfig accessKeySecret = sysConfigMapper.selectOne(Wrappers.<SysConfig>lambdaQuery().eq(SysConfig::getTenantId, TenantConstants.DEFAULT_TENANT_ID).eq(SysConfig::getConfigKey, "dsk-AppSecret"));
SysConfig endPoint = sysConfigMapper.selectOne(Wrappers.<SysConfig>lambdaQuery().eq(SysConfig::getTenantId, TenantConstants.DEFAULT_TENANT_ID).eq(SysConfig::getConfigKey, "dsk-Domain"));
log.error(">>>>>>config:"+JSONUtil.toJsonStr(config));
config = new Config(accessKeyId.getConfigValue(), accessKeySecret.getConfigValue())
.setEndpoint(endPoint.getConfigValue());
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment