|
@@ -1,6 +1,5 @@
|
|
|
package com.example.nngkxxdp.service.impl;
|
|
|
|
|
|
-import com.example.nngkxxdp.base.BusinessException;
|
|
|
import com.example.nngkxxdp.dao.ReserveOvertimeDao;
|
|
|
import com.example.nngkxxdp.entity.ReserveOvertime;
|
|
|
import com.example.nngkxxdp.entity.dtos.OvertimeVerifyDTO;
|
|
@@ -44,20 +43,20 @@ public class ReserveOvertimeServiceImpl implements ReserveOvertimeService {
|
|
|
|
|
|
@Override
|
|
|
public BaseResult insert(OvertimeVerifyDTO overtimeVerifyDTO) {
|
|
|
- Object o = redisTemplate.opsForValue().get(overtimeVerifyDTO.getImgKey());
|
|
|
- if(o==null){
|
|
|
- throw new BusinessException("验证码已过期");
|
|
|
- }
|
|
|
- if(!o.toString().equals(overtimeVerifyDTO.getImgCode())){
|
|
|
- throw new BusinessException("验证码错误");
|
|
|
- }
|
|
|
+// Object o = redisTemplate.opsForValue().get(overtimeVerifyDTO.getImgKey());
|
|
|
+// if(o==null){
|
|
|
+// throw new BusinessException("验证码已过期");
|
|
|
+// }
|
|
|
+// if(!o.toString().equals(overtimeVerifyDTO.getImgCode())){
|
|
|
+// throw new BusinessException("验证码错误");
|
|
|
+// }
|
|
|
//接收前端传递来的时间参数
|
|
|
Date handleTime = overtimeVerifyDTO.getHandleTime();
|
|
|
- int handleTotal = this.findTotalByTime(handleTime);
|
|
|
+// int handleTotal = this.findTotalByTime(handleTime);
|
|
|
//int handleTotal = reserveOvertimeDao.findTotalByTime(handleTime);
|
|
|
- if(handleTotal>9){
|
|
|
- throw new BusinessException("今日预约人数已满,请更换办理日期!");
|
|
|
- }
|
|
|
+// if(handleTotal>9){
|
|
|
+// throw new BusinessException("今日预约人数已满,请更换办理日期!");
|
|
|
+// }
|
|
|
String result = getTime();
|
|
|
ReserveOvertime reserveOvertime = new ReserveOvertime();
|
|
|
reserveOvertime.setOvertimeAge(overtimeVerifyDTO.getOvertimeAge());
|
|
@@ -65,7 +64,7 @@ public class ReserveOvertimeServiceImpl implements ReserveOvertimeService {
|
|
|
reserveOvertime.setOvertimePhone(overtimeVerifyDTO.getOvertimePhone());
|
|
|
reserveOvertime.setBusiness(overtimeVerifyDTO.getBusiness());
|
|
|
reserveOvertime.setHandleTime(handleTime);
|
|
|
- reserveOvertime.setHandleTotal(handleTotal+1);
|
|
|
+// reserveOvertime.setHandleTotal(handleTotal+1);
|
|
|
reserveOvertime.setCreatTime(new Date());
|
|
|
reserveOvertime.setReserveKey(result);
|
|
|
reserveOvertimeDao.insert(reserveOvertime);
|
|
@@ -85,6 +84,7 @@ public class ReserveOvertimeServiceImpl implements ReserveOvertimeService {
|
|
|
Map<Object, Object> map = new HashMap<>();
|
|
|
map.put("ReserveKey", result);
|
|
|
map.put("time",time);
|
|
|
+ map.put("Business",overtimeVerifyDTO.getBusiness());
|
|
|
return BaseResult.ok(map);
|
|
|
}
|
|
|
|