@ -108,9 +108,7 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
String userName = redisTemplate.opsForValue().get(BespeakRegist + username);
if(StringUtils.isNotBlank(userName)){
//保存到数据库
String uuid = UUID.randomUUID().toString().replace("-","");
this.getJdbcTemplate().update("insert into base_patient(id,mobile,locked,enabled,del,patient_status,login_failure_count) values(?,?,?,?,?,?)",
new Object[]{uuid,username,0,1,1,"1",0});
this.getJdbcTemplate().execute("update base_patient set del=1 where mobile='"+username+"'");
redisTemplate.opsForValue().get(BespeakRegist + username);
redisTemplate.delete(BespeakRegist+username);
}
@ -138,8 +138,17 @@ public class PatientService extends BasePatientService<BasePatientDO, BasePatien
//将预注册信息存到redis中
redisTemplate.opsForValue().set(BespeakRegist+mobile , mobile, time, TimeUnit.MINUTES);
BasePatientDO patient = new BasePatientDO();
patient.setMobile(mobile);
patient.setLocked(0);
patient.setEnabled(0);
patient.setDel("0");
patient.setLoginFailureCount(0);
patient.setPatientStatus("1");
patient = this.save(patient);
map.put("code",1);
map.put("message","预注册成功");
map.put("patient",patient);
return map;