From d5b547aa7aef17e698a4062808023e085df4b32f Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期一, 10 三月 2025 14:02:19 +0800 Subject: [PATCH] Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/PlayPai into 2.0 --- cloud-server-competition/src/main/java/com/dsh/competition/controller/ParticipantController.java | 12 ++---------- 1 files changed, 2 insertions(+), 10 deletions(-) diff --git a/cloud-server-competition/src/main/java/com/dsh/competition/controller/ParticipantController.java b/cloud-server-competition/src/main/java/com/dsh/competition/controller/ParticipantController.java index fdb397d..b91139e 100644 --- a/cloud-server-competition/src/main/java/com/dsh/competition/controller/ParticipantController.java +++ b/cloud-server-competition/src/main/java/com/dsh/competition/controller/ParticipantController.java @@ -120,38 +120,30 @@ if (null == uid) { return ResultUtil.tokenErr(); } - int numDigits = String.valueOf(editParticipant.getId()).length(); - - - if (numDigits == 9) { + if (null != editParticipant.getIsStudent() && 0 == editParticipant.getIsStudent()) { Participant byId = participantService.getById(editParticipant.getId()); editParticipant.setName(byId.getName()); return participantService.editParticipant(uid, editParticipant); } else { - - TStudent student = new TStudent(); student.setId(editParticipant.getId()); TStudent student1 = studentClient.queryById(editParticipant.getId()); student.setName(student1.getName()); student.setIdCard(editParticipant.getIdcard()); + student.setHeadImg(editParticipant.getHeadImg()); if (editParticipant.getHeight() != null) { student.setHeight(Double.valueOf(editParticipant.getHeight())); } - if (editParticipant.getWeight() != null) { student.setWeight(editParticipant.getWeight()); } - if (ToolUtil.isNotEmpty(student.getName()) && ToolUtil.isNotEmpty(student.getIdCard())) { Boolean aBoolean = JuHeUtil.idcardAuthentication(student.getIdCard(), student.getName()); if (!aBoolean) { return ResultUtil.error("身份证和姓名不匹配"); } } - - student.setPhone(editParticipant.getPhone()); studentClient.updateAppUser(student); return ResultUtil.success(); -- Gitblit v1.7.1