【fix】 优化判断Update时引用
This commit is contained in:
parent
b0f37d3936
commit
0023249086
@ -1417,8 +1417,13 @@ public class CommonServiceImpl implements CommonService {
|
|||||||
|
|
||||||
if (dbNum >0 ) {
|
if (dbNum >0 ) {
|
||||||
int page = dbNum % 2000 == 0 ? dbNum / 2000 : (dbNum / 2000) + 1;
|
int page = dbNum % 2000 == 0 ? dbNum / 2000 : (dbNum / 2000) + 1;
|
||||||
|
|
||||||
for (int i = 0; i < page; i++) {
|
for (int i = 0; i < page; i++) {
|
||||||
|
|
||||||
|
log.info("表api:{},字段:{},批次:{},执行数据更新!", config.getApi(),config.getLinkField(), i);
|
||||||
|
|
||||||
List<Map<String, Object>> mapList = customMapper.list("*", config.getApi(), "1=1 order by Id limit " + i * 2000 + ",2000");
|
List<Map<String, Object>> mapList = customMapper.list("*", config.getApi(), "1=1 order by Id limit " + i * 2000 + ",2000");
|
||||||
|
|
||||||
List<Map<String, Object>> updateMapList = new ArrayList<>();
|
List<Map<String, Object>> updateMapList = new ArrayList<>();
|
||||||
for (int j = 1; j <= mapList.size(); j++) {
|
for (int j = 1; j <= mapList.size(); j++) {
|
||||||
Map<String, Object> map = mapList.get(j - 1);
|
Map<String, Object> map = mapList.get(j - 1);
|
||||||
|
@ -744,7 +744,7 @@ public class DataImportBatchServiceImpl implements DataImportBatchService {
|
|||||||
continue;
|
continue;
|
||||||
} else if ( "WhoId".equals(field) ||"WhatId".equals(field)){
|
} else if ( "WhoId".equals(field) ||"WhatId".equals(field)){
|
||||||
continue;
|
continue;
|
||||||
} else if (StringUtils.isNotBlank(reference_to) && !"data_picklist".equals(reference_to)) {
|
} else if ("reference".equals(dataField.getSfType())) {
|
||||||
|
|
||||||
if (!"null".equals(value) && StringUtils.isNotEmpty(value)) {
|
if (!"null".equals(value) && StringUtils.isNotEmpty(value)) {
|
||||||
//引用类型字段
|
//引用类型字段
|
||||||
|
@ -773,7 +773,7 @@ public class DataImportNewServiceImpl implements DataImportNewService {
|
|||||||
account.setId(String.valueOf(map.get("new_id")));
|
account.setId(String.valueOf(map.get("new_id")));
|
||||||
} else if (!DataUtil.isUpdate(field) || (dataField.getIsCreateable() != null && !dataField.getIsCreateable())) {
|
} else if (!DataUtil.isUpdate(field) || (dataField.getIsCreateable() != null && !dataField.getIsCreateable())) {
|
||||||
continue;
|
continue;
|
||||||
} else if (StringUtils.isNotBlank(reference_to) && !"data_picklist".equals(reference_to)) {
|
} else if ("reference".equals(dataField.getSfType())) {
|
||||||
|
|
||||||
if (!"null".equals(value) && StringUtils.isNotEmpty(value)) {
|
if (!"null".equals(value) && StringUtils.isNotEmpty(value)) {
|
||||||
//引用类型字段
|
//引用类型字段
|
||||||
|
Loading…
Reference in New Issue
Block a user