コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }