Merge branch 'master' into develop

This commit is contained in:
TinyAnts 2023-01-11 10:35:33 +08:00
commit 803a50cf3c
1 changed files with 4 additions and 1 deletions

View File

@ -91,10 +91,13 @@ public class ArticleServiceImpl implements IArticleService {
queryWrapper.eq("is_show", 1);
articleMapper.setSearch(queryWrapper, searchValidate, new String[]{
"=:cid:int",
"like:keyword@title:str"
});
if (StringUtils.isNotNull(searchValidate.getCid()) && searchValidate.getCid() > 0) {
queryWrapper.eq("cid", searchValidate.getCid());
}
if (StringUtils.isNotNull(searchValidate.getSort())) {
switch (searchValidate.getSort()) {
case "hot": // 最热