Преглед на файлове

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

chenweida преди 7 години
родител
ревизия
026da3c1f4

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/message/SMS.java

@ -18,7 +18,7 @@ public class SMS extends IdEntity {
    private String mobile;// 手机号
    private String ip;// ip地址
    private Integer type;// 消息类型:1微信端注册,2微信端找回密码,3医生端找回密码,4患者登录,5医生登录,6代预约(发送给居民)
    private Integer type;// 消息类型:1微信端注册,2微信端找回密码,3医生端找回密码,4患者登录,5医生登录,6代预约(发送给居民)  10患者添加家庭关系
    private String captcha;// 验证码
    private String content;// 消息内容
    private Date deadline;// 过期时间

+ 14 - 14
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/SMSService.java

@ -42,6 +42,7 @@ public class SMSService extends BaseService {
    SignFamilyDao signFamilyDao;
    @Autowired
    DoctorDao doctorDao;
    /**
     * 发送短信验证码接口
     *
@ -90,7 +91,6 @@ public class SMSService extends BaseService {
        // 1微信端注册,2微信端找回密码,3医生端找回密码,4患者登录,5医生登录
        if (type == 1) {
            // 患者注册
            sms.setContent("您的注册验证码为:" + captcha);
        } else if (type == 2 || type == 3) {
            sms.setContent("您找回密码验证码为:" + captcha);
@ -117,32 +117,32 @@ public class SMSService extends BaseService {
            // 其他验证码
            sms.setContent("验证码:" + captcha);
        }
        if(type==2||type==4||type==10) {//患者
        if (type == 2 || type == 4 || type == 10) {//患者
            List<Patient> patients = patientDao.findByMobile(mobile);
            if(patients!=null&&patients.size()>0){
                SignFamily signFamily = signFamilyDao.findByMobile(mobile);
                if(signFamily!=null){
                    sms.setUserType(0);
                    sms.setUserCode(signFamily.getPatient());
                    sms.setHospital(signFamily.getHospital());
            if (patients != null && patients.size() > 0) {
                SignFamily sign= signFamilyDao.findByPatient(code);
                sms.setUserType(0);
                sms.setUserCode(code);
                if(sign!=null){
                    sms.setHospital(sign.getHospital());
                }
            }
        }else if(type==3||type==5||type==6){//医生
        } else if (type == 3 || type == 5 || type == 6) {//医生
            Doctor d = doctorDao.findByMobile(mobile);
            if(d!=null){
            if (d != null) {
                sms.setUserType(0);
                sms.setUserCode(d.getCode());
                sms.setHospital(d.getHospital());
            }
        }else{//未知
        } else {//未知
            Doctor d = doctorDao.findByMobile(mobile);
            if(d!=null){
            if (d != null) {
                sms.setUserType(0);
                sms.setUserCode(d.getCode());
                sms.setHospital(d.getHospital());
            }else{
            } else {
                SignFamily signFamily = signFamilyDao.findByMobile(mobile);
                if(signFamily!=null){
                if (signFamily != null) {
                    sms.setUserType(0);
                    sms.setUserCode(signFamily.getPatient());
                    sms.setHospital(signFamily.getHospital());