From 14055eaf2f332981d553b6de336b725370fbc354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=81=92?= Date: Mon, 16 Oct 2023 13:47:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ResidentPatientInfoServiceImpl.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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());