public void afterPublish(Long userId, Long activityId, Long itemNumIid, boolean successful) { PosterRecommendPublishItem newPublishItem = new PosterRecommendPublishItem(); newPublishItem.setUserId(userId); newPublishItem.setActivityId(activityId); newPublishItem.setItemNumIid(itemNumIid); newPublishItem.setPublishTime(appService.getLocalSystemTime().toDate()); if (successful) { newPublishItem.setStatus(PosterRecommendConstants.PUBLISH_ITEM_STATUS_PUBLISHED_SUCCESSFULLY); } else { newPublishItem.setStatus(PosterRecommendConstants.PUBLISH_ITEM_STATUS_PUBLISHED_FAILED); } posterRecommendPublishItemDAO.updateByUserIdAndActivityIdAndItemNumIid(newPublishItem); }
public void afterUnpublish( Long userId, Long activityId, Long publishItemNumIid, boolean successful) { PosterRecommendPublishItem newPublishItem = new PosterRecommendPublishItem(); newPublishItem.setUserId(userId); newPublishItem.setActivityId(activityId); newPublishItem.setItemNumIid(publishItemNumIid); if (successful) { newPublishItem.setStatus( PosterRecommendConstants.PUBLISH_ITEM_STATUS_UNPUBLISHED_SUCCESSFULLY); } else { newPublishItem.setStatus(PosterRecommendConstants.PUBLISH_ITEM_STATUS_UNPUBLISHED_FAILED); } posterRecommendPublishItemDAO.updateByUserIdAndActivityIdAndItemNumIid(newPublishItem); }