feat:实现管理员系统核心功能

- 添加管理员数据库管理控制器和服务
- 实现管理员操作日志记录系统
- 添加数据库异常处理过滤器
- 完善管理员权限验证和响应格式
- 添加全面的属性测试覆盖
This commit is contained in:
moyin
2026-01-08 23:05:34 +08:00
parent 0f37130832
commit 6924416bbd
34 changed files with 9481 additions and 199 deletions

View File

@@ -24,7 +24,7 @@ import { Test, TestingModule } from '@nestjs/testing';
import { Response } from 'express';
import { AdminController } from './admin.controller';
import { AdminService } from './admin.service';
import { AdminGuard } from './guards/admin.guard';
import { AdminGuard } from './admin.guard';
describe('AdminController', () => {
let controller: AdminController;
@@ -154,7 +154,7 @@ describe('AdminController', () => {
describe('resetPassword', () => {
it('should reset user password', async () => {
const resetDto = { new_password: 'NewPass1234' };
const resetDto = { newPassword: 'NewPass1234' };
const expectedResult = {
success: true,
message: '密码重置成功'