无关风月
2025-04-03 457c4cd19b4ae4404c9dd1f5f0b80025c722abd2
cloud-server-competition/src/main/java/com/dsh/competition/service/impl/ParticipantServiceImpl.java
@@ -119,8 +119,13 @@
            participantVo.setId(participant.getId());
            participantVo.setName(participant.getName());
            participantVo.setIdcard(participant.getIdcard());
            Integer age = Integer.valueOf(sdf_year.format(new Date())) - Integer.valueOf(sdf_year.format(participant.getBirthday()));
            participantVo.setAge(age);
            if (null != participant.getBirthday()){
                Integer age = Integer.valueOf(sdf_year.format(new Date())) - Integer.valueOf(sdf_year.format(participant.getBirthday()));
                participantVo.setAge(age);
            }else{
                participantVo.setAge(18);
            }
            Student student = null;
            if(ToolUtil.isNotEmpty(participant.getPhone())){
                student = studentClient.queryStudentByPhone(participant.getPhone());