예제 #1
0
  public void updateVideoOnPlay(Video video) {
    video.setPlayCount(video.getPlayCount() + 1);

    //        User user=video.getUser(); //导致分层不清代码不好
    /*修改相应用户的视频播放总数*/
    //        user.setTotalPlayCount(user.getTotalPlayCount()+1);
    videoDao.update(video);
    //        userDao.update(user);
  }
예제 #2
0
 /*添加评论*/
 public void addComment(Comment comment, Video video) {
   commentDao.save(comment);
   video.setCommentCount(video.getCommentCount() + 1);
   videoDao.update(video);
 }
예제 #3
0
 /*修改视频的差评次数*/
 public void updateVideoOnCai(Video video) {
   video.setBadCommentCount(video.getBadCommentCount() + 1);
   videoDao.update(video);
 }
예제 #4
0
 public void updateVideoOnDing(Video video) {
   video.setGoodCommentCount(video.getGoodCommentCount() + 1);
   videoDao.update(video);
 }