sync(theme-4): 同步 main 最新 API/Admin 与玩家端逻辑
从 main 同步站内信手动发送、媒体库选择、列表子路由重构等 API/Admin 改动;玩家端仅合并 ADMIN_CUSTOM 富文本、消息预览与充值截图压缩逻辑,保留 theme-4 样式。
This commit is contained in:
@@ -263,4 +263,31 @@ export class SystemConfigService {
|
||||
}
|
||||
return this.getInboxNotifySettings();
|
||||
}
|
||||
|
||||
async getDepositScreenshotCleanupConfig(): Promise<{ enabled: boolean; keepDays: number }> {
|
||||
const enabled = await this.getBoolean('deposit.cleanup.enabled', false);
|
||||
const keepDays = await this.getInt('deposit.cleanup.keep_days', 180);
|
||||
return { enabled, keepDays };
|
||||
}
|
||||
|
||||
async updateDepositScreenshotCleanupConfig(data: { enabled?: boolean; keepDays?: number }) {
|
||||
if (data.enabled !== undefined) {
|
||||
await this.setBoolean(
|
||||
'deposit.cleanup.enabled',
|
||||
data.enabled,
|
||||
'是否开启定时清理充值截图',
|
||||
);
|
||||
}
|
||||
if (data.keepDays !== undefined) {
|
||||
if (!Number.isInteger(data.keepDays) || data.keepDays <= 0) {
|
||||
throw new Error('keepDays must be a positive integer');
|
||||
}
|
||||
await this.setInt(
|
||||
'deposit.cleanup.keep_days',
|
||||
data.keepDays,
|
||||
'充值截图保留天数',
|
||||
);
|
||||
}
|
||||
return this.getDepositScreenshotCleanupConfig();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user