|
@ -128,7 +128,7 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
|
|
|
String salt = UUID.randomUUID().toString().replace("-", "");
|
|
|
patient.setSalt(salt);
|
|
|
password = rsaService.decryptString(password);
|
|
|
password = org.apache.commons.lang3.StringUtils.reverse(password);
|
|
|
password = StringUtils.reverse(password);
|
|
|
if(password.length()<6 || password.length()>20){
|
|
|
envelop.setMessage("密码长度需为6-20位");
|
|
|
envelop.setStatus(-1);
|
|
@ -136,7 +136,7 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
|
|
|
}
|
|
|
patient.setPassword(MD5.GetMD5Code(password + salt));
|
|
|
}
|
|
|
if(!"undefined".equals(openid) && org.apache.commons.lang3.StringUtils.isNotBlank(openid)){
|
|
|
if(!"undefined".equals(openid) && StringUtils.isNotBlank(openid)){
|
|
|
patient.setOpenid(openid);
|
|
|
patient.setOpenidTime(new Date());
|
|
|
}
|
|
@ -224,7 +224,7 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
|
|
|
}
|
|
|
}
|
|
|
if(isLogin){
|
|
|
if(org.apache.commons.lang3.StringUtils.isNotBlank(openId) && !"undefined".equals(openId)){
|
|
|
if(StringUtils.isNotBlank(openId) && !"undefined".equals(openId)){
|
|
|
//更新openId
|
|
|
if(!openId.equals(p.getOpenid())){
|
|
|
patientService.updateOpenId(p.getId(), openId);
|
|
@ -238,6 +238,8 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
|
|
|
map.put("name", p.getName());
|
|
|
map.put("token", token.getToken());
|
|
|
map.put("photo", p.getPhoto());
|
|
|
envelop.setMessage("登陆成功");
|
|
|
envelop.setStatus(200);
|
|
|
}
|
|
|
return envelop;
|
|
|
}
|