| | |
| | | import com.ltkj.mall.domain.MallTimeConfig; |
| | | import com.ltkj.mall.service.IMallTimeConfigService; |
| | | import com.ltkj.system.service.ISysConfigService; |
| | | import com.ltkj.web.config.redis.OrderDelayService; |
| | | import com.ltkj.web.config.task.TjReservationTask; |
| | | import com.ltkj.web.wxUtils.WxUtil; |
| | | import io.swagger.annotations.Api; |
| | |
| | | if (!(MatchUtils.isMobileNO(tjReservation.getPhoe()))) |
| | | return AjaxResult.error("手机号错误"); |
| | | |
| | | if (tjReservation.getIdCard().length() == 18) { |
| | | if (tjReservation.getIdType().equals("1")) { |
| | | if (!MatchUtils.isIdCard(tjReservation.getIdCard())) { |
| | | return AjaxResult.error("身份证号码错误"); |
| | | } |
| | | } |
| | | if (tjReservation.getIdCard().length() == 9) { |
| | | if (!MatchUtils.cardValidates(tjReservation.getIdCard())) { |
| | | return AjaxResult.error("身份证号码错误"); |
| | | } |
| | | } |
| | | // if (tjReservation.getIdCard().length() == 9) { |
| | | // if (!MatchUtils.cardValidates(tjReservation.getIdCard())) { |
| | | // return AjaxResult.error("身份证号码错误"); |
| | | // } |
| | | // } |
| | | LambdaQueryWrapper<TjReservation> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjReservation::getIdCard, tjReservation.getIdCard()); |
| | | wq.eq(TjReservation::getIsExpire, 2); |
| | | TjReservation reservation = reservationService.getOne(wq); |
| | | if (null != reservation) return AjaxResult.success("您已成功预约,无需再约"); |
| | | try { |
| | | tjReservation.setBirthday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjReservation.getIdCard()), "yyyy-MM-dd")); |
| | | tjReservation.setBirthday(MatchUtils.getBirthDayByIdCard(tjReservation.getIdCard())); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |