无关风月
5 天以前 b27efc697f2f81e0d0f247a2708e58af52a5df9b
cloud-server-competition/src/main/java/com/dsh/competition/controller/ParticipantController.java
@@ -27,6 +27,7 @@
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
@@ -85,16 +86,18 @@
            if (null == uid) {
                return ResultUtil.tokenErr();
            }
            System.err.println("查询人员列表");
            List<ParticipantVo> participantVos = participantService.queryParticipantList(uid);
//            if (isPre != null) {
                List<ParticipantVo> filteredParticipants = new ArrayList<>();
                for (ParticipantVo participant : participantVos) {
                    if (participant.getIdcard() != null && !participant.getIdcard().isEmpty()) {
//                    if (participant.getIdcard() != null && !participant.getIdcard().isEmpty()) {
                        filteredParticipants.add(participant);
                    }
//                    }
                }
                return ResultUtil.success(filteredParticipants);
            List<ParticipantVo> collect = filteredParticipants.stream().distinct().collect(Collectors.toList());
            return ResultUtil.success(collect);
//            }
//            return ResultUtil.success(participantVos);