| 
															
																@ -48,11 +48,7 @@ public class PatientService extends BasePatientService<BasePatientDO, BasePatien 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @Value("fastDFS.fastdfs_file_url") 
															 | 
															
															 | 
															
																    @Value("fastDFS.fastdfs_file_url") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    private String fastdfsUrl; 
															 | 
															
															 | 
															
																    private String fastdfsUrl; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @Autowired 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    private RSAService rsaService; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    public Map<String,Object> regis(String mobile, String captcha, String password, String openid){ 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    public Map<String,Object> regist(String mobile, String captcha, String password, String openid){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        Map<String, Object> map = new HashMap<>(); 
															 | 
															
															 | 
															
																        Map<String, Object> map = new HashMap<>(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        boolean b = CommonUtils.isMobile(mobile); 
															 | 
															
															 | 
															
																        boolean b = CommonUtils.isMobile(mobile); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if(!b){ 
															 | 
															
															 | 
															
																        if(!b){ 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -85,20 +81,17 @@ public class PatientService extends BasePatientService<BasePatientDO, BasePatien 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } else{ 
															 | 
															
															 | 
															
																        } else{ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            BasePatientDO patient = new BasePatientDO(); 
															 | 
															
															 | 
															
																            BasePatientDO patient = new BasePatientDO(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            patient.setMobile(mobile); 
															 | 
															
															 | 
															
																            patient.setMobile(mobile); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            if(org.apache.commons.lang.StringUtils.isNotBlank(password)){ 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            if(StringUtils.isNotBlank(password)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                //增加密码 
															 | 
															
															 | 
															
																                //增加密码 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                String salt = UUID.randomUUID().toString().replace("-", ""); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                patient.setSalt(salt); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                password = rsaService.decryptString(password); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                password = org.apache.commons.lang.StringUtils.reverse(password); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                if(password.length()<6 || password.length()>20){ 
															 | 
															
															 | 
															
																                if(password.length()<6 || password.length()>20){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    map.put("code",-1); 
															 | 
															
															 | 
															
																                    map.put("code",-1); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    map.put("message","密码长度需为6-20位"); 
															 | 
															
															 | 
															
																                    map.put("message","密码长度需为6-20位"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    return map; 
															 | 
															
															 | 
															
																                    return map; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                } 
															 | 
															
															 | 
															
																                } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                patient.setPassword(com.yihu.jw.util.security.MD5.GetMD5Code(password + salt)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                patient.setSalt(randomString(5)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                patient.setPassword(MD5.md5Hex(password + "{" + patient.getSalt() + "}")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            } 
															 | 
															
															 | 
															
																            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            if(!"undefined".equals(openid) && org.apache.commons.lang.StringUtils.isNotBlank(openid)){ 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            if(!"undefined".equals(openid) && StringUtils.isNotBlank(openid)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                patient.setOpenid(openid); 
															 | 
															
															 | 
															
																                patient.setOpenid(openid); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                patient.setOpenidTime(new Date()); 
															 | 
															
															 | 
															
																                patient.setOpenidTime(new Date()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            } 
															 | 
															
															 | 
															
																            } 
															 |