|
@ -2143,7 +2143,8 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
return ObjEnvelop.getError("登录失败!");
|
|
return ObjEnvelop.getError("登录失败!");
|
|
}*/
|
|
}*/
|
|
@RequestMapping(value = "/oauth/registerPatientAndLogin", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/oauth/registerPatientAndLogin", method = RequestMethod.POST)
|
|
public ObjEnvelop registerPatientAndLogin(String name, String mobile, String idcard, String ssc, String pw,String client_id,String login_type,String captcha,String openid,String wxId
|
|
|
|
|
|
public ObjEnvelop registerPatientAndLogin(String name, String mobile, String idcard, String ssc, String pw,
|
|
|
|
String client_id,String login_type,String captcha,String openid,String wxId
|
|
,String geetestChallenge,String geetestValidate,String geetestSeccode )throws Exception{
|
|
,String geetestChallenge,String geetestValidate,String geetestSeccode )throws Exception{
|
|
|
|
|
|
if (StringUtils.isEmpty(client_id)) {
|
|
if (StringUtils.isEmpty(client_id)) {
|
|
@ -2239,7 +2240,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
}else {
|
|
}else {
|
|
try {
|
|
try {
|
|
|
|
|
|
Map<String,Object> rs = registerService.registerPatient(mobile,pw,name,idcard,openid);
|
|
|
|
|
|
Map<String,Object> rs = registerService.registerPatient(mobile,pw,name,idcard,ssc,openid);
|
|
String code = rs.get("code").toString();
|
|
String code = rs.get("code").toString();
|
|
if(!"1".equals(code)){
|
|
if(!"1".equals(code)){
|
|
ObjEnvelop objEnvelop = new ObjEnvelop();
|
|
ObjEnvelop objEnvelop = new ObjEnvelop();
|
|
@ -2296,27 +2297,55 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
}
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/oauth/findPatientPw", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/oauth/findPatientPw", method = RequestMethod.POST)
|
|
public Envelop findPatientPw(String mobile,String client_id,String login_type,String captcha,String pw)throws Exception {
|
|
|
|
WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyhospitalSysdictDao.findDictById("isNeedSMS");
|
|
|
|
if (wlyyHospitalSysDictDO!=null&&!StringUtils.isEmpty(wlyyHospitalSysDictDO.getDictValue())){
|
|
|
|
if (captcha.equalsIgnoreCase(wlyyHospitalSysDictDO.getDictValue())){
|
|
|
|
|
|
public Envelop findPatientPw(String mobile,String client_id,String login_type,String captcha
|
|
|
|
,String pw,String key,String idcard,String text){
|
|
|
|
try {
|
|
|
|
if(StringUtils.isEmpty(idcard)){
|
|
|
|
return ObjEnvelop.getError("手机号码不能为空!");
|
|
|
|
}
|
|
|
|
if(StringUtils.isEmpty(mobile)){
|
|
|
|
return ObjEnvelop.getError("手机号码不能为空!");
|
|
|
|
}
|
|
|
|
if(StringUtils.isEmpty(key)||StringUtils.isEmpty(text)){
|
|
|
|
return ObjEnvelop.getError("图形验证码不能为空!");
|
|
|
|
}
|
|
|
|
if(!verifyCaptcha(key,text)){
|
|
|
|
throw new ImgCaptchaException("图形验证码错误!");
|
|
|
|
}
|
|
|
|
|
|
|
|
Integer re = registerService.checkeMobileAndIdcard(mobile,idcard);
|
|
|
|
if(re == -1){
|
|
|
|
return ObjEnvelop.getError("居民不存在!");
|
|
|
|
}else if(re == -2){
|
|
|
|
return ObjEnvelop.getError("身份证和手机号码不匹配!");
|
|
|
|
}
|
|
|
|
|
|
|
|
WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyhospitalSysdictDao.findDictById("isNeedSMS");
|
|
|
|
if (wlyyHospitalSysDictDO!=null&&!StringUtils.isEmpty(wlyyHospitalSysDictDO.getDictValue())){
|
|
|
|
if (captcha.equalsIgnoreCase(wlyyHospitalSysDictDO.getDictValue())){
|
|
|
|
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("短信验证码错误!");
|
|
|
|
}
|
|
}else {
|
|
}else {
|
|
return ObjEnvelop.getError("验证码错误!");
|
|
|
|
|
|
if (wlyyRedisVerifyCodeService.verification(client_id, mobile, captcha)) {
|
|
|
|
//验证码正确
|
|
|
|
} else {
|
|
|
|
return ObjEnvelop.getError("短信验证码错误!");
|
|
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
|
|
if (wlyyRedisVerifyCodeService.verification(client_id, mobile, captcha)) {
|
|
|
|
//验证码正确
|
|
|
|
} else {
|
|
|
|
return ObjEnvelop.getError("验证码错误!");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String rs = registerService.updatePatientPw(pw,mobile);
|
|
|
|
if("ok".equals(rs)){
|
|
|
|
return ObjEnvelop.getSuccess("修改成功!");
|
|
}
|
|
}
|
|
}
|
|
|
|
String rs = registerService.updatePatientPw(pw,mobile);
|
|
|
|
if("ok".equals(rs)){
|
|
|
|
return ObjEnvelop.getSuccess("修改成功!");
|
|
|
|
}
|
|
|
|
|
|
|
|
return ObjEnvelop.getError("手机号未注册!");
|
|
|
|
|
|
return ObjEnvelop.getError("手机号未注册!");
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
return Envelop.getError("系统繁忙,请稍后在试");
|
|
}
|
|
}
|
|
@RequestMapping(value = "/oauth/findDoctorPw", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/oauth/findDoctorPw", method = RequestMethod.POST)
|
|
public Envelop findDoctorPw(String mobile,String client_id,String captcha,String pw) throws Exception{
|
|
public Envelop findDoctorPw(String mobile,String client_id,String captcha,String pw) throws Exception{
|