刘韬 5 سال پیش
والد
کامیت
d0485599b6
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      PacsOnline_Wechat_Doctor/src/main/java/com/zskk/controller/WxaUserApiController.java

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

@@ -72,7 +72,7 @@ public class WxaUserApiController extends WxaController {
 			}
 			doctorsWechat.setCreateAt(new Date());
 			doctorsWechat.setUpdateAt(new Date());
-			doctorsWechatfind = doctorsWechat;
+//			doctorsWechatfind = doctorsWechat;
 			doctorsWechat.save();
 		} else {
 			doctorsWechatfind.setUpdateAt(new Date());
@@ -81,8 +81,8 @@ public class WxaUserApiController extends WxaController {
 		accessTokenCache.set("wxa:session:" + sessionId, apiResult.getJson());
 		LoginBean loginBean = new LoginBean();
 		loginBean.setSessionId(sessionId);
-		Doctors doctors = Doctors.dao.findById(doctorsWechatfind.getDoctorId());
-		if (doctors != null) {
+		if (doctorsWechatfind.getDoctorId() != null) {
+			Doctors doctors = Doctors.dao.findById(doctorsWechatfind.getDoctorId());
 			doctors.setPassword("");
 			DoctorBean doctorBean = JSON.parseObject(doctors.toJson(), DoctorBean.class);
 			Institution institution = Institution.dao.findById(doctorBean.getInstitution_id());