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 de51f3c..715033c 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 @@ -153,13 +153,15 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi // 修改 if(!StringUtils.isBlank(body.getPatientCode())) { PatientInfo patientInfo = residentPatientInfoMapper.getByCardNo(body.getCardNo()); - BeanUtils.copyBeanProp(patientInfo, body); - if(body.getDiseaseList() != null) { - patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(","))); + if (ObjectUtils.isNotEmpty(patientInfo)) { + BeanUtils.copyBeanProp(patientInfo, body); + if (body.getDiseaseList() != null) { + patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(","))); + } + patientInfo.setLoginFlag(Long.valueOf(1)); + updatePatientInfo(patientInfo); + // 注册 } - patientInfo.setLoginFlag(Long.valueOf(1)); - updatePatientInfo(patientInfo); - // 注册 } else { // 获取当前微信绑定的居民 List list = residentPatientInfoMapper.getList(body.getOpenid(), body.getCityCode());