| | |
| | | import com.dsh.account.mapper.CoachMapper; |
| | | import com.dsh.account.mapper.TAppUserMapper; |
| | | import com.dsh.account.mapper.TStudentMapper; |
| | | import com.dsh.account.model.vo.classDetails.AppointmentRecordVo; |
| | | import com.dsh.account.model.vo.classDetails.ClasspaymentRequest; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.ClassDetailsInsVo; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.StuDetailsReq; |
| | |
| | | |
| | | |
| | | @Override |
| | | public void addStuOfAppUser(StuDetailsReq stu,Integer appUserId) { |
| | | public ResultUtil addStuOfAppUser(StuDetailsReq stu,Integer appUserId) throws Exception { |
| | | TStudent student = new TStudent(); |
| | | if(ToolUtil.isNotEmpty(stu.getName()) && ToolUtil.isNotEmpty(stu.getIdCard())){ |
| | | Boolean aBoolean = JuHeUtil.idcardAuthentication(stu.getIdCard(), stu.getName()); |
| | | if(!aBoolean){ |
| | | return ResultUtil.error("身份证和姓名不匹配"); |
| | | } |
| | | } |
| | | student.setAppUserId(appUserId); |
| | | student.setName(stu.getName()); |
| | | student.setHeadImg(stu.getHeadImg()); |
| | |
| | | saveParticipant.setPhone(student.getPhone()); |
| | | saveParticipant.setIdcard(student.getIdCard()); |
| | | participantClient.saveParticipant(saveParticipant); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | @Override |
| | | public AppointmentRecordVo getAppointmentRecords(Integer stuId, Integer appUserId) { |
| | | AppointmentRecordVo recordVo = new AppointmentRecordVo(); |
| | | TStudent tStudent = this.baseMapper.selectOne(new QueryWrapper<TStudent>() |
| | | .eq("id",stuId ) |
| | | .eq("appUserId",appUserId)); |
| | | if (ToolUtil.isNotEmpty(tStudent)){ |
| | | recordVo.setStuId(tStudent.getId()); |
| | | recordVo.setStuName(tStudent.getName()); |
| | | recordVo.setAppointList(couPayClient.obtainStudentClassDetailsData(stuId)); |
| | | } |
| | | return recordVo; |
| | | } |
| | | |
| | | @Override |
| | | public ResultUtil cancelReservationOfCourse(Integer courseStuRecordId) { |
| | | Integer integer = crClient.cancelCourseRecordClass(courseStuRecordId); |
| | | switch (integer){ |
| | | case 1: |
| | | ResultUtil.success(); |
| | | break; |
| | | case 2: |
| | | ResultUtil.error("开课前三小时不能取消!"); |
| | | break; |
| | | default: |
| | | ResultUtil.runErr(); |
| | | break; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |