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); + } }