|
@ -209,12 +209,12 @@ public class PatientService extends TokenService {
|
|
|
String code = getCode();
|
|
|
String sql = "insert wlyy_patient(code,idcard,name,ssc,mobile,password,salt,openid" +
|
|
|
",status,birthday,sex,czrq,openid_time,disease,disease_condition,record_amount,points)" +
|
|
|
" values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
|
|
" values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ON DUPLICATE KEY UPDATE idcard = ?";
|
|
|
|
|
|
jdbcTemplate.update(sql, new Object[]{code, idcard, name, ssc, mobile, password, salt, imei, 1, ie.getBirthday()
|
|
|
, ie.getGender(), clock.getCurrentDate(),clock.getCurrentDate(), 0, 0, 0, 0});
|
|
|
, ie.getGender(), clock.getCurrentDate(),clock.getCurrentDate(), 0, 0, 0, 0,idcard});
|
|
|
|
|
|
Patient temp = patientDao.findByCode(code);
|
|
|
Patient temp = patientDao.findByIdcard(idcard);
|
|
|
if (temp != null) {
|
|
|
// 更新openid
|
|
|
updatePatient(temp, imei);
|