Kaynağa Gözat

预注册,优先保存del=0的patient数据

chenyongxing 6 yıl önce
ebeveyn
işleme
c2f2e5e8cc

+ 1 - 3
server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/jdbc/WlyyUserDetailsService.java

@ -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);
            }

+ 9 - 0
svr/svr-patient/src/main/java/com/yihu/jw/patient/service/personal_Info/PatientService.java

@ -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;
    }