|
@@ -240,24 +240,26 @@ public class WxaUserApiController extends WxaController {
|
|
// 同一用户,对同一个微信开放平台下的不同应用,unionid是相同的。
|
|
// 同一用户,对同一个微信开放平台下的不同应用,unionid是相同的。
|
|
|
|
|
|
JSONObject object = JSON.parseObject(json);
|
|
JSONObject object = JSON.parseObject(json);
|
|
- String phone = object.getString("purePhoneNumber");
|
|
|
|
- if (StrKit.isBlank(phone)) {
|
|
|
|
- renderJson(ErrorConstant.ERROR_PHONE_BLANK);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- Doctors doctors = Doctors.dao.findFirst("select * from doctors where phone=?", phone);
|
|
|
|
- if (doctors == null) {
|
|
|
|
- renderJson(ErrorConstant.ERROR_DOCTOR_NOT_FIND);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- DoctorsWechat doctorsWechat = DoctorsWechat.dao.findFirst("select * from doctors_wechat where wxa_openid=?",sessionResult.get("openid"));
|
|
|
|
- doctorsWechat.setDoctorId(doctors.getId());
|
|
|
|
- doctorsWechat.update();
|
|
|
|
- LoginBean loginBean = new LoginBean();
|
|
|
|
- loginBean.setSessionId(sessionId);
|
|
|
|
- loginBean.setDoctorBean(doctors);
|
|
|
|
- renderJson(new ResultBean(loginBean));
|
|
|
|
|
|
+ renderJson(object);
|
|
|
|
+ return;
|
|
|
|
+// String phone = object.getString("purePhoneNumber");
|
|
|
|
+// if (StrKit.isBlank(phone)) {
|
|
|
|
+// renderJson(ErrorConstant.ERROR_PHONE_BLANK);
|
|
|
|
+// return;
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// Doctors doctors = Doctors.dao.findFirst("select * from doctors where phone=?", phone);
|
|
|
|
+// if (doctors == null) {
|
|
|
|
+// renderJson(ErrorConstant.ERROR_DOCTOR_NOT_FIND);
|
|
|
|
+// return;
|
|
|
|
+// }
|
|
|
|
+// DoctorsWechat doctorsWechat = DoctorsWechat.dao.findFirst("select * from doctors_wechat where wxa_openid=?",sessionResult.get("openid"));
|
|
|
|
+// doctorsWechat.setDoctorId(doctors.getId());
|
|
|
|
+// doctorsWechat.update();
|
|
|
|
+// LoginBean loginBean = new LoginBean();
|
|
|
|
+// loginBean.setSessionId(sessionId);
|
|
|
|
+// loginBean.setDoctorBean(doctors);
|
|
|
|
+// renderJson(new ResultBean(loginBean));
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|