use of com.wayn.common.core.domain.shop.Comment in project waynboot-mall by wayn111.
the class CommentServiceImpl method saveComment.
@Transactional(rollbackFor = Exception.class)
@Override
public boolean saveComment(CommentVO commentVO) {
Comment comment = new Comment();
BeanUtils.copyProperties(commentVO, comment);
comment.setCreateTime(new Date());
comment.setHasPicture(comment.getPicUrls().length > 0);
if (!save(comment)) {
throw new BusinessException("保存评论信息失败");
}
return iOrderGoodsService.update().set("comment", comment.getId()).eq("id", commentVO.getOrderGoodsId()).update();
}
Aggregations