From 8f7424b5e7ef17277b8320cf63cf13905f969804 Mon Sep 17 00:00:00 2001 From: wxwx <4622811@163.com> Date: Fri, 2 Aug 2024 06:30:14 +0000 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=20?= =?UTF-8?q?=E7=AB=99=E5=86=85=E4=BF=A1=E8=AF=A6=E6=83=85=E4=B8=AD=E5=8C=85?= =?UTF-8?q?=E5=90=AB=E5=88=A0=E9=99=A4=E7=94=A8=E6=88=B7=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E6=98=BE=E7=A4=BA=E4=B8=BA=E2=80=9C=E6=9C=AA?= =?UTF-8?q?=E7=9F=A5=E7=94=A8=E6=88=B7=E2=80=9D=20=E7=AB=99=E5=86=85?= =?UTF-8?q?=E4=BF=A1=E6=94=B6=E4=BB=B6=E4=BA=BA=E4=B8=AD=E5=8C=85=E5=90=AB?= =?UTF-8?q?=E5=B7=B2=E5=88=A0=E9=99=A4=E7=94=A8=E6=88=B7=E6=97=B6=EF=BC=8C?= =?UTF-8?q?sysUserApi.getUserByIdWithException(devRelation.getTargetId())?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=BC=9A=E6=8A=9B=E5=87=BA=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=EF=BC=8C=E7=9B=B4=E6=8E=A5=E6=8A=9B=E5=88=B0=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=8A=A5=E9=94=99=EF=BC=8C=E8=BF=99=E9=87=8C=E6=8D=95=E8=8E=B7?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=E5=BC=82=E5=B8=B8=E4=B8=8D=E5=81=9A=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E5=8F=AF=E4=BB=A5=E8=AE=A9=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=88=90=E5=8A=9F=E6=98=BE=E7=A4=BA=E4=B8=BA?= =?UTF-8?q?=E6=9C=AA=E7=9F=A5=E7=94=A8=E6=88=B7=E6=88=96=E8=80=85=E5=9C=A8?= =?UTF-8?q?catch=E4=B8=AD=E5=81=9A=E7=89=B9=E6=AE=8A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wxwx <4622811@163.com> --- .../message/service/impl/DevMessageServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/message/service/impl/DevMessageServiceImpl.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/message/service/impl/DevMessageServiceImpl.java index 04407bf4..a55c59c1 100644 --- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/message/service/impl/DevMessageServiceImpl.java +++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/message/service/impl/DevMessageServiceImpl.java @@ -192,7 +192,13 @@ public class DevMessageServiceImpl extends ServiceImpl receiveInfoList = devRelationService.getRelationListByObjectIdAndCategory(devMessage.getId(), DevRelationCategoryEnum.MSG_TO_USER.getValue()).stream().map(devRelation -> { DevMessageResult.DevReceiveInfo devReceiveInfo = new DevMessageResult.DevReceiveInfo(); - JSONObject userObj = sysUserApi.getUserByIdWithException(devRelation.getTargetId()); + JSONObject userObj = null; + try { + userObj = sysUserApi.getUserByIdWithException(devRelation.getTargetId()); + } + catch (Exception e) { + // 收件人中包含删除用户 在此处做处理 + } String userName = "未知用户"; if(ObjectUtil.isNotEmpty(userObj)) { userName = userObj.getStr("name");