【feat】优化文件地址配置失效提示方式
This commit is contained in:
parent
723992f663
commit
bc9ed880ff
@ -169,11 +169,12 @@ public class FileManagerServiceImpl implements FileManagerService {
|
||||
for (Map<String, Object> map1 : poll) {
|
||||
if ("FILE_DOWNLOAD_URL".equals(map1.get("code"))) {
|
||||
downloadUrl = (String) map1.get("value");
|
||||
}else {
|
||||
EmailUtil.send("DumpFile ERROR", "文件下载失败!下载地址未配置");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(downloadUrl)) {
|
||||
EmailUtil.send("DumpFile ERROR", "文件下载失败!下载地址未配置");
|
||||
return;
|
||||
}
|
||||
String url = downloadUrl + String.format(Const.SF_RICH_TEXT_FILE_URL, objectApi, recordId, fieldApi, fieldId);
|
||||
|
||||
try {
|
||||
@ -307,11 +308,12 @@ public class FileManagerServiceImpl implements FileManagerService {
|
||||
for (Map<String, Object> map1 : poll) {
|
||||
if ("FILE_UPLOAD_URL".equals(map1.get("code"))) {
|
||||
uploadUrl = (String) map1.get("value");
|
||||
}else {
|
||||
EmailUtil.send("UploadFile ERROR", "文件上传失败!上传地址未配置");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isBlank(uploadUrl)) {
|
||||
EmailUtil.send("UploadFile ERROR", "文件上传失败!上传地址未配置");
|
||||
return;
|
||||
}
|
||||
|
||||
// 拼接url
|
||||
String url = uploadUrl + String.format(Const.SF_UPLOAD_RICH_TEXT_FILE_URL, objectApi, recordId);
|
||||
|
@ -139,11 +139,12 @@ public class FileServiceImpl implements FileService {
|
||||
for (Map<String, Object> map1 : poll) {
|
||||
if ("FILE_DOWNLOAD_URL".equals(map1.get("code"))) {
|
||||
downloadUrl = (String) map1.get("value");
|
||||
}else {
|
||||
EmailUtil.send("DumpFile ERROR", "文件下载失败!下载地址未配置");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(downloadUrl)) {
|
||||
EmailUtil.send("DumpFile ERROR", "文件下载失败!下载地址未配置");
|
||||
return;
|
||||
}
|
||||
log.info("dump file api:{}, field:{}", api, field);
|
||||
PartnerConnection connect = salesforceConnect.createConnect();
|
||||
String token = connect.getSessionHeader().getSessionId();
|
||||
@ -431,17 +432,17 @@ public class FileServiceImpl implements FileService {
|
||||
|
||||
@Override
|
||||
public void uploadFile(String api, String field, Boolean singleThread) {
|
||||
|
||||
String uploadUrl = null;
|
||||
List<Map<String, Object>> poll = customMapper.list("code,value","org_config",null);
|
||||
for (Map<String, Object> map1 : poll) {
|
||||
if ("FILE_UPLOAD_URL".equals(map1.get("code"))) {
|
||||
uploadUrl = (String) map1.get("value");
|
||||
}else {
|
||||
EmailUtil.send("UploadFile ERROR", "文件上传失败!上传地址未配置");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isBlank(uploadUrl)) {
|
||||
EmailUtil.send("UploadFile ERROR", "文件上传失败!上传地址未配置");
|
||||
return;
|
||||
}
|
||||
|
||||
log.info("upload file api:{}, field:{}", api, field);
|
||||
PartnerConnection connect = salesforceTargetConnect.createConnect();
|
||||
@ -618,12 +619,12 @@ public class FileServiceImpl implements FileService {
|
||||
for (Map<String, Object> map1 : poll) {
|
||||
if ("FILE_UPLOAD_URL".equals(map1.get("code"))) {
|
||||
uploadUrl = (String) map1.get("value");
|
||||
}else {
|
||||
EmailUtil.send("UploadFile ERROR", "文件上传失败!上传地址未配置");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(uploadUrl)) {
|
||||
EmailUtil.send("UploadFile ERROR", "文件上传失败!上传地址未配置");
|
||||
return;
|
||||
}
|
||||
log.info("upload file api:{}, field:{}", api, field);
|
||||
PartnerConnection connect = salesforceTargetConnect.createConnect();
|
||||
String token = connect.getSessionHeader().getSessionId();
|
||||
|
Loading…
Reference in New Issue
Block a user