diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java index 2ebb886..9128d8c 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java @@ -336,12 +336,22 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi } catch (Exception e) { throw new ServiceException(e.getMessage()); } + //获取手机号 String code; + String cityCode = ""; AppletPhoneVO phone = getPhone(phoneCode); String phoneNumber = phone.getPhoneInfo().getPhoneNumber(); HashMap.put("phone",phoneNumber); - code = residentPatientInfoMapper.selectPatientInfoByPhone(phoneNumber) == 0 ? "0" : "1"; + List infoList = residentPatientInfoMapper.selectPatientInfoByPhone(phoneNumber); + code = infoList.size()== 0 ? "0" : "1"; + //返回绑定城市 + if ("1".equals(code)){ + for (PatientInfo patientInfo : infoList) { + cityCode = patientInfo.getCityCode(); + } + } HashMap.put("code",code); + HashMap.put("cityCode",cityCode); return HashMap; } }