|  | @ -124,6 +124,22 @@ public class OauthSsoService {
 | 
												
													
														
															|  |                     rs.put("code",1);
 |  |                     rs.put("code",1);
 | 
												
													
														
															|  |                     rs.put("mes","获取居民信息成功");
 |  |                     rs.put("mes","获取居民信息成功");
 | 
												
													
														
															|  |                     rs.put("patient",basePatientDO);
 |  |                     rs.put("patient",basePatientDO);
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |                     List<BasePatientWechatDo> wechatDos = basePatientWechatDao.findByWechatIdAndPatientId(appId,basePatientDO.getId());
 | 
												
													
														
															|  | 
 |  |                     if(wechatDos!=null&&wechatDos.size()>0){
 | 
												
													
														
															|  | 
 |  |                         for(BasePatientWechatDo wechatDo:wechatDos){
 | 
												
													
														
															|  | 
 |  |                             wechatDo.setOpenid(openid);
 | 
												
													
														
															|  | 
 |  |                         }
 | 
												
													
														
															|  | 
 |  |                         basePatientWechatDao.save(wechatDos);
 | 
												
													
														
															|  | 
 |  |                     }else {
 | 
												
													
														
															|  | 
 |  |                         //保存openid
 | 
												
													
														
															|  | 
 |  |                         BasePatientWechatDo wechatDo = new BasePatientWechatDo();
 | 
												
													
														
															|  | 
 |  |                         wechatDo.setOpenid(openid);
 | 
												
													
														
															|  | 
 |  |                         wechatDo.setPatientId(basePatientDO.getId());
 | 
												
													
														
															|  | 
 |  |                         wechatDo.setWechatId(appId);
 | 
												
													
														
															|  | 
 |  |                         basePatientWechatDao.save(wechatDo);
 | 
												
													
														
															|  | 
 |  |                     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                     return rs;
 |  |                     return rs;
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  | 
 |  | 
 |