gaodm преди 6 години
родител
ревизия
c02aad2750

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

@@ -93,8 +93,8 @@ public class LexiconFacade extends LexiconServiceImpl {
             lexicon.setName(addLexiconVO.getName());
             lexicon.setCreator(currentUser);
             lexicon.setGmtCreate(now);
-        } else if (lexicon.getIsDeleted().equals("Y")) {
-            lexicon.setIsDeleted("N");
+        } else if (lexicon.getIsDeleted().equals(IsDeleteEnum.Y.getKey())) {
+            lexicon.setIsDeleted(IsDeleteEnum.N.getKey());
         } else {
             throw new CommonException(CommonErrorCode.IS_EXISTS);
         }

+ 17 - 16
knowledgeman-service/src/main/java/com/diagbot/facade/LexiconRelationshipFacade.java

@@ -1,16 +1,16 @@
 package com.diagbot.facade;
 
-import java.util.List;
-
-import org.springframework.stereotype.Component;
-
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.GetAllLexiconRelationshipDTO;
 import com.diagbot.entity.LexiconRelationship;
+import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.service.impl.LexiconRelationshipServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.vo.GetAllLexiconRelationshipVO;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
 
 /**
  * @Description: 术语关系类型业务层
@@ -19,22 +19,23 @@ import com.diagbot.vo.GetAllLexiconRelationshipVO;
  */
 @Component
 public class LexiconRelationshipFacade extends LexiconRelationshipServiceImpl {
-	
-	 /**
+
+    /**
      * 获取所有关系类型
+     *
      * @param getAllLexiconRelationshipVO
      * @return
      */
-    public List<GetAllLexiconRelationshipDTO> getAllLexiconRelationship(GetAllLexiconRelationshipVO getAllLexiconRelationshipVO){
-    	QueryWrapper<LexiconRelationship> lexiconRelationshipQe = new QueryWrapper<>();
-    	lexiconRelationshipQe.eq("is_deleted", "N");
-    	if(StringUtil.isNotBlank(getAllLexiconRelationshipVO.getName())){
-    		lexiconRelationshipQe.like("name", getAllLexiconRelationshipVO.getName());
-    	}
-    	if(StringUtil.isNotBlank(getAllLexiconRelationshipVO.getCode())){
-    		lexiconRelationshipQe.eq("code", getAllLexiconRelationshipVO.getCode());
-    	}
-    	return BeanUtil.listCopyTo(list(lexiconRelationshipQe), GetAllLexiconRelationshipDTO.class);
+    public List<GetAllLexiconRelationshipDTO> getAllLexiconRelationship(GetAllLexiconRelationshipVO getAllLexiconRelationshipVO) {
+        QueryWrapper<LexiconRelationship> lexiconRelationshipQe = new QueryWrapper<>();
+        lexiconRelationshipQe.eq("is_deleted", IsDeleteEnum.N.getKey());
+        if (StringUtil.isNotBlank(getAllLexiconRelationshipVO.getName())) {
+            lexiconRelationshipQe.like("name", getAllLexiconRelationshipVO.getName());
+        }
+        if (StringUtil.isNotBlank(getAllLexiconRelationshipVO.getCode())) {
+            lexiconRelationshipQe.eq("code", getAllLexiconRelationshipVO.getCode());
+        }
+        return BeanUtil.listCopyTo(list(lexiconRelationshipQe), GetAllLexiconRelationshipDTO.class);
     }