新增系统配置api接口

This commit is contained in:
none
2023-03-09 16:34:32 +08:00
parent c85467f62f
commit aabd41ce01
6 changed files with 37 additions and 10 deletions

View File

@@ -20,4 +20,6 @@ public interface AppConfigService extends IService<AppConfig> {
void saveFromMap(HashMap<String, String> data);
Map<String, String> keyValues();
}

View File

@@ -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));
}
}