micro-bundle/internal/logic
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
..
bundleExtendLogic.go Update:增加查询指定用户未过期的订单列表 2026-06-08 19:17:52 +08:00
bundleLogic.go 订单新增先用后付 2026-06-08 17:08:04 +08:00
bundleMetricsLogic.go Updata:增加导出发布作品数据临时接口 2026-01-30 11:39:18 +08:00
contract.go fix:最近更新时间精度精确到分钟 2026-02-02 14:09:24 +08:00
customer.go fix:最近更新时间精度精确到分钟 2026-02-02 14:09:24 +08:00
invoiceLogic.go Updata:增加字段赋值 2026-02-10 14:44:46 +08:00
orderGateLogic.go 订单新增先用后付 2026-06-08 17:08:04 +08:00
orderRecordsLogic.go 订单新增先用后付 2026-06-08 17:08:04 +08:00
questionnaire_survey.go Updata:更新数据结构 2026-03-11 19:50:06 +08:00
taskLogic_test.go test: 为 taskDao 与 taskLogic 添加单元测试 2026-06-10 15:21:03 +08:00
taskLogic.go Update:任务管理台统计接入先用后付维度 2026-06-09 10:28:51 +08:00
valueAddBundleLogic.go Merge branch 'feat-hjj-packageManage#A116' 2025-10-27 20:21:00 +08:00