Browse Source

修改推理个数

gaodm 6 years ago
parent
commit
697a8c9d0d
1 changed files with 9 additions and 1 deletions
  1. 9 1
      triage-service/src/main/java/com/diagbot/facade/AIFacade.java

+ 9 - 1
triage-service/src/main/java/com/diagbot/facade/AIFacade.java

@@ -43,12 +43,20 @@ public class AIFacade {
         }
         searchData.setFeatureType(type);
         searchData.setSysCode("1");
+        switch (type) {
+            case "1":
+                searchData.setLength(10);
+                break;
+            case "7":
+                searchData.setLength(2);
+                break;
+        }
         Response<ResponseData> res = aiServiceClient.bayesPageData(searchData);
         if (null == res || null == res.getData()) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "AI没有返回结果");
         }
         AIDTO aidto = new AIDTO();
-        switch (searchData.getFeatureType()) {
+        switch (type) {
             case "1":
                 aidto.setItems(res.getData().getSymptom());
                 break;