|
@@ -172,14 +172,19 @@ public class CommonRatingServiceImpl extends ServiceImpl<CommonRatingMapper, Com
|
|
|
wrapper.ge(CommonRating::getScore, 4.5);
|
|
wrapper.ge(CommonRating::getScore, 4.5);
|
|
|
}else if(searchScore == 2){
|
|
}else if(searchScore == 2){
|
|
|
// 2-中评
|
|
// 2-中评
|
|
|
- wrapper.ge(CommonRating::getScore, 3.5);
|
|
|
|
|
- wrapper.lt(CommonRating::getScore, 4.5);
|
|
|
|
|
|
|
+ wrapper.ge(CommonRating::getScore, 3.0);
|
|
|
|
|
+ wrapper.le(CommonRating::getScore, 4.0);
|
|
|
}else if(searchScore == 3){
|
|
}else if(searchScore == 3){
|
|
|
// 3-差评
|
|
// 3-差评
|
|
|
- wrapper.lt(CommonRating::getScore, 3.5);
|
|
|
|
|
|
|
+ wrapper.ge(CommonRating::getScore, 0.5);
|
|
|
|
|
+ wrapper.le(CommonRating::getScore, 2.5);
|
|
|
}else if(searchScore == 4){
|
|
}else if(searchScore == 4){
|
|
|
// 4-有图
|
|
// 4-有图
|
|
|
wrapper.isNotNull(CommonRating::getImageUrls);
|
|
wrapper.isNotNull(CommonRating::getImageUrls);
|
|
|
|
|
+ // 2. 排除 空字符串 ""
|
|
|
|
|
+ wrapper.ne(CommonRating::getImageUrls, "");
|
|
|
|
|
+ // 3. 排除 纯空格字符串(如" ")—— 用 TRIM 函数去掉首尾空格后判断非空
|
|
|
|
|
+ wrapper.apply("TRIM({0}) <> ''", "image_urls");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|