瀏覽代碼

推送出来的疾病按照疾病对应的症状个数升序排序

kongwz 4 年之前
父節點
當前提交
40fa955b0e
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/main/java/com/diagbot/facade/NeoFacade.java

+ 1 - 0
src/main/java/com/diagbot/facade/NeoFacade.java

@@ -460,6 +460,7 @@ public class NeoFacade {
         if (presentPushVo != null) {
         if (presentPushVo != null) {
             if (ListUtil.isNotEmpty(presentPushVo.getSymptoms())) {
             if (ListUtil.isNotEmpty(presentPushVo.getSymptoms())) {
                 symptom_present = presentPushVo.getSymptoms().stream().map(x -> x.getName()).collect(Collectors.toList());
                 symptom_present = presentPushVo.getSymptoms().stream().map(x -> x.getName()).collect(Collectors.toList());
+                symptom_present = symptom_present.size() >= 5? symptom_present.subList(0,5) : symptom_present;
             }
             }
         }
         }
         symptoms = Stream.of(symptom_chief, symptom_present).flatMap(Collection::stream).distinct().collect(Collectors.toList());
         symptoms = Stream.of(symptom_chief, symptom_present).flatMap(Collection::stream).distinct().collect(Collectors.toList());