|
@@ -246,14 +246,15 @@ public class WxaUserApiController extends WxaController {
|
|
|
renderJson(ErrorConstant.ERROR_PHONE_BLANK);
|
|
|
return;
|
|
|
}
|
|
|
- renderText(phone);
|
|
|
+
|
|
|
+
|
|
|
+ Doctors doctors = Doctors.dao.findFirst("select * from doctors where phone=?", phone);
|
|
|
+ if (doctors == null) {
|
|
|
+ renderJson(ErrorConstant.ERROR_DOCTOR_NOT_FIND);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ renderJson(doctors);
|
|
|
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();
|