|
@@ -201,8 +201,10 @@ private TpAnnouncementMapper tpAnnouncementMapper;
|
201
|
201
|
//内容包含多个图转数组
|
202
|
202
|
JSONArray contentImg = parseObject.getJSONArray("contentImg");
|
203
|
203
|
Integer tdImagesUuid = parseObject.getInteger("id");
|
204
|
|
- String[] contentImgArray = contentImg.toArray(new String[]{});
|
205
|
|
- //修改图片时删除原来图片
|
|
204
|
+
|
|
205
|
+ if (null != contentImg){
|
|
206
|
+ String[] contentImgArray = contentImg.toArray(new String[]{});
|
|
207
|
+ //修改图片时删除原来图片
|
206
|
208
|
QueryWrapper<TdImages> queryWrapper = new QueryWrapper<>();
|
207
|
209
|
queryWrapper.lambda().eq(TdImages::getUuid, tdImagesUuid);
|
208
|
210
|
queryWrapper.lambda().eq(TdImages::getType, "announcement");
|
|
@@ -217,6 +219,8 @@ private TpAnnouncementMapper tpAnnouncementMapper;
|
217
|
219
|
tdImages.setCreateUser(userId);
|
218
|
220
|
imagesMapper.insert(tdImages);
|
219
|
221
|
}
|
|
222
|
+ }
|
|
223
|
+
|
220
|
224
|
// 公告发布成功删除时消息变为无效
|
221
|
225
|
Message message = new Message();
|
222
|
226
|
message.setMessageContent("公告“" + tpAnnouncement.getAnnouncementTitle() + "”还未发布,查看详情");
|