| | |
| | | import com.dsh.competition.model.ParticipantVo; |
| | | import com.dsh.competition.model.SaveParticipant; |
| | | import com.dsh.competition.service.IParticipantService; |
| | | import com.dsh.competition.util.JuHeUtil; |
| | | import com.dsh.competition.util.ResultUtil; |
| | | import com.dsh.competition.util.ToolUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | if(null != one){ |
| | | return ResultUtil.error("电话号码重复"); |
| | | } |
| | | if(ToolUtil.isNotEmpty(addParticipant.getName()) && ToolUtil.isNotEmpty(addParticipant.getIdcard())){ |
| | | Boolean aBoolean = JuHeUtil.idcardAuthentication(addParticipant.getIdcard(), addParticipant.getName()); |
| | | if(!aBoolean){ |
| | | return ResultUtil.error("身份证和姓名不匹配"); |
| | | } |
| | | } |
| | | |
| | | Participant participant = new Participant(); |
| | | BeanUtils.copyProperties(addParticipant, participant); |
| | | participant.setAppUserId(uid); |
| | |
| | | if(null != one && one.getId().compareTo(editParticipant.getId()) != 0){ |
| | | return ResultUtil.error("电话号码重复"); |
| | | } |
| | | if(ToolUtil.isNotEmpty(editParticipant.getName()) && ToolUtil.isNotEmpty(editParticipant.getIdcard())){ |
| | | Boolean aBoolean = JuHeUtil.idcardAuthentication(editParticipant.getIdcard(), editParticipant.getName()); |
| | | if(!aBoolean){ |
| | | return ResultUtil.error("身份证和姓名不匹配"); |
| | | } |
| | | } |
| | | Participant participant = this.getById(editParticipant.getId()); |
| | | participant.setHeight(editParticipant.getHeight()); |
| | | participant.setWeight(editParticipant.getWeight()); |