Commit Graph

10 Commits

Author SHA1 Message Date
cjy
590f0dedd6 test: 为 taskDao 与 taskLogic 添加单元测试
新增 internal/testutil/db.go,基于 DATA-DOG/go-sqlmock 提供
SetupTaskBenchDB 帮助函数,把 mock 出来的 *gorm.DB 挂到
app.ModuleClients.TaskBenchDB 上,方便 dao / logic 层单测。
SQL 匹配使用 QueryMatcherRegexp,避免对 gorm 生成的 SQL 字面量
(字段顺序、占位符数量等)过度耦合。

- internal/dao/taskDao_test.go:覆盖 GetPendingTaskLayout 等
  DAO 方法的 SQL 行为与错误分支。
- internal/logic/taskLogic_test.go:覆盖 CreateTaskWorkLog
  的入参范围校验分支。

go.mod / go.sum:
- 新增直接依赖 github.com/DATA-DOG/go-sqlmock v1.5.2、
  github.com/stretchr/testify v1.11.1;
- 调整 google/uuid、robfig/cron/v3、satori/go.uuid 为直接依赖。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 15:21:03 +08:00
81e5d2f440 Update go.mod 2025-08-27 10:42:24 +08:00
lzh
7fbb5e59b7 添加可用时间扩展支持 2025-06-14 11:28:54 +08:00
lzh
26bbfc173f Merge branch 'dev-lzh' into dev 2025-06-13 14:20:54 +08:00
lzh
3b3efcb534 添加余量管理接口 2025-06-12 17:51:24 +08:00
sxy
6c57bb8e02 修改节省金额 2025-06-12 10:19:30 +08:00
sxy
21f3dac99a "套餐修改" 2025-06-10 14:03:17 +08:00
songchuang
d8b2ec5174 附加值代码上传 2025-03-28 09:23:17 +08:00
jhc
a4dba8084f 初步完成 2025-02-21 21:09:54 +08:00
jhc
1bedc6546b 初始化版本 2025-02-20 20:40:39 +08:00