use of org.broadleafcommerce.core.rating.domain.ReviewFeedback in project BroadleafCommerce by BroadleafCommerce.
the class RatingServiceImpl method markReviewHelpful.
@Override
@Transactional("blTransactionManager")
public void markReviewHelpful(Long reviewId, Customer customer, Boolean helpful) {
ReviewDetail reviewDetail = reviewDetailDao.readReviewDetailById(reviewId);
if (reviewDetail != null) {
ReviewFeedback reviewFeedback = reviewDetailDao.createFeedback();
reviewFeedback.setCustomer(customer);
reviewFeedback.setIsHelpful(helpful);
reviewFeedback.setReviewDetail(reviewDetail);
reviewDetail.getReviewFeedback().add(reviewFeedback);
reviewDetailDao.saveReviewDetail(reviewDetail);
}
}
Aggregations