|
@@ -30,8 +30,6 @@ public class PersonMergeImpl implements RelationService {
|
|
if (batch_list.isEmpty()) return null;
|
|
if (batch_list.isEmpty()) return null;
|
|
long start = System.currentTimeMillis();
|
|
long start = System.currentTimeMillis();
|
|
Session session = driver.session();
|
|
Session session = driver.session();
|
|
-
|
|
|
|
- //System.out.println(JSON.toJSONString(batch_list));
|
|
|
|
final String cql =
|
|
final String cql =
|
|
"\nWITH {batch_list} AS batch_list \n" +
|
|
"\nWITH {batch_list} AS batch_list \n" +
|
|
"UNWIND batch_list AS row \n" +
|
|
"UNWIND batch_list AS row \n" +
|
|
@@ -39,8 +37,8 @@ public class PersonMergeImpl implements RelationService {
|
|
"MATCH (n:个人{person_id:row.deleted_human_pid})-[r]-(x:企业)\n" +
|
|
"MATCH (n:个人{person_id:row.deleted_human_pid})-[r]-(x:企业)\n" +
|
|
"with m,n,r,x\n" +
|
|
"with m,n,r,x\n" +
|
|
"CALL apoc.merge.relationship(m, TYPE(r), properties(r),{}, x,{}) YIELD rel\n" +
|
|
"CALL apoc.merge.relationship(m, TYPE(r), properties(r),{}, x,{}) YIELD rel\n" +
|
|
- "SET m:update20210415\n" +
|
|
|
|
- "SET n:deleted20210415\n" +
|
|
|
|
|
|
+ "SET m:" + CompanyUtils.getIncrPersonLabel("新增") + "\n" +
|
|
|
|
+ "SET n:" + CompanyUtils.getIncrPersonLabel("删除") + "\n" +
|
|
"DELETE r";
|
|
"DELETE r";
|
|
log.info("consumer size: {}, cql:{}", batch_list.size(), cql);
|
|
log.info("consumer size: {}, cql:{}", batch_list.size(), cql);
|
|
String data = CompanyUtils.writeNeo4j(session, cql, new HashMap<String, Object>() {{
|
|
String data = CompanyUtils.writeNeo4j(session, cql, new HashMap<String, Object>() {{
|