Browse Source

获取所有概念修改

rgb 5 years ago
parent
commit
ea5016ae6d

+ 5 - 2
knowledgeman-service/src/main/java/com/diagbot/facade/ConceptFacade.java

@@ -200,11 +200,14 @@ public class ConceptFacade extends ConceptServiceImpl {
      */
     public List<GetAllForRelationDTO> getAllForRelation(GetAllForRelationVO getAllForRelationVO) {
         List<GetAllForRelationDTO> retList = new ArrayList<>();
+        if(StringUtil.isBlank(getAllForRelationVO.getName())&&getAllForRelationVO.getTypeId()==null){
+        	return retList;
+        }
 
         QueryWrapper<Concept> conceptQe = new QueryWrapper<>();
         conceptQe.eq("is_deleted", IsDeleteEnum.N.getKey());
-        conceptQe.like(StringUtil.isNotEmpty(getAllForRelationVO.getName()), "lib_name", getAllForRelationVO.getName());
-        conceptQe.eq(getAllForRelationVO.getTypeId() != null, "lib_type", getAllForRelationVO.getTypeId());
+        conceptQe.like("lib_name", getAllForRelationVO.getName());
+        conceptQe.eq("lib_type", getAllForRelationVO.getTypeId());
         List<Concept> conceptList = list(conceptQe);
 
         Map<Long, Long> reCouMap = new HashMap<>();