- 重构config层为配置中心架构,支持动态配置管理 - 统一core层命名规范(event-bus→event, circuit-breaker→breaker, domain-sdk→sdk) - 修复数据库连接配置路径问题 - 实现配置中心完整功能:系统配置、动态配置、配置验证、统计 - 优化目录结构,为微服务架构做准备 - 修复TypeScript编译错误和依赖注入问题
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { Injectable } from '@nestjs/common';
|
|
import { InjectRepository } from '@nestjs/typeorm';
|
|
import { Repository } from 'typeorm';
|
|
import { Site } from './site.entity';
|
|
import { UpdateSiteSettingsDto } from './site-settings.dto';
|
|
|
|
|
|
// 不允许硬编码,从配置系统获取
|
|
// TODO: 配置系统重构中,此功能暂时不可用
|
|
|
|
@Injectable()
|
|
export class SiteSettingsService {
|
|
constructor(
|
|
@InjectRepository(Site)
|
|
private readonly siteRepository: Repository<Site>,
|
|
) {}
|
|
|
|
/**
|
|
* 获取站点设置
|
|
*/
|
|
getSiteSettings() {
|
|
// 配置系统重构中,此功能暂时不可用
|
|
throw new Error('配置系统重构中,站点设置功能暂时不可用');
|
|
}
|
|
|
|
/**
|
|
* 更新站点设置
|
|
*/
|
|
updateSiteSettings(updateSiteSettingsDto: UpdateSiteSettingsDto) {
|
|
// 配置系统重构中,此功能暂时不可用
|
|
throw new Error('配置系统重构中,站点设置更新功能暂时不可用');
|
|
}
|
|
|
|
/**
|
|
* 重置站点设置为默认值
|
|
*/
|
|
resetSiteSettings() {
|
|
// 配置系统重构中,此功能暂时不可用
|
|
throw new Error('配置系统重构中,站点设置重置功能暂时不可用');
|
|
}
|
|
}
|