|
@@ -203,8 +203,8 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
QueryWrapper<Relation> relationQe = new QueryWrapper<>();
|
|
|
relationQe.eq("relation_id", getAllForRelationVO.getRelationId());
|
|
|
if (getAllForRelationVO.getRelationPosition() == 1) {
|
|
|
- relationQe.in("start_id", conceptIdList);
|
|
|
- relationQe.eq(getAllForRelationVO.getRelationConceptId() != null, "end_id", getAllForRelationVO.getRelationConceptId());
|
|
|
+ relationQe.eq(getAllForRelationVO.getRelationConceptId() != null, "end_id", getAllForRelationVO.getRelationConceptId());
|
|
|
+ relationQe.and(wrapper->wrapper.in("start_id", conceptIdList).or(getAllForRelationVO.getRelationConceptId() == null).in("end_id", conceptIdList));
|
|
|
reCouMap = relationFacade.list(relationQe).stream().collect(Collectors.groupingBy(Relation::getStartId, Collectors.counting()));
|
|
|
} else if(getAllForRelationVO.getRelationConceptId() != null) {
|
|
|
relationQe.in("end_id", conceptIdList);
|