|
@@ -121,23 +121,26 @@ public class SmsService {
|
|
|
|
|
|
doctorsWechat.setCreateAt(new Date());
|
|
doctorsWechat.setCreateAt(new Date());
|
|
doctorsWechat.setUpdateAt(new Date());
|
|
doctorsWechat.setUpdateAt(new Date());
|
|
|
|
+ doctorsWechat.setDoctorId(null);
|
|
|
|
+
|
|
// doctorsWechat.save();
|
|
// doctorsWechat.save();
|
|
// System.out.println(doctorsWechat.getDoctorId()==null?"2":"1");
|
|
// System.out.println(doctorsWechat.getDoctorId()==null?"2":"1");
|
|
// String doctirIdStr = doctorsWechat.getDoctorId();
|
|
// String doctirIdStr = doctorsWechat.getDoctorId();
|
|
|
|
|
|
- if (doctorsWechat.getDoctorId() != null) {
|
|
|
|
|
|
+ if (doctorsWechat != null) {
|
|
|
|
|
|
System.out.println(doctorsWechat.getDoctorId()==null?"3":"1");
|
|
System.out.println(doctorsWechat.getDoctorId()==null?"3":"1");
|
|
|
|
|
|
-// Doctors doctors = Doctors.dao.findById(doctorsWechatfind.getDoctorId());
|
|
|
|
-// doctors.setPassword("");
|
|
|
|
-// DoctorBean doctorBean = JSON.parseObject(doctors.toJson(), DoctorBean.class);
|
|
|
|
|
|
+ Doctors doctors = new Doctors();
|
|
|
|
+ doctors.setId(doctorsWechat.getDoctorId());
|
|
|
|
+ doctors.setPassword("");
|
|
|
|
+ DoctorBean doctorBean = JSON.parseObject(doctors.toJson(), DoctorBean.class);
|
|
// Institution institution = Institution.dao.findById(doctorBean.getInstitution_id());
|
|
// Institution institution = Institution.dao.findById(doctorBean.getInstitution_id());
|
|
-// doctorBean.setInstitution(institution.getName());
|
|
|
|
-// StringBuilder sb = new StringBuilder(doctorBean.getPhone());
|
|
|
|
-// sb.replace(3, 7, "****");
|
|
|
|
-// doctorBean.setPhone(sb.toString());
|
|
|
|
-// String tokenKey = "TOKEN_WXA_" + StrKit.getRandomUUID();
|
|
|
|
|
|
+ doctorBean.setInstitution("ss");
|
|
|
|
+ StringBuilder sb = new StringBuilder(doctorBean.getPhone());
|
|
|
|
+ sb.replace(3, 7, "****");
|
|
|
|
+ doctorBean.setPhone(sb.toString());
|
|
|
|
+ String tokenKey = "TOKEN_WXA_" + StrKit.getRandomUUID();
|
|
// Redis.use("pc").setex("think" + tokenKey, 7200, doctors.toJson());
|
|
// Redis.use("pc").setex("think" + tokenKey, 7200, doctors.toJson());
|
|
// loginBean.setDoctorBean(doctorBean);
|
|
// loginBean.setDoctorBean(doctorBean);
|
|
// loginBean.setToken(tokenKey);
|
|
// loginBean.setToken(tokenKey);
|