修复createPlan逻辑错误

This commit is contained in:
2025-09-14 14:45:56 +08:00
parent 67707c0d41
commit 352c9d9246
2 changed files with 3 additions and 3 deletions

View File

@@ -1134,7 +1134,7 @@ func TestPlanRepository_Create(t *testing.T) {
Name: "父计划",
ContentType: models.PlanContentTypeSubPlans,
SubPlans: []models.SubPlan{
{ChildPlanID: 1, ExecutionOrder: 1, ChildPlan: &models.Plan{Model: gorm.Model{ID: 1}}}, // 关联已存在的子计划1
{ChildPlanID: 1, ExecutionOrder: 1}, // 关联已存在的子计划1
{ChildPlanID: 2, ExecutionOrder: 2, ChildPlan: &models.Plan{Model: gorm.Model{ID: 2}}}, // 关联已存在的子计划2
},
},