From 429b1bd61159d4e62c485bf7ccbbea0f38d55432 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Wed, 12 Apr 2023 16:54:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/manage/NotifyManage.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NotifyManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NotifyManage.java index b966e7b..4cfaacc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NotifyManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NotifyManage.java @@ -15,6 +15,7 @@ import com.ningdatech.pmapi.sys.service.INotifyService; import com.ningdatech.pmapi.todocenter.constant.WorkNoticeContant; import com.ningdatech.pmapi.user.util.LoginUserUtil; import lombok.RequiredArgsConstructor; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; import java.util.List; @@ -52,13 +53,16 @@ public class NotifyManage { .map(n -> { NotifyVO notifyVo = new NotifyVO(); BeanUtil.copyProperties(n,notifyVo); - JSONObject jsonObject = JSON.parseObject(n.getExtraInfo()); - Long projectId = jsonObject.getLong(WorkNoticeContant.PROJECT_ID); - String instanceId = jsonObject.getString(WorkNoticeContant.INSTANCE_ID); - Long meetingId = jsonObject.getLong(WorkNoticeContant.MEETING_ID); - notifyVo.setProjectId(projectId); - notifyVo.setInstanceId(instanceId); - notifyVo.setMeetingId(meetingId); + String extraInfo = n.getExtraInfo(); + if (StringUtils.isNotBlank(extraInfo)) { + JSONObject jsonObject = JSON.parseObject(extraInfo); + Long projectId = jsonObject.getLong(WorkNoticeContant.PROJECT_ID); + String instanceId = jsonObject.getString(WorkNoticeContant.INSTANCE_ID); + Long meetingId = jsonObject.getLong(WorkNoticeContant.MEETING_ID); + notifyVo.setProjectId(projectId); + notifyVo.setInstanceId(instanceId); + notifyVo.setMeetingId(meetingId); + } return notifyVo; }) .collect(Collectors.toList());