From a345328a0c0544c843a9a2d9efd8de639d50cc0a Mon Sep 17 00:00:00 2001 From: JUNHAO Date: Thu, 22 Feb 2024 18:12:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84queryWrapper=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/dal/mysql/comment/ProductCommentMapper.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/comment/ProductCommentMapper.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/comment/ProductCommentMapper.java index ca04c507c..47421d315 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/comment/ProductCommentMapper.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/comment/ProductCommentMapper.java @@ -25,19 +25,18 @@ public interface ProductCommentMapper extends BaseMapperX { } static void appendTabQuery(LambdaQueryWrapperX queryWrapper, Integer type) { - LambdaQueryWrapperX queryWrapperX = new LambdaQueryWrapperX<>(); // 构建好评查询语句:好评计算 总评 >= 4 if (ObjectUtil.equal(type, AppCommentPageReqVO.GOOD_COMMENT)) { - queryWrapperX.ge(ProductCommentDO::getScores, 4); + queryWrapper.ge(ProductCommentDO::getScores, 4); } // 构建中评查询语句:中评计算 总评 >= 3 且 总评 < 4 if (ObjectUtil.equal(type, AppCommentPageReqVO.MEDIOCRE_COMMENT)) { - queryWrapperX.ge(ProductCommentDO::getScores, 3); - queryWrapperX.lt(ProductCommentDO::getScores, 4); + queryWrapper.ge(ProductCommentDO::getScores, 3); + queryWrapper.lt(ProductCommentDO::getScores, 4); } // 构建差评查询语句:差评计算 总评 < 3 if (ObjectUtil.equal(type, AppCommentPageReqVO.NEGATIVE_COMMENT)) { - queryWrapperX.lt(ProductCommentDO::getScores, 3); + queryWrapper.lt(ProductCommentDO::getScores, 3); } }