【feat】 调整bigobject下载文件大小为20MB单个文件
This commit is contained in:
parent
f62d1f65be
commit
a3f45b92f2
@ -234,7 +234,7 @@ public class CommonBatchServiceImpl implements CommonBatchService {
|
|||||||
|
|
||||||
// 使用确定性命名策略,避免使用随机时间戳
|
// 使用确定性命名策略,避免使用随机时间戳
|
||||||
String fileName = Const.SERVER_FILE_PATH + "/" + api+ "/" + DateFormatUtils.format(new Date(), "yyyyMMddHHmmss");
|
String fileName = Const.SERVER_FILE_PATH + "/" + api+ "/" + DateFormatUtils.format(new Date(), "yyyyMMddHHmmss");
|
||||||
final long maxFileSize = 50 * 1024 * 1024; // 50MB
|
final long maxFileSize = 20 * 1024 * 1024; // 20MB
|
||||||
|
|
||||||
int fileIndex = 0;
|
int fileIndex = 0;
|
||||||
Path currentFilePath = Paths.get(fileName + "_" + fileIndex + ".csv");
|
Path currentFilePath = Paths.get(fileName + "_" + fileIndex + ".csv");
|
||||||
|
|||||||
@ -1183,7 +1183,8 @@ public class CommonServiceImpl implements CommonService {
|
|||||||
dataObjectService.saveOrUpdate(update);
|
dataObjectService.saveOrUpdate(update);
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
EmailUtil.send("DataDump ERROR", e.getMessage());
|
log.info("创建表失败" , e);
|
||||||
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1601,6 +1602,7 @@ public class CommonServiceImpl implements CommonService {
|
|||||||
try {
|
try {
|
||||||
checkApi(api, true);
|
checkApi(api, true);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
log.info("创建表结构异常!",e);
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
String format = String.format("创建表结构 error, api name: %s, \nparam: %s, \ncause:\n%s", api, com.alibaba.fastjson2.JSON.toJSONString(param, DataDumpParam.getFilter()), message);
|
String format = String.format("创建表结构 error, api name: %s, \nparam: %s, \ncause:\n%s", api, com.alibaba.fastjson2.JSON.toJSONString(param, DataDumpParam.getFilter()), message);
|
||||||
EmailUtil.send("DataDump ERROR", format);
|
EmailUtil.send("DataDump ERROR", format);
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import com.celnet.datadump.util.EmailUtil;
|
|||||||
import com.sforce.soap.partner.PartnerConnection;
|
import com.sforce.soap.partner.PartnerConnection;
|
||||||
import com.sforce.ws.ConnectionException;
|
import com.sforce.ws.ConnectionException;
|
||||||
import com.sforce.ws.ConnectorConfig;
|
import com.sforce.ws.ConnectorConfig;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -28,6 +29,7 @@ import static com.celnet.datadump.global.SystemConfigCode.EXECUTOR_SIZE;
|
|||||||
/**
|
/**
|
||||||
* org配置表 服务实现类
|
* org配置表 服务实现类
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
public class OrgConfigServiceImpl extends ServiceImpl<OrgConfigMapper, OrgConfig> implements OrgConfigService {
|
public class OrgConfigServiceImpl extends ServiceImpl<OrgConfigMapper, OrgConfig> implements OrgConfigService {
|
||||||
|
|
||||||
@ -78,7 +80,7 @@ public class OrgConfigServiceImpl extends ServiceImpl<OrgConfigMapper, OrgConfig
|
|||||||
String message = "源ORG连接配置错误!,\n地址:" + sourceOrgUrl + "\n错误信息:\n" + e.getMessage() ;;
|
String message = "源ORG连接配置错误!,\n地址:" + sourceOrgUrl + "\n错误信息:\n" + e.getMessage() ;;
|
||||||
String format = String.format("ORG连接异常!, \ncause:\n%s", message);
|
String format = String.format("ORG连接异常!, \ncause:\n%s", message);
|
||||||
EmailUtil.send("DataDump ERROR", format);
|
EmailUtil.send("DataDump ERROR", format);
|
||||||
log.error("exception message", e);
|
log.info("exception message", e);
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +119,7 @@ public class OrgConfigServiceImpl extends ServiceImpl<OrgConfigMapper, OrgConfig
|
|||||||
String message = "目标ORG连接配置错误!,\n地址:" + targetOrgUrl + "\n错误信息:\n" + e.getMessage() ;
|
String message = "目标ORG连接配置错误!,\n地址:" + targetOrgUrl + "\n错误信息:\n" + e.getMessage() ;
|
||||||
String format = String.format("ORG连接异常!, \ncause:\n%s", message);
|
String format = String.format("ORG连接异常!, \ncause:\n%s", message);
|
||||||
EmailUtil.send("DataDump ERROR", format);
|
EmailUtil.send("DataDump ERROR", format);
|
||||||
log.error("exception message", e);
|
log.info("exception message", e);
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user