feat: 支持后台配置备案信息

This commit is contained in:
Nixevol
2026-07-05 00:16:47 +08:00
parent b39db6ec01
commit c56ca91edd
10 changed files with 54 additions and 4 deletions
+1
View File
@@ -62,6 +62,7 @@ async function ensureSettings(): Promise<void> {
appName: process.env.APP_NAME || '艺术品溯源平台',
logRetentionDays: process.env.LOG_RETENTION_DAYS || '365',
watermarkText,
filingInfo: '备案信息待补充',
};
for (const [key, value] of Object.entries(defaults)) {
await prisma.systemSetting.upsert({ where: { key }, update: {}, create: { key, value } });
+1 -1
View File
@@ -22,7 +22,7 @@ export class SettingsController {
@ApiOperation({ summary: '获取公开设置(应用名等)' })
async getPublic() {
const all = await this.settingsService.getAll();
return { appName: all.appName, carouselInterval: all.carouselInterval };
return { appName: all.appName, carouselInterval: all.carouselInterval, filingInfo: all.filingInfo };
}
@ApiBearerAuth()
@@ -7,6 +7,7 @@ const EDITABLE_KEYS = [
'logRetentionDays',
'operationLogRetentionDays',
'watermarkText',
'filingInfo',
'carouselInterval',
'backupEnabled',
'backupSchedule',
@@ -28,6 +29,7 @@ export class SettingsService {
logRetentionDays: String(this.config.get<number>('logRetentionDays') || 365),
operationLogRetentionDays: '365',
watermarkText: this.config.get<string>('watermarkText') || '仅供溯源核验使用',
filingInfo: '备案信息待补充',
carouselInterval: '3',
backupEnabled: 'false',
backupSchedule: 'daily',