use of com.hccake.ballcat.notify.event.AnnouncementCloseEvent in project ballcat by ballcat-projects.
the class AnnouncementServiceImpl method close.
/**
* 关闭公告信息
* @param announcementId 公告ID
* @return boolean
*/
@Override
public boolean close(Long announcementId) {
Announcement announcement = new Announcement();
announcement.setId(announcementId);
announcement.setStatus(AnnouncementStatusEnum.DISABLED.getValue());
int flag = baseMapper.updateById(announcement);
boolean isUpdated = SqlHelper.retBool(flag);
if (isUpdated) {
publisher.publishEvent(new AnnouncementCloseEvent(announcementId));
}
return isUpdated;
}
Aggregations