Commit e01e5c71 by rongkailun

【修改】专业术语首字母检索

parent d778d6f6
......@@ -2,6 +2,7 @@ package io.office.modules.manage.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qiniu.util.StringUtils;
import io.office.common.utils.R;
import io.office.modules.manage.entity.*;
import io.office.modules.manage.entity.dto.NewsParams;
......@@ -10,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -216,6 +218,9 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
public List<GlossaryEntity> glossaryList(NewsParams newsParams) {
List<GlossaryEntity> list = this.newsDao.glossaryList(newsParams);
if(StringUtils.isNullOrEmpty(newsParams.getType())){
list = list.stream().filter(item->item.getTitleEn().substring(0,1).equals(newsParams.getTitle())).collect(Collectors.toList());
}
return list;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment