From b4c899216459f1fcb13de048e782158fe7af76a2 Mon Sep 17 00:00:00 2001 From: donghongyang <2064765821@qq.com> Date: Sun, 1 Dec 2024 10:18:34 +0800 Subject: [PATCH] =?UTF-8?q?feat():=20=E6=9B=B4=E6=94=B9=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/controller/CommentInfoController.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CommentInfoController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CommentInfoController.java index 9500949..7c8bbb6 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CommentInfoController.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CommentInfoController.java @@ -3,6 +3,7 @@ package com.muyu.product.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -108,4 +109,15 @@ public class CommentInfoController extends BaseController { public Result remove(@PathVariable List ids) { return toAjax(commentInfoService.removeBatchByIds(ids)); } + + /** + * 商品评论查询 + */ + @GetMapping("/commentId/{projectId}") + public Result commentInfoList(@PathVariable("projectId") Long id){ + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(CommentInfo::getParentId,id); + List list = commentInfoService.list(lambdaQueryWrapper); + return Result.success(list); + } }