【feat】 推送ContenteDocumentLink增加打印对象信息日志

This commit is contained in:
Kris 2025-09-25 10:48:30 +08:00
parent 54533b0bb3
commit c63c1032fa

View File

@ -1230,6 +1230,13 @@ public class DataImportNewServiceImpl implements DataImportNewService {
@Override @Override
public ReturnT<String> uploadDocumentLinkJob(String paramStr) throws Exception { public ReturnT<String> uploadDocumentLinkJob(String paramStr) throws Exception {
String api = "ContentDocumentLink"; String api = "ContentDocumentLink";
Map<String, Object> infoFlag = customMapper.list("code,value","system_config","code ='"+SystemConfigCode.INFO_FLAG+"'").get(0);
QueryWrapper<DataField> dbQw = new QueryWrapper<>();
dbQw.eq("api", api);
List<DataField> dataFields = dataFieldService.list(dbQw);
PartnerConnection connection = salesforceTargetConnect.createConnect(); PartnerConnection connection = salesforceTargetConnect.createConnect();
List<Map<String, Object>> list = customMapper.list("Id", "ContentDocument", "new_id is not null"); List<Map<String, Object>> list = customMapper.list("Id", "ContentDocument", "new_id is not null");
try { try {
@ -1280,6 +1287,9 @@ public class DataImportNewServiceImpl implements DataImportNewService {
} }
} }
try { try {
if (infoFlag != null && "1".equals(infoFlag.get("value"))){
printlnAccountsDetails(accounts,dataFields);
}
SaveResult[] saveResults = connection.create(accounts); SaveResult[] saveResults = connection.create(accounts);
for (int j = 0; j < saveResults.length; j++) { for (int j = 0; j < saveResults.length; j++) {
if (!saveResults[j].getSuccess()) { if (!saveResults[j].getSuccess()) {