| | |
| | | import com.dsh.competition.feignclient.account.AppUserClient; |
| | | import com.dsh.competition.feignclient.account.StudentClient; |
| | | import com.dsh.competition.feignclient.account.model.AppUser; |
| | | import com.dsh.competition.feignclient.account.model.Student; |
| | | import com.dsh.competition.feignclient.account.model.TStudent; |
| | | import com.dsh.competition.model.AddParticipant; |
| | | import com.dsh.competition.model.EditParticipant; |
| | | import com.dsh.competition.model.ParticipantVo; |
| | |
| | | @Resource |
| | | private StudentClient studentClient; |
| | | |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | @ResponseBody |
| | | @PostMapping("/api/participant/editParticipant") |
| | | @ApiOperation(value = "编辑参赛人员", tags = {"APP-赛事活动列表", ""}) |
| | |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | int numDigits = String.valueOf(editParticipant.getId()).length(); |
| | | |
| | | if (editParticipant.getIsStudent()==0){ |
| | | return participantService.editParticipant(uid, editParticipant);} |
| | | |
| | | |
| | | if (numDigits==9){ |
| | | return participantService.editParticipant(uid, editParticipant); |
| | | } |
| | | else { |
| | | AppUser appUser = new AppUser(); |
| | | appUser.setId(editParticipant.getId()); |
| | | |
| | | |
| | | |
| | | TStudent student = new TStudent(); |
| | | student.setId(editParticipant.getId()); |
| | | student.setName(editParticipant.getName()); |
| | | student.setIdCard(editParticipant.getIdcard()); |
| | | student.setHeight(Double.valueOf(editParticipant.getHeight())); |
| | | student.setWeight(editParticipant.getWeight()); |
| | | student.setPhone(editParticipant.getPhone()); |
| | | studentClient.updateAppUser(student); |
| | | return ResultUtil.success(); |
| | | } |
| | | }catch (Exception e){ |