INSERT INTO sd_nodes
(id,project_id, parent_id, node_order, node_type, node_name, custom3, create_time)
VALUES
(#{item.id},#{item.projectId}, #{item.parentId}, #{item.nodeOrder}, #{item.nodeType},
#{item.nodeName}, #{item.custom3}, #{item.createTime})
UPDATE sd_nodes a
LEFT JOIN sd_nodes b
ON b.project_id = a.project_id
AND a.custom3 = CONCAT( b.custom3,b.node_name, '/' )
SET a.parent_id = b.id
WHERE
b.id IS NOT NULL