刘韬 5 роки тому
батько
коміт
3ebe4e1394

+ 8 - 7
PacsOnline_Wechat_Doctor/src/main/java/com/zskk/controller/WxaUserApiController.java

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