controller调整, 增加计划类型

This commit is contained in:
2025-10-29 16:25:39 +08:00
parent 94e8768424
commit 1ee3e638f7
6 changed files with 149 additions and 64 deletions

View File

@@ -17,6 +17,7 @@ func NewPlanToResponse(plan *models.Plan) (*PlanResponse, error) {
ID: plan.ID,
Name: plan.Name,
Description: plan.Description,
PlanType: plan.PlanType,
ExecutionType: plan.ExecutionType,
Status: plan.Status,
ExecuteNum: plan.ExecuteNum,
@@ -64,7 +65,7 @@ func NewPlanFromCreateRequest(req *CreatePlanRequest) (*models.Plan, error) {
ExecutionType: req.ExecutionType,
ExecuteNum: req.ExecuteNum,
CronExpression: req.CronExpression,
// ContentType 在控制器中设置,此处不再处理
// ContentType 和 PlanType 在控制器中设置,此处不再处理
}
// 处理子计划 (通过ID引用)
@@ -116,7 +117,7 @@ func NewPlanFromUpdateRequest(req *UpdatePlanRequest) (*models.Plan, error) {
ExecutionType: req.ExecutionType,
ExecuteNum: req.ExecuteNum,
CronExpression: req.CronExpression,
// ContentType 在控制器中设置,此处不再处理
// ContentType 和 PlanType 在控制器中设置,此处不再处理
}
// 处理子计划 (通过ID引用)