【feat】 调整bigobject下载文件大小为20MB单个文件

This commit is contained in:
Kris 2025-10-27 10:31:37 +08:00
parent f62d1f65be
commit a3f45b92f2
3 changed files with 8 additions and 4 deletions

View File

@ -234,7 +234,7 @@ public class CommonBatchServiceImpl implements CommonBatchService {
// 使用确定性命名策略避免使用随机时间戳
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;
Path currentFilePath = Paths.get(fileName + "_" + fileIndex + ".csv");

View File

@ -1183,7 +1183,8 @@ public class CommonServiceImpl implements CommonService {
dataObjectService.saveOrUpdate(update);
}
}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 {
checkApi(api, true);
}catch (Exception e){
log.info("创建表结构异常!",e);
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);
EmailUtil.send("DataDump ERROR", format);

View File

@ -14,6 +14,7 @@ import com.celnet.datadump.util.EmailUtil;
import com.sforce.soap.partner.PartnerConnection;
import com.sforce.ws.ConnectionException;
import com.sforce.ws.ConnectorConfig;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -28,6 +29,7 @@ import static com.celnet.datadump.global.SystemConfigCode.EXECUTOR_SIZE;
/**
* org配置表 服务实现类
*/
@Slf4j
@Service
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 format = String.format("ORG连接异常, \ncause:\n%s", message);
EmailUtil.send("DataDump ERROR", format);
log.error("exception message", e);
log.info("exception message", e);
flag = false;
}
@ -117,7 +119,7 @@ public class OrgConfigServiceImpl extends ServiceImpl<OrgConfigMapper, OrgConfig
String message = "目标ORG连接配置错误,\n地址" + targetOrgUrl + "\n错误信息\n" + e.getMessage() ;
String format = String.format("ORG连接异常, \ncause:\n%s", message);
EmailUtil.send("DataDump ERROR", format);
log.error("exception message", e);
log.info("exception message", e);
flag = false;
}