7 Commits

Author SHA1 Message Date
WuYuuuub
4024f9eae0 删除了ai识别验证码部分,新增个人成绩补考标识和cet成绩查询
Some checks failed
Build / build (push) Failing after 2m13s
2026-06-17 14:48:27 +08:00
lafay
ab37aeb2fc refactor: introduce service layer and migrate gRPC handlers to use it
All checks were successful
Build / build (push) Successful in 2m17s
Extract business logic from gRPC handlers into a dedicated service package.
Add context support throughout for cancellation and timeouts. Move models to
their own package, remove hardcoded credentials from config, and simplify
parsers to only handle HTML parsing.
2026-06-16 18:33:13 +08:00
WuYuuuub
1cd0c655f8 查询空教室功能测试通过
All checks were successful
Build / build (push) Successful in 1m46s
2026-06-12 20:52:18 +08:00
lan
accc6567f2 refactor(grpc): restructure task handling and migrate to slog
All checks were successful
Build / build (push) Successful in 5m28s
Refactor the gRPC client and task handling logic to improve modularity,
error handling, and observability.

- Split `grpc/handler.go` into specialized handler files (login,
  classroom, exams, grades, schedule) to reduce complexity.
- Replace standard `log` with `log/slog` throughout the project for
  structured logging.
- Refactor `grpc/client.go` to use a thread-safe connection management
  pattern with `sync.RWMutex`.
- Remove the legacy `service` package and HTTP server implementation,
  transitioning the application to a pure gRPC runner mode.
- Clean up `config` and `pkg/errors` to remove unused utilities and
  simplify the API.
- Improve error reporting in parsers and HTTP clients by checking
  response status codes.
2026-06-09 23:08:03 +08:00
lafay
74438c1f7f refactor: 重构代码架构并使用 Modern Go 特性
- 重命名模块 jwts -> schedule_converter
- 新增 service 包,统一业务逻辑层
- 新增 pkg/logger 包,使用 slog 结构化日志
- 新增 pkg/errors 包,统一错误处理
- 拆分 captcha 包,图片识别移至 service/recognizer
- 清理 models 包,只保留数据结构定义
- 消除 grpc/handler.go 中的重复代码
- 简化 main.go,使用 slog 和 context
- 配置支持单例模式和结构化配置
- 使用 any 替代 interface{}
- 使用 sync.Map 替代 map + RWMutex
2026-03-16 13:40:53 +08:00
lafay
ed1d252fab 重构: 将API配置提取到config模块并优化错误处理
- 将硬编码的API配置移到config模块,支持环境变量配置
- 添加API Key验证和配置检查
- 添加图片上传大小限制(10MB)
- 移除不必要的注释,简化代码
- 改进错误处理和日志记录
2026-03-16 13:02:57 +08:00
lan
17cdb7ad0d Initial commit 2026-03-13 20:43:44 +08:00