commit
74a669f6aa
|
@ -25,19 +25,18 @@ public interface ProductCommentMapper extends BaseMapperX<ProductCommentDO> {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void appendTabQuery(LambdaQueryWrapperX<ProductCommentDO> queryWrapper, Integer type) {
|
static void appendTabQuery(LambdaQueryWrapperX<ProductCommentDO> queryWrapper, Integer type) {
|
||||||
LambdaQueryWrapperX<ProductCommentDO> queryWrapperX = new LambdaQueryWrapperX<>();
|
|
||||||
// 构建好评查询语句:好评计算 总评 >= 4
|
// 构建好评查询语句:好评计算 总评 >= 4
|
||||||
if (ObjectUtil.equal(type, AppCommentPageReqVO.GOOD_COMMENT)) {
|
if (ObjectUtil.equal(type, AppCommentPageReqVO.GOOD_COMMENT)) {
|
||||||
queryWrapperX.ge(ProductCommentDO::getScores, 4);
|
queryWrapper.ge(ProductCommentDO::getScores, 4);
|
||||||
}
|
}
|
||||||
// 构建中评查询语句:中评计算 总评 >= 3 且 总评 < 4
|
// 构建中评查询语句:中评计算 总评 >= 3 且 总评 < 4
|
||||||
if (ObjectUtil.equal(type, AppCommentPageReqVO.MEDIOCRE_COMMENT)) {
|
if (ObjectUtil.equal(type, AppCommentPageReqVO.MEDIOCRE_COMMENT)) {
|
||||||
queryWrapperX.ge(ProductCommentDO::getScores, 3);
|
queryWrapper.ge(ProductCommentDO::getScores, 3);
|
||||||
queryWrapperX.lt(ProductCommentDO::getScores, 4);
|
queryWrapper.lt(ProductCommentDO::getScores, 4);
|
||||||
}
|
}
|
||||||
// 构建差评查询语句:差评计算 总评 < 3
|
// 构建差评查询语句:差评计算 总评 < 3
|
||||||
if (ObjectUtil.equal(type, AppCommentPageReqVO.NEGATIVE_COMMENT)) {
|
if (ObjectUtil.equal(type, AppCommentPageReqVO.NEGATIVE_COMMENT)) {
|
||||||
queryWrapperX.lt(ProductCommentDO::getScores, 3);
|
queryWrapper.lt(ProductCommentDO::getScores, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue