diff --git a/src/main/java/cn/teammodel/controller/admin/service/impl/ArtServiceImpl.java b/src/main/java/cn/teammodel/controller/admin/service/impl/ArtServiceImpl.java index 7abe6e6..25e0d90 100644 --- a/src/main/java/cn/teammodel/controller/admin/service/impl/ArtServiceImpl.java +++ b/src/main/java/cn/teammodel/controller/admin/service/impl/ArtServiceImpl.java @@ -60,8 +60,9 @@ public class ArtServiceImpl implements ArtService { try { for (ArtElementsVo artElementsVo : artElementsVos) { List classes1 = artElementsVo.getClasses(); - //int stuInClassCount = 0; + int stuInClassCount = 0; for(String classId : classes1) { + stuInClassCount += (int) rMembers.stream().filter(rMember -> rMember.getClassId().equals(classId)).count(); //stuInClassCount += studentRepository.countByClassIdAndCode(classId, String.format(PK.STUDENT, artFindDto.getCode())); ArtElementsVo.ClassInfos classInfos = new ArtElementsVo.ClassInfos(); rGroupList.stream().filter(rGroupList1 -> rGroupList1.getId().equals(classId)).findFirst().ifPresent(rGroupList1 -> { @@ -70,7 +71,7 @@ public class ArtServiceImpl implements ArtService { }); artElementsVo.addClassesInfos(classInfos); } - artElementsVo.setCount(rMembers.size()); + artElementsVo.setCount(stuInClassCount); } } catch (Exception e) {