From b4c77c0839258280044cf65a15471fa3c20d465f Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期二, 21 十一月 2023 09:12:38 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai

---
 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