|  | @ -9,6 +9,7 @@ import com.yihu.jw.hospital.ykyy.service.YkyyService;
 | 
	
		
			
				|  |  | import com.yihu.jw.patient.dao.BasePatientDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.patient.util.ConstantUtils;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.MixEnvelop;
 | 
	
		
			
				|  |  | import com.yihu.jw.utils.StringUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.utils.hibernate.HibenateUtils;
 | 
	
		
			
				|  |  | import com.yihu.mysql.query.BaseJpaService;
 | 
	
		
			
				|  |  | import com.yihu.utils.security.MD5;
 | 
	
	
		
			
				|  | @ -241,6 +242,10 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public Boolean updatePatientPw(String id,String pw,String orgPw){
 | 
	
		
			
				|  |  |         BasePatientDO patientDO = basePatientDao.findOne(id);
 | 
	
		
			
				|  |  |         String orgPwMd5 = MD5.md5Hex(orgPw + "{" + patientDO.getSalt() + "}");
 | 
	
		
			
				|  |  |         if(!orgPwMd5.equals(patientDO.getPassword())){
 | 
	
		
			
				|  |  |             return false;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         //认证信息设置
 | 
	
		
			
				|  |  |         if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
 | 
	
		
			
				|  |  |             String response =ykyyService.updatePatientPassword(patientDO.getMobile(),pw,"");
 | 
	
	
		
			
				|  | @ -256,10 +261,6 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
 | 
	
		
			
				|  |  |                 return true;
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         String orgPwMd5 = MD5.md5Hex(orgPw + "{" + patientDO.getSalt() + "}");
 | 
	
		
			
				|  |  |         if(!orgPwMd5.equals(patientDO.getPassword())){
 | 
	
		
			
				|  |  |             return false;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         String salt = randomString(5);
 | 
	
		
			
				|  |  |         patientDO.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
 | 
	
		
			
				|  |  |         patientDO.setSalt(salt);
 |