| 
					
				 | 
			
			
				@ -306,41 +306,19 @@ public class LoginController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (type == 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 医生端 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Doctor doctor = doctorService.findDoctorByMobile(mobile); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (doctor == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    return error(-1, "操作失败:此用户未注册"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    int res = smsService.check(mobile, type, captcha); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    switch (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        case -2: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            return error(-1, "验证码已过期!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        case -1: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            return error(-1, "验证码错误!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        case 0: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            return error(-1, "验证码无效!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Doctor doctor = doctorService.findDoctorByMobile(mobile); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String password = RSAUtils.getInstance(doctorService).decryptString(newpwd); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    password=StringUtils.reverse(password); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    password=MD5.GetMD5Code(password+doctor.getSalt()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    doctor.setPassword(password); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    doctorService.updateDoctorPwd(doctor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    return success("操作成功!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 患者端 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Patient patientTemp = patientService.findByIdcard(idcard); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (patientTemp == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    return error(-1, "操作失败:此用户未注册"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    int res = smsService.check(patientTemp.getMobile(), type, captcha); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    switch (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        case -2: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            return error(-1, "验证码已过期!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        case -1: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            return error(-1, "验证码错误!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        case 0: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            return error(-1, "验证码无效!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String password = RSAUtils.getInstance(doctorService).decryptString(newpwd); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    password=StringUtils.reverse(password); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    password=MD5.GetMD5Code(password+patientTemp.getSalt()); 
			 |