zhoutg 6 years ago
parent
commit
f8911aaec6

+ 11 - 8
icssman-service/src/main/java/com/diagbot/client/KnowledgemanServiceClient.java

@@ -3,8 +3,11 @@ package com.diagbot.client;
 import com.diagbot.client.hystrix.KnowledgemanServiceHystrix;
 import com.diagbot.dto.ConceptBaseDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.ConceptExistVO;
 import com.diagbot.vo.ConceptSearchVO;
 import com.diagbot.vo.ConceptTypeVO;
+import com.diagbot.vo.IndexLexiconVO;
+import com.diagbot.vo.IndexVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -20,14 +23,14 @@ import java.util.Map;
 @FeignClient(value = "knowledgeman-service", fallback = KnowledgemanServiceHystrix.class)
 public interface KnowledgemanServiceClient {
 
-//    @PostMapping("/commonconcept/index")
-//    RespDTO<List<ConceptBaseDTO>> index(@RequestBody IndexVO indexVO);
-//
-//    @PostMapping("/commonconcept/indexByLexicon")
-//    RespDTO<List<ConceptBaseDTO>> indexByLexiconFac(@RequestBody IndexLexiconVO indexLexiconVO);
-//
-//    @PostMapping("/commonconcept/getConceptMapByNameAndType")
-//    RespDTO<Map<String, List<Integer>>> getConceptMap(@RequestBody ConceptExistVO conceptExistVO);
+    @PostMapping("/commonconcept/index")
+    RespDTO<List<ConceptBaseDTO>> index(@RequestBody IndexVO indexVO);
+
+    @PostMapping("/commonconcept/indexByLexicon")
+    RespDTO<List<ConceptBaseDTO>> indexByLexiconFac(@RequestBody IndexLexiconVO indexLexiconVO);
+
+    @PostMapping("/commonconcept/getConceptMapByNameAndType")
+    RespDTO<Map<String, List<Integer>>> getConceptMap(@RequestBody ConceptExistVO conceptExistVO);
 
     /**
      * 根据概念Id列表获取概念列表Map

+ 20 - 17
icssman-service/src/main/java/com/diagbot/client/hystrix/KnowledgemanServiceHystrix.java

@@ -3,8 +3,11 @@ package com.diagbot.client.hystrix;
 import com.diagbot.client.KnowledgemanServiceClient;
 import com.diagbot.dto.ConceptBaseDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.ConceptExistVO;
 import com.diagbot.vo.ConceptSearchVO;
 import com.diagbot.vo.ConceptTypeVO;
+import com.diagbot.vo.IndexLexiconVO;
+import com.diagbot.vo.IndexVO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -21,23 +24,23 @@ import java.util.Map;
 @Slf4j
 public class KnowledgemanServiceHystrix implements KnowledgemanServiceClient {
 
-//    @Override
-//    public RespDTO<List<ConceptBaseDTO>> index(IndexVO indexVO) {
-//        log.error("【hystrix】调用{}异常", "index");
-//        return null;
-//    }
-//
-//    @Override
-//    public RespDTO<List<ConceptBaseDTO>> indexByLexiconFac(IndexLexiconVO indexLexiconVO) {
-//        log.error("【hystrix】调用{}异常", "indexByLexiconFac");
-//        return null;
-//    }
-//
-//    @Override
-//    public RespDTO<Map<String, List<Integer>>> getConceptMap(ConceptExistVO conceptExistVO) {
-//        log.error("【hystrix】调用{}异常", "getConceptMap");
-//        return null;
-//    }
+    @Override
+    public RespDTO<List<ConceptBaseDTO>> index(IndexVO indexVO) {
+        log.error("【hystrix】调用{}异常", "index");
+        return null;
+    }
+
+    @Override
+    public RespDTO<List<ConceptBaseDTO>> indexByLexiconFac(IndexLexiconVO indexLexiconVO) {
+        log.error("【hystrix】调用{}异常", "indexByLexiconFac");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Map<String, List<Integer>>> getConceptMap(ConceptExistVO conceptExistVO) {
+        log.error("【hystrix】调用{}异常", "getConceptMap");
+        return null;
+    }
 
     /**
      * 根据概念Id列表获取概念列表Map