fix:合并代码后修改差异完善商品评论相关

This commit is contained in:
puhui999
2023-06-12 17:02:46 +08:00
parent 5cfcaa1a6e
commit 60172274ec
13 changed files with 212 additions and 105 deletions

View File

@@ -5,7 +5,7 @@ import cn.hutool.core.util.RandomUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest;
import cn.iocoder.yudao.module.product.controller.admin.comment.vo.ProductCommentPageReqVO;
import cn.iocoder.yudao.module.product.controller.admin.comment.vo.ProductCommentReplyVO;
import cn.iocoder.yudao.module.product.controller.admin.comment.vo.ProductCommentReplyReqVO;
import cn.iocoder.yudao.module.product.controller.admin.comment.vo.ProductCommentRespVO;
import cn.iocoder.yudao.module.product.controller.admin.comment.vo.ProductCommentUpdateVisibleReqVO;
import cn.iocoder.yudao.module.product.controller.app.comment.vo.AppCommentPageReqVO;
@@ -15,6 +15,7 @@ import cn.iocoder.yudao.module.product.convert.comment.ProductCommentConvert;
import cn.iocoder.yudao.module.product.dal.dataobject.comment.ProductCommentDO;
import cn.iocoder.yudao.module.product.dal.mysql.comment.ProductCommentMapper;
import cn.iocoder.yudao.module.product.enums.comment.ProductCommentScoresEnum;
import cn.iocoder.yudao.module.product.service.sku.ProductSkuService;
import cn.iocoder.yudao.module.product.service.spu.ProductSpuService;
import cn.iocoder.yudao.module.trade.api.order.TradeOrderApi;
import org.junit.jupiter.api.Test;
@@ -52,6 +53,8 @@ public class ProductCommentServiceImplTest extends BaseDbUnitTest {
private TradeOrderApi tradeOrderApi;
@MockBean
private ProductSpuService productSpuService;
@MockBean
private ProductSkuService productSkuService;
public String generateNo() {
return DateUtil.format(new Date(), "yyyyMMddHHmmss") + RandomUtil.randomInt(100000, 999999);
@@ -183,7 +186,7 @@ public class ProductCommentServiceImplTest extends BaseDbUnitTest {
Long productCommentId = productComment.getId();
ProductCommentReplyVO replyVO = new ProductCommentReplyVO();
ProductCommentReplyReqVO replyVO = new ProductCommentReplyReqVO();
replyVO.setId(productCommentId);
replyVO.setReplyContent("测试");
productCommentService.replyComment(replyVO, 1L);