parent
f9fc4f2d59
commit
dcbe71cffd
@ -853,6 +853,26 @@ public class CommonServiceImpl implements CommonService {
|
||||
List<Map<String, Object>> maps = Lists.newArrayList();
|
||||
for (String key : keys) {
|
||||
if (fields.stream().anyMatch(key::equalsIgnoreCase)) {
|
||||
// ContentVersion表,插入更新时把title中的/替换为-
|
||||
if ("ContentVersion".equals(one.getName()) && "Title".equals(key)){
|
||||
String title = StringUtils.replace(String.valueOf(jsonObject.get("Title")), "/", "-");
|
||||
Map<String, Object> paramMap = Maps.newHashMap();
|
||||
paramMap.put("key", "Title");
|
||||
paramMap.put("value", title);
|
||||
maps.add(paramMap);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Attachment,插入更新时把Name中的/替换为-
|
||||
if ("Attachment".equals(one.getName()) && "Name".equals(key)){
|
||||
String name = StringUtils.replace(String.valueOf(jsonObject.get("Name")), "/", "-");
|
||||
Map<String, Object> paramMap = Maps.newHashMap();
|
||||
paramMap.put("key", "Name");
|
||||
paramMap.put("value", name);
|
||||
maps.add(paramMap);
|
||||
continue;
|
||||
}
|
||||
|
||||
Map<String, Object> paramMap = Maps.newHashMap();
|
||||
paramMap.put("key", key);
|
||||
paramMap.put("value", jsonObject.get(key));
|
||||
@ -872,23 +892,7 @@ public class CommonServiceImpl implements CommonService {
|
||||
maps.add(paramMap2);
|
||||
}
|
||||
|
||||
// ContentVersion表,插入更新时把title中的/替换为-
|
||||
if ("ContentVersion".equals(one.getName())){
|
||||
String title = StringUtils.replace(String.valueOf(jsonObject.get("Title")), "/", "-");
|
||||
Map<String, Object> paramMap = Maps.newHashMap();
|
||||
paramMap.put("key", "Title");
|
||||
paramMap.put("value", title);
|
||||
maps.add(paramMap);
|
||||
}
|
||||
|
||||
// Attachment,插入更新时把Name中的/替换为-
|
||||
if ("Attachment".equals(one.getName())){
|
||||
String name = StringUtils.replace(String.valueOf(jsonObject.get("Name")), "/", "-");
|
||||
Map<String, Object> paramMap = Maps.newHashMap();
|
||||
paramMap.put("key", "Name");
|
||||
paramMap.put("value", name);
|
||||
maps.add(paramMap);
|
||||
}
|
||||
|
||||
if (existsIds.contains(id)) {
|
||||
customMapper.updateById(api, maps, id);
|
||||
|
||||
@ -1863,7 +1863,7 @@ public class DataImportNewServiceImpl implements DataImportNewService {
|
||||
String sql1 = null;
|
||||
String sql2 = null;
|
||||
if (beginDateStr != null){
|
||||
sql1 = "where SystemModstamp >= '" + beginDateStr;
|
||||
sql1 = "where SystemModstamp >= " + beginDateStr;
|
||||
sql2 = "SystemModstamp >= "+ beginDateStr +" order by Id limit " ;
|
||||
}else {
|
||||
sql1 = null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user