|
@ -27,7 +27,6 @@ import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import java.util.Enumeration;
|
|
import java.util.Enumeration;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
@ -44,15 +43,13 @@ public class PatientBookingEndpoint extends EnvelopRestEndpoint {
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(PatientBookingEndpoint.class);
|
|
private static final Logger logger = LoggerFactory.getLogger(PatientBookingEndpoint.class);
|
|
|
|
|
|
// @Autowired
|
|
|
|
// private GuahaoXMService guahaoXM;
|
|
|
|
@Resource
|
|
|
|
|
|
@Autowired
|
|
private PatientReservationService patientReservationService;
|
|
private PatientReservationService patientReservationService;
|
|
@Resource
|
|
|
|
|
|
@Autowired
|
|
private BasePatientDao patientDao;
|
|
private BasePatientDao patientDao;
|
|
@Resource
|
|
|
|
|
|
@Autowired
|
|
private WechatUtilService wechatUtilService;
|
|
private WechatUtilService wechatUtilService;
|
|
@Resource
|
|
|
|
|
|
@Autowired
|
|
private JwSmjkEntranceService jwSmjkService;
|
|
private JwSmjkEntranceService jwSmjkService;
|
|
// @Autowired
|
|
// @Autowired
|
|
// private SMSDao smsDao;
|
|
// private SMSDao smsDao;
|
|
@ -264,25 +261,25 @@ public class PatientBookingEndpoint extends EnvelopRestEndpoint {
|
|
@ApiParam(name = "patientPhone", value = "患者手机", defaultValue = "13950116510")
|
|
@ApiParam(name = "patientPhone", value = "患者手机", defaultValue = "13950116510")
|
|
@RequestParam(value = "patientPhone", required = true) String patientPhone,
|
|
@RequestParam(value = "patientPhone", required = true) String patientPhone,
|
|
@ApiParam(name = "key", value = "验证码key")
|
|
@ApiParam(name = "key", value = "验证码key")
|
|
@RequestParam(value = "key", required = true) String key,
|
|
|
|
|
|
@RequestParam(value = "key", required = false) String key,
|
|
@ApiParam(name = "text", value = "text")
|
|
@ApiParam(name = "text", value = "text")
|
|
@RequestParam(value = "text", required = true) String text) {
|
|
|
|
try{
|
|
|
|
boolean pass = false;
|
|
|
|
key = key.replaceFirst(":",":"+patient+"_");
|
|
|
|
|
|
|
|
String captcha = redisTemplate.opsForValue().get(key);
|
|
|
|
if (captcha != null && captcha.equals(text.toLowerCase())){
|
|
|
|
pass = true;
|
|
|
|
redisTemplate.delete(key);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!pass){
|
|
|
|
return Envelop.getError("验证码校验失败");
|
|
|
|
}
|
|
|
|
} catch (Exception e){
|
|
|
|
return failedException2(e);
|
|
|
|
}
|
|
|
|
|
|
@RequestParam(value = "text", required = false) String text) {
|
|
|
|
// try{
|
|
|
|
// boolean pass = false;
|
|
|
|
// key = key.replaceFirst(":",":"+patient+"_");
|
|
|
|
//
|
|
|
|
// String captcha = redisTemplate.opsForValue().get(key);
|
|
|
|
// if (captcha != null && captcha.equals(text.toLowerCase())){
|
|
|
|
// pass = true;
|
|
|
|
// redisTemplate.delete(key);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// if(!pass){
|
|
|
|
// return Envelop.getError("验证码校验失败");
|
|
|
|
// }
|
|
|
|
// } catch (Exception e){
|
|
|
|
// return failedException2(e);
|
|
|
|
// }
|
|
|
|
|
|
try {
|
|
try {
|
|
recordRequestLog("CreateOrder");
|
|
recordRequestLog("CreateOrder");
|