From c35f907f1ab5c2cd45a55bf757bb2fc17a5bcf1e Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期四, 23 十一月 2023 18:45:54 +0800
Subject: [PATCH] 后台bug修改
---
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