|
@@ -15,13 +15,13 @@
|
|
|
</collection>
|
|
|
</resultMap>
|
|
|
<resultMap id="SchemaResultMap" type="com.diagbot.dto.SchemaDTO">
|
|
|
- <result column="nodeId" property="nodeId"/>
|
|
|
- <result column="diseaseNode" property="diseaseNode"/>
|
|
|
- <collection property="nodeLabels" ofType="com.diagbot.dto.NodeLabelsDTO">
|
|
|
- <result column="relationNode" property="relationNode"/>
|
|
|
- <result column="Id" property="Id"/>
|
|
|
- <result column="node" property="node"/>
|
|
|
+ <result column="diseaseNode" property="name"/>
|
|
|
+ <collection property="children" ofType="com.diagbot.dto.RelationNodesDTO">
|
|
|
+ <result column="relationNode" property="name"/>
|
|
|
+ <collection property="children" ofType="com.diagbot.dto.NodeLabelsDTO">
|
|
|
+ <result column="node" property="name"/>
|
|
|
</collection>
|
|
|
+ </collection>
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="getNode" parameterType='com.diagbot.vo.KgQueryVO' resultType="com.diagbot.dto.NodeDTO">
|
|
@@ -49,10 +49,8 @@
|
|
|
match(d:${labelName})-[r]->(h)
|
|
|
where d.name = #{pramNme}
|
|
|
return
|
|
|
- id(d) as nodeId ,
|
|
|
d.name as diseaseNode ,
|
|
|
type(r) as relationNode ,
|
|
|
- id(h) as Id ,
|
|
|
h.name as node
|
|
|
</select>
|
|
|
|