소스 검색

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

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 (ListUtil.isNotEmpty(presentPushVo.getSymptoms())) {
                 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());