【feat】 优化

This commit is contained in:
Kris 2025-11-03 15:09:16 +08:00
parent d0c94cd191
commit ed62e2c9b0
2 changed files with 19 additions and 3 deletions

View File

@ -1282,13 +1282,27 @@ public class DataImportNewServiceImpl implements DataImportNewService {
if (dMap != null){
account.setField("ContentDocumentId", dMap.get("new_id").toString());
}else {
log.info("ContentDocumentLink Id: {}对应的ContentDocumentId: {} 数据不存在! " , id, contentDocumentId);
String errorMessage = String.format("ContentDocumentLink Id: %s对应的ContentDocumentId: %s 数据不存在!", id, contentDocumentId);
log.info(errorMessage);
List<Map<String, Object>> maps = new ArrayList<>();
Map<String, Object> linkMap1 = new HashMap<>();
linkMap1.put("key", "error_message");
linkMap1.put("value", errorMessage);
maps.add(linkMap1);
customMapper.updateById(api, maps, id);
continue;
}
if (lMap != null){
account.setField("LinkedEntityId", lMap.get("new_id").toString());
}else {
log.info("ContentDocumentLink Id: {}对应的LinkedEntityId: {} 数据不存在! " , id, linkedEntityId);
String errorMessage = String.format("ContentDocumentLink Id: %s对应的LinkedEntityId: %s 数据不存在!", id, linkedEntityId);
log.info(errorMessage);
List<Map<String, Object>> maps = new ArrayList<>();
Map<String, Object> linkMap1 = new HashMap<>();
linkMap1.put("key", "error_message");
linkMap1.put("value", errorMessage);
maps.add(linkMap1);
customMapper.updateById(api, maps, id);
continue;
}
account.setField("ShareType", shareType);
@ -1520,7 +1534,7 @@ public class DataImportNewServiceImpl implements DataImportNewService {
break;
}else {
failCount++;
log.error("文件下载失败,第"+ failCount +"次!, id: "+ id + ",返回体信息:" + response.message());
log.info("文件下载失败,第"+ failCount +"次!, id: "+ id + ",返回体信息:" + response.message());
}
}

View File

@ -2029,6 +2029,7 @@ private void sendIncrementalQualityCheckEmail(DataVerifyParam param, String file
String idSql = "SELECT FIELDS(ALL) FROM " + objectApi + " WHERE " + idCondition;
// 将结果转换为Map便于比对
Map<String, SObject> queryMap = Maps.newHashMap();
log.info("查询ORG数据SQL: {}", idSql);
try {
QueryResult queryResult = connect.queryAll(idSql);
if (queryResult.getRecords() != null) {
@ -2049,6 +2050,7 @@ private void sendIncrementalQualityCheckEmail(DataVerifyParam param, String file
// 查询本地数据库获取ID列表
String idSql = " CreatedDate >= '" + startDate + "'" +
" AND CreatedDate < '" + endDate + "'" +
" AND new_id is not null " +
" ORDER BY Id ASC LIMIT " + (page * MAX_PAGE_RECORDS) + "," + MAX_PAGE_RECORDS;
return customMapper.list("Id,new_id", objectApi, idSql);