From 532a87bfe96076e3ddc823dc5fbfbb8ea9fb86f9 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 19 三月 2025 10:54:41 +0800 Subject: [PATCH] 修改三方接口环境 --- cloud-server-competition/src/main/java/com/dsh/competition/controller/ParticipantController.java | 18 ++++-------------- 1 files changed, 4 insertions(+), 14 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..a01a29e 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,28 @@ 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.setName(editParticipant.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())) { + if (ToolUtil.isNotEmpty(editParticipant.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