| 
															
																@ -1,5 +1,6 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																package com.yihu.jw.utils.hibernate; 
															 | 
															
															 | 
															
																package com.yihu.jw.utils.hibernate; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import com.yihu.jw.entity.base.patient.BasePatientDO; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.hibernate.SQLQuery; 
															 | 
															
															 | 
															
																import org.hibernate.SQLQuery; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.hibernate.Session; 
															 | 
															
															 | 
															
																import org.hibernate.Session; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.hibernate.Transaction; 
															 | 
															
															 | 
															
																import org.hibernate.Transaction; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -165,4 +166,19 @@ public class HibenateUtils { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        transaction.commit(); 
															 | 
															
															 | 
															
																        transaction.commit(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    } 
															 | 
															
															 | 
															
																    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    /** 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																     * 更新 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																     * @param entity 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																     */ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    public void update(Object entity){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        entityManager.merge(entity); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        entityManager.flush(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    public void update(String id,String phone){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        BasePatientDO basePatientDO = entityManager.find(BasePatientDO.class,id); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        basePatientDO.setPhone(phone); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        update(basePatientDO); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																} 
															 | 
															
															 | 
															
																} 
															 |