|
@@ -27,15 +27,15 @@ public class BaseServiceImpl implements BaseService {
|
|
* 获取搜索热门关键字
|
|
* 获取搜索热门关键字
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public JsonModel getSearchHotWord() {
|
|
|
|
|
|
+ public List<String> getSearchHotWord() {
|
|
List<String> hotSearch = baseDao.getSearchKeyword();
|
|
List<String> hotSearch = baseDao.getSearchKeyword();
|
|
if (!CollectionUtils.isEmpty(hotSearch) && hotSearch.size() > 8) {
|
|
if (!CollectionUtils.isEmpty(hotSearch) && hotSearch.size() > 8) {
|
|
List<String> newList = hotSearch.stream()
|
|
List<String> newList = hotSearch.stream()
|
|
.filter(str -> !StringUtils.isEmpty(str)).limit(8)
|
|
.filter(str -> !StringUtils.isEmpty(str)).limit(8)
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
- return JsonModel.newInstance().success(newList);
|
|
|
|
|
|
+ return newList;
|
|
} else {
|
|
} else {
|
|
- return JsonModel.newInstance().success(hotSearch);
|
|
|
|
|
|
+ return hotSearch;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -43,12 +43,12 @@ public class BaseServiceImpl implements BaseService {
|
|
* 获取头部菜单
|
|
* 获取头部菜单
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public JsonModel getNavMenu() {
|
|
|
|
|
|
+ public List<TopMenuVo> getNavMenu() {
|
|
List<TopMenuVo> menuList = baseDao.getTopMenus();
|
|
List<TopMenuVo> menuList = baseDao.getTopMenus();
|
|
menuList.forEach(item -> {
|
|
menuList.forEach(item -> {
|
|
List<SubMenuVo> subList = baseDao.getSubMenus(item.getId());
|
|
List<SubMenuVo> subList = baseDao.getSubMenus(item.getId());
|
|
item.setSubMenus(subList);
|
|
item.setSubMenus(subList);
|
|
});
|
|
});
|
|
- return JsonModel.newInstance().success(menuList);
|
|
|
|
|
|
+ return menuList;
|
|
}
|
|
}
|
|
}
|
|
}
|