刘韬 5 年之前
父节点
当前提交
96b1c04495
共有 1 个文件被更改,包括 14 次插入14 次删除
  1. 14 14
      PacsOnline_Wechat_Doctor/src/main/java/com/zskk/controller/WxaUserApiController.java

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

@@ -82,20 +82,20 @@ 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) {
-//			doctors.setPassword("");
-//			DoctorBean doctorBean = JSON.parseObject(doctors.toJson(), DoctorBean.class);
-//			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();
-//			Redis.use("pc").setex("think" + tokenKey, 7200, doctors.toJson());
-//			loginBean.setDoctorBean(doctorBean);
-//			loginBean.setToken(tokenKey);
-//		}
+		Doctors doctors = Doctors.dao.findById(doctorsWechatfind.getDoctorId());
+		if (doctors != null) {
+			doctors.setPassword("");
+			DoctorBean doctorBean = JSON.parseObject(doctors.toJson(), DoctorBean.class);
+			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();
+			Redis.use("pc").setex("think" + tokenKey, 7200, doctors.toJson());
+			loginBean.setDoctorBean(doctorBean);
+			loginBean.setToken(tokenKey);
+		}
 		renderJson(apiResult);
 	}