Browse Source

优化代码1

wangfeng 4 years ago
parent
commit
4100022540

+ 2 - 1
src/main/java/com/diagbot/client/CdssCoreClient.java

@@ -39,6 +39,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 
 import javax.validation.Valid;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: CDSS核心类客户端
@@ -202,5 +203,5 @@ public interface CdssCoreClient {
     RespDTO<Boolean> startRuleInfos(@RequestBody @Valid KlRuleSatartOrdisaVO klRuleSatartOrdisaVO);
 
     @PostMapping("/kl/dictionary/getDictionaryInfo")
-    RespDTO<List<DictionaryInfoDTO>> getDictionaryAll();
+    RespDTO<Map<Long, List<DictionaryInfoDTO>>> getDictionaryAll();
 }

+ 2 - 1
src/main/java/com/diagbot/client/hystrix/CdssCoreHystrix.java

@@ -39,6 +39,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 
 import javax.validation.Valid;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 病历质控客户端(请求失败熔断)
@@ -257,7 +258,7 @@ public class CdssCoreHystrix implements CdssCoreClient {
     }
 
     @Override
-    public RespDTO<List<DictionaryInfoDTO>> getDictionaryAll() {
+    public RespDTO<Map<Long, List<DictionaryInfoDTO>>> getDictionaryAll() {
         log.error("【hystrix】调用{}异常", "getDictionaryAll");
         return null;
     }

+ 3 - 2
src/main/java/com/diagbot/facade/KlDictionaryInfoFacade.java

@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author wangfeng
@@ -19,8 +20,8 @@ public class KlDictionaryInfoFacade {
     @Autowired
     CdssCoreClient cdssCoreClient;
 
-    public List<DictionaryInfoDTO> getListByGroupType() {
-        RespDTO<List<DictionaryInfoDTO>> dictionaryAll = cdssCoreClient.getDictionaryAll();
+    public Map<Long, List<DictionaryInfoDTO>> getListByGroupType() {
+        RespDTO<Map<Long, List<DictionaryInfoDTO>>> dictionaryAll = cdssCoreClient.getDictionaryAll();
         RespDTOUtil.respNGDeal(dictionaryAll, "获取字典表信息数据失败");
         return dictionaryAll.data;
     }

+ 2 - 1
src/main/java/com/diagbot/web/KlDictionaryConller.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author wangfeng
@@ -28,7 +29,7 @@ public class KlDictionaryConller {
     @ApiOperation(value = "根据分组获取字典表信息详情[by:wangfeng]")
     @PostMapping("/getDictionarys")
     @SysLogger("getDictionarys")
-    public RespDTO<List<DictionaryInfoDTO>> getDictionaryInfoAll() {
+    public RespDTO<Map<Long, List<DictionaryInfoDTO>>> getDictionaryInfoAll() {
         return RespDTO.onSuc(dictionaryFacade.getListByGroupType());
     }
 }