浏览代码

术语关系列表修改

rgb 6 年之前
父节点
当前提交
21d6e3c87c
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8 8
      knowledgeman-service/src/main/resources/mapper/RelationMapper.xml

+ 8 - 8
knowledgeman-service/src/main/resources/mapper/RelationMapper.xml

@@ -19,12 +19,12 @@
     	SELECT * FROM 
 		(SELECT
 		a.id,
-		a.start_id as startId,
-		(SELECT name FROM library_info where concept_id=a.start_id and is_concept=1 and is_deleted='N') as startName,
-		(SELECT type FROM library_info where concept_id=a.start_id and is_concept=1 and is_deleted='N') as startType,
-		a.end_id as endId,
-		(SELECT name FROM library_info where concept_id=a.end_id and is_concept=1 and is_deleted='N') as endName,
-		(SELECT type FROM library_info where concept_id=a.end_id and is_concept=1 and is_deleted='N') as endType,
+		(SELECT id FROM concept where id=a.start_id and is_deleted='N') as startId,
+		(SELECT name FROM library_info where concept_id=a.start_id and is_concept=1) as startName,
+		(SELECT type FROM library_info where concept_id=a.start_id and is_concept=1) as startType,
+		(SELECT id FROM concept where id=a.end_id and is_deleted='N') as endId,
+		(SELECT name FROM library_info where concept_id=a.end_id and is_concept=1) as endName,
+		(SELECT type FROM library_info where concept_id=a.end_id and is_concept=1) as endType,
 		a.relation_id as relationId,
 		(SELECT name FROM lexicon_relationship where id=a.relation_id and is_deleted='N') as relationName,
 		a.gmt_modified as operTime,
@@ -32,8 +32,8 @@
 		a.is_deleted as isDeleted
 		from relation a) t
 		where 1=1 
-		and startName is not null 
-		and endName is not null
+		and startId is not null 
+		and endId is not null
 		<if test="isDeleted!=null and isDeleted!=''">
 			and isDeleted=#{isDeleted}
 		</if>