mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-22 18:29:51 +08:00
新增系统配置api接口
This commit is contained in:
@@ -20,4 +20,6 @@ public interface AppConfigService extends IService<AppConfig> {
|
||||
|
||||
void saveFromMap(HashMap<String, String> data);
|
||||
|
||||
Map<String, String> keyValues();
|
||||
|
||||
}
|
||||
|
||||
@@ -57,6 +57,11 @@ public class AppConfigServiceImpl extends ServiceImpl<AppConfigMapper, AppConfig
|
||||
updateBatchById(list);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> keyValues() {
|
||||
return list(query().getWrapper().eq("is_hidden", 0)).stream().collect(Collectors.toMap(AppConfig::getKeyName, AppConfig::getKeyValue));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user