|
@@ -81,15 +81,16 @@ public class ImGroupNoticeServiceImpl extends BaseServiceImpl<Long, ImGroupNotic
|
|
|
}
|
|
|
imGroupNoticeDao.update(imGroupNotice);
|
|
|
// 撤销群公告消息
|
|
|
- revokeImGroupNoticeMessage(imGroupNotice);
|
|
|
+ ImGroupNotice notice = imGroupNoticeDao.get(imGroupNotice.getId());
|
|
|
+ revokeImGroupNoticeMessage(notice);
|
|
|
|
|
|
// 发送群公告消息
|
|
|
- String messageSeqId = sendGroupCustomNoticeMessage(convertToImGroupNotice(imGroupNotice));
|
|
|
+ String messageSeqId = sendGroupCustomNoticeMessage(convertToImGroupNotice(notice));
|
|
|
|
|
|
// 更新群公告消息ID
|
|
|
if (StringUtils.isNotBlank(messageSeqId)) {
|
|
|
- imGroupNotice.setMessageSeqId(messageSeqId);
|
|
|
- imGroupNoticeDao.update(imGroupNotice);
|
|
|
+ notice.setMessageSeqId(messageSeqId);
|
|
|
+ imGroupNoticeDao.update(notice);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -99,6 +100,7 @@ public class ImGroupNoticeServiceImpl extends BaseServiceImpl<Long, ImGroupNotic
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public Long add(ImGroupNotice imGroupNotice) {
|
|
|
if(imGroupNotice.isIsTop()){
|
|
|
//置顶取消
|
|
@@ -116,6 +118,7 @@ public class ImGroupNoticeServiceImpl extends BaseServiceImpl<Long, ImGroupNotic
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public void del(Long id) {
|
|
|
ImGroupNotice notice = imGroupNoticeDao.get(id);
|
|
|
if (notice == null) {
|