|
@@ -93,7 +93,8 @@ public class ArticleService {
|
|
|
wrapper.eq(Article::getCategoryId, categoryId);
|
|
wrapper.eq(Article::getCategoryId, categoryId);
|
|
|
}
|
|
}
|
|
|
if (keyword != null && !keyword.trim().isEmpty()) {
|
|
if (keyword != null && !keyword.trim().isEmpty()) {
|
|
|
- wrapper.like(Article::getTitle, keyword.trim());
|
|
|
|
|
|
|
+ String kw = keyword.trim();
|
|
|
|
|
+ wrapper.and(w -> w.like(Article::getTitle, kw).or().like(Article::getSummary, kw).or().like(Article::getTags, kw));
|
|
|
}
|
|
}
|
|
|
if (dimensionCode != null && !dimensionCode.trim().isEmpty()) {
|
|
if (dimensionCode != null && !dimensionCode.trim().isEmpty()) {
|
|
|
String dim = dimensionCode.trim();
|
|
String dim = dimensionCode.trim();
|
|
@@ -395,7 +396,8 @@ public class ArticleService {
|
|
|
wrapper.eq(Article::getCategoryId, categoryId);
|
|
wrapper.eq(Article::getCategoryId, categoryId);
|
|
|
}
|
|
}
|
|
|
if (keyword != null && !keyword.trim().isEmpty()) {
|
|
if (keyword != null && !keyword.trim().isEmpty()) {
|
|
|
- wrapper.like(Article::getTitle, keyword.trim());
|
|
|
|
|
|
|
+ String kw = keyword.trim();
|
|
|
|
|
+ wrapper.and(w -> w.like(Article::getTitle, kw).or().like(Article::getSummary, kw).or().like(Article::getTags, kw));
|
|
|
}
|
|
}
|
|
|
if (contentType != null && !contentType.isEmpty()) {
|
|
if (contentType != null && !contentType.isEmpty()) {
|
|
|
wrapper.eq(Article::getContentType, contentType);
|
|
wrapper.eq(Article::getContentType, contentType);
|