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