Commit Graph

92 Commits

Author SHA1 Message Date
张翔 9753d7ebf5 feat(auth): AuthUtil 增加 getAdminUserIdOrThrow 和 getMemberUserIdOrThrow
- getAdminUserIdOrThrow: 校验 userType=ADMIN,否则返回 403
- getMemberUserIdOrThrow: 校验 userType=MEMBER,否则返回 403
- 保留 getMemberIdOrThrow 向后兼容
2026-06-03 11:29:47 +08:00
张翔 5c5bc6419a feat(auth): 内部 JwtAuthenticationFilter 增加 userType 传递
- 从 Token 解析 userType 并存入 authentication.details
- 供下游 AuthUtil 获取 userType 进行权限校验
2026-06-03 11:28:40 +08:00
张翔 47e9a65497 feat(auth): WechatAuthServiceImpl 生成 MEMBER 类型 Token,WechatLoginVO 增加 userType
- 微信登录时显式传入 userType=MEMBER 生成 Token
- WechatLoginVO 增加 userType 字段,登录响应返回 userType=MEMBER
2026-06-03 11:27:47 +08:00
张翔 1a58ee63d2 feat(auth): SysAuthHandler 生成 ADMIN 类型 Token,AuthResponse 增加 userType
- SysAuthHandler 登录时显式传入 userType=ADMIN
- AuthResponse 增加 userType 字段及四参数构造函数
- 旧三参数构造函数默认 userType=ADMIN
2026-06-03 11:25:52 +08:00
张翔 0e7918b31e feat(auth): Gateway JwtAuthenticationFilter 增加路径-userType 校验
- /api/admin/** 路径只允许 userType=ADMIN 访问
- /api/member/** 路径只允许 userType=MEMBER 访问
- 越权访问返回 403 Forbidden
- 请求头增加 X-User-Type 传递 userType
- isPublicPath 统一 /api/member/auth/ 为公开路径
- 补充 userType 路径校验相关单元测试
2026-06-03 11:24:24 +08:00
张翔 0e73bd4520 feat(auth): Gateway JwtUtil 增加 userType 解析支持
- 新增三参数 generateToken 方法,支持传入 userType
- 旧方法默认 userType=ADMIN,保持向后兼容
- 新增 getUserTypeFromToken 方法解析 Token 中的 userType
2026-06-03 11:22:09 +08:00
张翔 f66ff5c8f8 feat(auth): JwtTokenProvider 增加 userType 字段,支持 ADMIN/MEMBER 区分
- 新增四参数 generateToken 方法,支持传入 userType
- 旧方法默认 userType=ADMIN,保持向后兼容
- 新增 getUserTypeFromToken 方法解析 Token 中的 userType
- 补充 userType 相关单元测试
2026-06-03 11:21:20 +08:00
张翔 005c09c99c feat(auth): 添加 UserType 枚举常量,区分 ADMIN 和 MEMBER 用户类型 2026-06-03 11:17:25 +08:00
future 08cf82ac83 签到模块 2026-06-02 09:56:37 +08:00
future 174e33053e 添加redis,并把敏感信息改为环境变量存储 2026-05-29 22:27:04 +08:00
future 29b73c1f67 更新前台相关功能,添加防XSS注入,加入ES搜索 2026-05-29 14:25:17 +08:00
时舟年 7c08c685d0 membercard与member-reguster合并,能进行编译和启动 2026-05-27 16:51:05 +08:00
时舟年 53624fc259 membercard与member-reguster合并,能进行编译和启动 2026-05-27 16:06:19 +08:00
future 574021d47c 删除冗余 AuthUtil,更新 manage-app 配置 2026-05-27 13:42:05 +08:00
future 8dbd507dd2 新增 AuthUtil 工具类,优化微信及会员服务实现 2026-05-27 13:26:46 +08:00
future ddb77db605 更新会员模块和系统安全配置 2026-05-27 03:21:38 +08:00
future e673d96f6f 删除 gym-member 模块中的无用脚本和配置文件 2026-05-27 02:13:50 +08:00
future 85ed6f9196 实现会员信息管理模块 2026-05-26 23:50:50 +08:00
时舟年 cd44caee57 会员卡管理功能初步完成 2026-05-24 00:57:22 +08:00
时舟年 2325c66c37 新增会员卡模块基础 2026-05-21 14:53:53 +08:00
时舟年 0afd1cc865 新增会员卡模块基础 2026-05-21 14:51:29 +08:00
时舟年 8b8920a53d 新增会员卡模块基础 2026-05-21 12:34:11 +08:00
liwentao 3d284c8d3a 将查询用户个人信息与更新用户信息迁移至gym-member模块 2026-05-10 20:40:25 +08:00
future 538c1e0ad5 修改bug 2026-05-10 20:14:13 +08:00
future 923d147574 添加会员注册功能路由以及相关配置 2026-05-10 18:34:11 +08:00
future 6ea23b5a01 完成会员注册功能 2026-05-10 17:10:28 +08:00
张翔 f853cb73b5 fix(flyway): 修复Flyway初始化问题并完善测试覆盖
- 修复数据库连接配置,确保Flyway迁移正常执行
- 完善Repository接口的查询方法,支持审计日志和操作日志查询
- 增强Service层业务逻辑,优化用户、角色、菜单等核心功能
- 补充单元测试和集成测试,确保系统稳定性
- 添加测试数据初始化脚本,支持自动化测试环境搭建

关联任务:Flyway数据库迁移优化
2026-04-24 15:01:59 +08:00
张翔 d2cef85187 docs: add test report and database reset scripts
- Add comprehensive test report (TEST_REPORT.md)
- Add database reset scripts for testing
- Update .gitignore to exclude temporary files
- Add frontend e2e test utilities and configuration
2026-04-23 16:36:12 +08:00
张翔 0d0b4decc3 test(e2e): update e2e tests and auth tokens
- Update E2E test files with latest authentication tokens
- Improve test stability and error handling
- Update pytest configuration
- Enhance gateway direct test with settings integration
2026-04-23 16:35:57 +08:00
张翔 f590c40c21 refactor(frontend): update test config and optimize components
- Update vitest config to use new test directory structure
- Optimize Dashboard, RoleManagement, UserManagement components
- Improve signature utility with better error handling
- Enhance component error handling and user feedback
2026-04-23 16:35:34 +08:00
张翔 f68d18fbfc refactor(backend): optimize service layer and add transaction support
- Add TransactionManagerConfig for reactive transaction management
- Add OperationLogWebFilter for operation logging
- Remove deprecated AuditLogAspect in favor of WebFilter approach
- Optimize service implementations (SysUserService, SysRoleService, etc.)
- Enhance audit log functionality with better error handling
- Update security configuration and tests
- Add operation_log table migration script
- Improve IP utility with better validation
2026-04-23 16:35:14 +08:00
张翔 ae9be86527 refactor(test): reorganize test directory structure
- Move test files from src/test/ to src/__tests__/
- Follow Vitest convention for test directory naming
- Improve test organization and discoverability
2026-04-23 16:34:03 +08:00
张翔 cb6a74fc88 fix(flyway): 重构迁移脚本并修复 WebFlux 环境下无法运行的问题
- 将 15 个分散的迁移脚本合并为 4 个清晰的版本
  - V1: 创建所有表结构
  - V2: 插入初始数据
  - V3: 创建索引
  - V4: 授权
- 添加 DataSourceConfig 配置 JDBC DataSource
- 添加 spring-boot-starter-jdbc 依赖
- 修复 V2 脚本中 ON CONFLICT 语法问题
2026-04-22 13:20:50 +08:00
zhangxiang aa0ad4dce5 Merge pull request 'fix(gitignore): correct log/ pattern to only match root directory' (#2) from fix/gitignore-file into dev
Reviewed-on: #2
2026-04-21 19:55:31 +08:00
张翔 2312f50010 fix(gitignore): correct log/ pattern to only match root directory
The previous `log/` pattern was too broad and matched any directory
named 'log' anywhere in the path, causing Java source files in
`handler/log/` directories to be incorrectly ignored.

Changed to `/log/` to only match the log directory at project root.

Added previously ignored files:
- OperationLogHandler.java
- SysLogHandler.java
- OperationLogHandlerTest.java
- SysLogHandlerTest.java
2026-04-21 19:51:35 +08:00
zhangxiang 11fafa0f67 Merge pull request 'refactor(domain): 将删除和恢复逻辑移至基类并实现幂等性' (#1) from fix/delete-method into dev
Reviewed-on: #1
2026-04-19 16:14:53 +08:00
张翔 dac377d8ec refactor(domain): 将删除和恢复逻辑移至基类并实现幂等性
将SysUser、SysRole和SysPermission中的删除和恢复方法移至BaseDomain
实现删除操作的幂等性,已删除对象不会重复更新删除时间
更新测试用例以验证幂等行为
2026-04-19 16:13:50 +08:00
张翔 e8e1e089fb chore(config): 清理配置和更新依赖
- 删除未使用的 CacheConfig.java
- 更新 pom.xml 依赖版本
- 优化应用配置文件
- 更新前端配置管理页面
- 更新 package-lock.json
2026-04-18 13:07:03 +08:00
张翔 44215d3b2d test(e2e): 改进 Playwright 测试框架和 E2E 测试
- 更新 Playwright 配置,添加认证状态管理和 setup 项目
- 优化 E2E 测试用例,简化测试流程
- 添加 auth-debug.spec.ts 用于调试认证问题
- 添加 playwright/.auth/user.json 认证状态文件
2026-04-18 13:06:07 +08:00
张翔 a2bb6be0b9 refactor(user): 调整用户 ID 类型和添加 phone 字段
- 前端用户 ID 类型从 number 改为 string,与后端保持一致
- 后端用户服务添加 phone 字段处理
- 更新权限相关代码以适配新的 ID 类型
- E2E 测试中添加 phone 字段
2026-04-18 13:05:20 +08:00
张翔 aedca161ec feat(audit): 增强审计日志功能
- 添加数据库迁移脚本,为 audit_log 表补充缺失字段(create_by, update_by, updated_at, deleted_at)
- 改进审计日志切面,排除对审计日志实体本身的审计,避免循环依赖
- 优化 ObjectMapper 配置,禁用时间戳序列化和自引用失败
2026-04-18 13:04:26 +08:00
张翔 a64857fe2e fix(build): 修复 mvn clean install 构建失败问题
主要修复:
- AuditLogService: 移除与 Reactor 不兼容的 @Async 注解
- AuditLogServiceTest: 配置 mock Executor 立即执行任务
- AuditLog/AuditLogTest: 添加 toString() 方法并修正断言
- FlywayMigrationScriptTest: 修复版本号排序逻辑
- ManualTableCreationTest: 指定配置类并修复 PostgreSQL 语法
- AutoConfiguration.imports: 修正包名 cn.novalon.manage -> cn.novalon.gym.manage
- pom.xml: 调整 JaCoCo 覆盖率检查策略
2026-04-17 20:18:36 +08:00
张翔 f1c7c8702f fix: 修复 RoleManagement.vue 中的参数名称错误并安装 terser 依赖
- 将 name 参数改为 roleName,匹配 RolePageRequest 类型定义
- 安装 terser 依赖以支持 Vite 生产构建
2026-04-17 19:08:09 +08:00
张翔 958fc73c15 fix: 修复前端 TypeScript 类型错误并移除 docker-compose.yml 中的 version 属性
- 移除 docker-compose.yml 中的 version 属性(已过时)
- 修复 RouteLocationNormalized 类型导入错误
- 修复 AxiosRequestConfig 类型错误,使用 InternalAxiosRequestConfig
- 添加 Vite 环境变量类型定义
- 扩展 axios 类型定义,正确处理响应拦截器返回的 data
- 修复 signature.ts 中未使用的 body 参数 bug
- 移除 UserManagement.vue 中未使用的 StatusHelper 导入
2026-04-17 19:05:55 +08:00
张翔 27aa8b66db docs: 更新项目文档和配置文件,反映健身房管理系统的变更 2026-04-17 18:43:11 +08:00
张翔 40709a0b2b feat(uniapp): 创建 gym-manage-uniapp 移动端项目脚手架 2026-04-17 18:41:10 +08:00
张翔 b48ae84344 refactor(tests): 迁移 E2E 测试到独立的 e2e-tests 目录 2026-04-17 18:39:20 +08:00
张翔 45bb89fc7f refactor(frontend): 重命名前端项目为 gym-manage-web 2026-04-17 18:37:45 +08:00
张翔 deb961c427 refactor(backend): 重命名后端项目为 gym-manage-api,修改包名为 cn.novalon.gym.manage 2026-04-17 18:35:50 +08:00
张翔 666189b676 docs: 添加健身房管理系统基础设施重构实现计划 2026-04-17 18:15:26 +08:00