From 12e9e6b431d821ebeb91b4ddeaecfc5198deb523 Mon Sep 17 00:00:00 2001
From: liujie <liujie>
Date: 星期一, 20 十一月 2023 18:17:31 +0800
Subject: [PATCH] 11.11

---
 cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java b/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java
index 796705b..857eda0 100644
--- a/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java
+++ b/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java
@@ -198,17 +198,19 @@
             participant.add(participantVo);
         }
 
+
         for (Integer i : collect) {
             TStudent tStudent = studentClient.queryById(i);
-            ParticipantVo participantVo = new ParticipantVo();
-            participantVo.setId(tStudent.getId());
-            participantVo.setName(tStudent.getName());
-            participantVo.setIdcard(tStudent.getIdCard());
-            Integer age = Integer.valueOf(sdf_year.format(new Date())) - Integer.valueOf(sdf_year.format(tStudent.getBirthday()));
-            participantVo.setAge(age);
-            participantVo.setPhone(tStudent.getPhone());
-            participant.add(participantVo);
-
+            if (tStudent!=null) {
+                ParticipantVo participantVo = new ParticipantVo();
+                participantVo.setId(tStudent.getId());
+                participantVo.setName(tStudent.getName());
+                participantVo.setIdcard(tStudent.getIdCard());
+                Integer age = Integer.valueOf(sdf_year.format(new Date())) - Integer.valueOf(sdf_year.format(tStudent.getBirthday()));
+                participantVo.setAge(age);
+                participantVo.setPhone(tStudent.getPhone());
+                participant.add(participantVo);
+            }
 
         }
 

--
Gitblit v1.7.1