feat: 初始化 WWJ Cloud 企业级框架项目

- 后端:基于 NestJS 的分层架构设计
- 前端:基于 VbenAdmin + Element Plus 的管理系统
- 支持 SaaS + 独立版双架构模式
- 完整的用户权限管理系统
- 系统设置、文件上传、通知等核心功能
- 多租户支持和插件化扩展架构
This commit is contained in:
万物街
2025-08-23 13:20:01 +08:00
commit f30d64e6cc
172 changed files with 10179 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import { Body, Controller, Get, Put, UseGuards } from '@nestjs/common';
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { SmsSettingsService } from './sms-settings.service';
import { UpdateSmsSettingsDto, type SmsSettingsVo } from './sms-settings.dto';
import { JwtAuthGuard } from '../../auth/guards/jwt-auth.guard';
import { Roles } from '../../auth/roles.decorator';
import { RolesGuard } from '../../auth/guards/roles.guard';
@ApiTags('Settings/Sms')
@ApiBearerAuth()
@UseGuards(JwtAuthGuard, RolesGuard)
@Roles('super', 'admin')
@Controller('settings/sms')
export class SmsSettingsController {
constructor(private readonly service: SmsSettingsService) {}
@Get()
@ApiOperation({ summary: '获取短信设置' })
async get(): Promise<{ code: number; data: SmsSettingsVo }> {
const data = await this.service.getSettings();
return { code: 0, data };
}
@Put()
@ApiOperation({ summary: '更新短信设置' })
async update(@Body() dto: UpdateSmsSettingsDto): Promise<{ code: number; data: SmsSettingsVo }> {
const data = await this.service.updateSettings(dto);
return { code: 0, data };
}
}