| | |
| | | |
| | | Participant participant = new Participant(); |
| | | BeanUtils.copyProperties(addParticipant, participant); |
| | | participant.setHeight(Double.valueOf(addParticipant.getHeight()).intValue()); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | if(ToolUtil.isNotEmpty(addParticipant.getBirthday())){ |
| | | Date parse = sdf.parse(addParticipant.getBirthday()); |
| | | participant.setBirthday(parse); |
| | | } |
| | | participant.setAppUserId(uid); |
| | | participant.setState(1); |
| | | participant.setInsertTime(new Date()); |
| | |
| | | participantVo.setResidueClassHour(0); |
| | | } |
| | | participantVo.setPhone(participant.getPhone()); |
| | | participantVo.setHeight(participant.getHeight()); |
| | | participantVo.setWeight(participant.getWeight()); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | if(null != participant.getBirthday()){ |
| | | String format = sdf.format(participant.getBirthday()); |
| | | participantVo.setBirthday(format); |
| | | } |
| | | participantVo.setGender(participant.getGender()); |
| | | listVo.add(participantVo); |
| | | } |
| | | return listVo; |
| | |
| | | participant.setHeight(editParticipant.getHeight()); |
| | | participant.setWeight(editParticipant.getWeight()); |
| | | participant.setPhone(editParticipant.getPhone()); |
| | | participant.setGender(editParticipant.getGender()); |
| | | participant.setIdcard(editParticipant.getIdcard()); |
| | | participant.setName(editParticipant.getName()); |
| | | if(ToolUtil.isNotEmpty(editParticipant.getBirthday())){ |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | participant.setBirthday(sdf.parse(editParticipant.getBirthday())); |
| | | } |
| | | this.updateById(participant); |
| | | return ResultUtil.success(); |
| | | } |