فهرست منبع

Merge branch 'dev' of chenweida/patient-co-management into dev

chenweida 8 سال پیش
والد
کامیت
f1380db749
1فایلهای تغییر یافته به همراه13 افزوده شده و 1 حذف شده
  1. 13 1
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java

+ 13 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java

@ -910,7 +910,19 @@ public class DoctorInfoService extends BaseService {
        if (smsCheck != 1) {
            return -3;
        }
        //修改密码
        String oldPassword=doc.getPassword();
        //判断旧的密码是不是手机号码后六位
        String oldMobile=doc.getMobile();
        if(!org.springframework.util.StringUtils.isEmpty(oldMobile)){
            String passwordTemp=oldMobile.substring(5);
            passwordTemp=MD5.GetMD5Code(passwordTemp+doc.getSalt());
            if(passwordTemp.equals(oldPassword)){
                //如果密码是原来的电话号码后留位改成现在号码的后留位
                String newPassword=MD5.GetMD5Code(mobile.substring(5)+doc.getSalt());
                doc.setPassword(newPassword);
            }
        }
        doc.setMobile(mobile);
        return 1;