use of com.zyd.blog.persistence.beans.SysConfig in project OneBlog by zhangyd-c.
the class CustomTags method searchOptions.
/**
* web 端 “热门搜索” 中的待选项
*
* @param params
* @return
*/
public Object searchOptions(Map params) {
List<String> list = new ArrayList<>(Arrays.asList("Java", "SpringBoot"));
SysConfig sysConfig = configService.getByKey(ConfigKeyEnum.SEARCH_OPTIONS.getKey());
if (null != sysConfig) {
String value = sysConfig.getConfigValue();
if (!StringUtils.isEmpty(value)) {
if (value.contains(",")) {
list = Arrays.asList(value.split(","));
} else {
list = Collections.singletonList(value);
}
}
}
return list;
}
Aggregations