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");