Commit Graph

12 Commits

Author SHA1 Message Date
chiguyong efdc4b71f6 fix: add SPACE_004 error code and missing DTO fields 2026-03-24 00:06:55 +08:00
chiguyong aa3f6c4ced feat: add equipment extension fields to SpaceNode entity 2026-03-23 23:53:55 +08:00
chiguyong 527b9247e8 test: 添加RoleServiceTest和PermissionServiceTest
按照TDD开发规范编写:
- RoleServiceTest: 11个测试用例
- PermissionServiceTest: 12个测试用例
- 覆盖CRUD操作和异常场景
2026-03-22 03:00:31 +08:00
chiguyong 6495e93e06 feat: RBAC权限管理后端实现
- SecurityConfig: 添加CORS配置,支持多端口(5173-5180)
- User/Permission/Role实体: 完善权限相关实体
- JwtTokenProvider: token生成和验证
- LoginService: 登录逻辑
- UserController: 用户管理接口
- application.yml: 后端配置
2026-03-22 01:33:21 +08:00
chiguyong 162658daed fix: 密码修改接口改为@RequestBody
- UserController.updatePassword 改用PasswordRequest对象
- 符合安全规范:敏感数据使用POST body
2026-03-17 23:51:16 +08:00
chiguyong e6eac0fc56 fix: 统一所有Controller响应格式为ApiResponse
- PermissionController
- RoleController
- UserController
- ProjectController
- SpaceNodeController
2026-03-17 23:45:16 +08:00
chiguyong d12edef2ce test(auth): 添加单元测试
- PasswordServiceTest: 5个测试
- UserServiceTest: 8个测试
- 添加测试依赖: spring-boot-starter-test, h2
2026-03-17 23:30:41 +08:00
chiguyong f022d298e6 fix: 统一使用BusinessException替换RuntimeException
- RoleService 改用 BusinessException
- PermissionService 改用 BusinessException
- ProjectService 改用 BusinessException
- SpaceNodeService 改用 BusinessException
- LoginService 添加 @Transactional
- 扩展错误码:PERMISSION_002, SPACE_001, SPACE_002
2026-03-17 22:58:16 +08:00
chiguyong 53381e2670 refactor(auth): 统一异常处理和API响应规范
- 添加统一响应类 ApiResponse
- 添加错误码枚举 ErrorCode
- 添加业务异常类 BusinessException
- 添加全局异常处理器 GlobalExceptionHandler
- 登录接口改为POST body
- 统一登录错误信息,避免用户枚举
- 更新开发规范文档
2026-03-17 22:48:44 +08:00
chiguyong 2f8ac15434 refactor(auth): 密码策略和登录限制改为配置化
- PasswordService 支持配置化
- LoginAttemptService 支持配置化
- 配置文件添加password和login配置项
2026-03-17 22:38:56 +08:00
chiguyong 20bed35f64 feat(auth+mdm): 迭代1-认证授权和主数据管理基础功能
- auth模块: User/Role/Permission实体和CRUD
- auth模块: JWT登录认证
- auth模块: Spring Security配置
- mdm模块: Project项目管理
- mdm模块: SpaceNode空间节点管理
- 数据库初始化SQL脚本
2026-03-17 22:15:46 +08:00
chiguyong 9aba3f1901 initial: ether-pms project skeleton 2026-03-17 21:44:46 +08:00