Go to file
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
.idea 修改 2025-05-09 16:09:44 +08:00
build 初始化版本 2025-02-20 20:40:39 +08:00
cmd 订单新增先用后付 2026-06-08 17:08:04 +08:00
conf 解决冲突 2025-10-27 13:09:08 +08:00
config feat: 新增任务台功能 2025-09-03 15:51:35 +08:00
deploy/k8s/test 初始化版本 2025-02-20 20:40:39 +08:00
internal test: 为 taskDao 与 taskLogic 添加单元测试 2026-06-10 15:21:03 +08:00
pb 更新pb 2026-06-09 12:28:21 +08:00
pkg Update:任务管理台统计接入先用后付维度 2026-06-09 10:28:51 +08:00
.gitignore 单价模式新加总价字段 2025-09-11 14:47:07 +08:00
clear.sh 更新 2025-08-27 10:23:22 +08:00
DockerfileProd 修改 2025-02-24 22:33:18 +08:00
DockerfileSlim 更新 DockerfileSlim 2025-02-24 14:54:43 +00:00
DockerfileTest 修改 2025-02-22 11:52:42 +08:00
go.mod test: 为 taskDao 与 taskLogic 添加单元测试 2026-06-10 15:21:03 +08:00
go.sum test: 为 taskDao 与 taskLogic 添加单元测试 2026-06-10 15:21:03 +08:00
makefile 附加值代码上传 2025-03-28 09:23:17 +08:00
protocBundle.bat feat:增加额度对应需求字段 2025-09-03 11:33:05 +08:00
README.md 初始化版本 2025-02-20 20:40:39 +08:00

protot文件编译指令

protoc --proto_path=. --proto_path=D:/go_workspace/src  --go_out=./pb --govalidators_out=./pb --go-triple_out=./pb ./pb/bundle.proto

protoc --proto_path=. --go-grpc_out=./pb --proto_path=D:/go_workspace/src  --go_out=./pb --govalidators_out=./pb --go-triple_out=./pb ./pb/bundle.proto