改变量名
This commit is contained in:
@@ -185,10 +185,10 @@ func (c *Controller) GetPlan(ctx *gin.Context) {
|
|||||||
// @Success 200 {object} controller.Response{data=plan.ListPlansResponse} "业务码为200代表成功获取列表"
|
// @Success 200 {object} controller.Response{data=plan.ListPlansResponse} "业务码为200代表成功获取列表"
|
||||||
// @Failure 200 {object} controller.Response "业务失败,具体错误码和信息见响应体(例如400, 500)"
|
// @Failure 200 {object} controller.Response "业务失败,具体错误码和信息见响应体(例如400, 500)"
|
||||||
// @Router /plans [get]
|
// @Router /plans [get]
|
||||||
func (pc *Controller) ListPlans(c *gin.Context) {
|
func (c *Controller) ListPlans(ctx *gin.Context) {
|
||||||
// 占位符:此处应调用服务层或仓库层来获取计划列表
|
// 占位符:此处应调用服务层或仓库层来获取计划列表
|
||||||
pc.logger.Infof("收到获取计划列表请求 (占位符)")
|
c.logger.Infof("收到获取计划列表请求 (占位符)")
|
||||||
controller.SendResponse(c, controller.CodeSuccess, "获取计划列表接口占位符", ListPlansResponse{Plans: []PlanResponse{}, Total: 0})
|
controller.SendResponse(ctx, controller.CodeSuccess, "获取计划列表接口占位符", ListPlansResponse{Plans: []PlanResponse{}, Total: 0})
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdatePlan godoc
|
// UpdatePlan godoc
|
||||||
@@ -202,10 +202,10 @@ func (pc *Controller) ListPlans(c *gin.Context) {
|
|||||||
// @Success 200 {object} controller.Response{data=plan.PlanResponse} "业务码为200代表更新成功"
|
// @Success 200 {object} controller.Response{data=plan.PlanResponse} "业务码为200代表更新成功"
|
||||||
// @Failure 200 {object} controller.Response "业务失败,具体错误码和信息见响应体(例如400, 404, 500)"
|
// @Failure 200 {object} controller.Response "业务失败,具体错误码和信息见响应体(例如400, 404, 500)"
|
||||||
// @Router /plans/{id} [put]
|
// @Router /plans/{id} [put]
|
||||||
func (pc *Controller) UpdatePlan(c *gin.Context) {
|
func (c *Controller) UpdatePlan(ctx *gin.Context) {
|
||||||
// 占位符:此处应调用服务层或仓库层来更新计划
|
// 占位符:此处应调用服务层或仓库层来更新计划
|
||||||
pc.logger.Infof("收到更新计划请求 (占位符)")
|
c.logger.Infof("收到更新计划请求 (占位符)")
|
||||||
controller.SendResponse(c, controller.CodeSuccess, "更新计划接口占位符", PlanResponse{ID: 0, Name: "占位计划"})
|
controller.SendResponse(ctx, controller.CodeSuccess, "更新计划接口占位符", PlanResponse{ID: 0, Name: "占位计划"})
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeletePlan godoc
|
// DeletePlan godoc
|
||||||
@@ -217,10 +217,10 @@ func (pc *Controller) UpdatePlan(c *gin.Context) {
|
|||||||
// @Success 200 {object} controller.Response "业务码为200代表删除成功"
|
// @Success 200 {object} controller.Response "业务码为200代表删除成功"
|
||||||
// @Failure 200 {object} controller.Response "业务失败,具体错误码和信息见响应体(例如400, 404, 500)"
|
// @Failure 200 {object} controller.Response "业务失败,具体错误码和信息见响应体(例如400, 404, 500)"
|
||||||
// @Router /plans/{id} [delete]
|
// @Router /plans/{id} [delete]
|
||||||
func (pc *Controller) DeletePlan(c *gin.Context) {
|
func (c *Controller) DeletePlan(ctx *gin.Context) {
|
||||||
// 占位符:此处应调用服务层或仓库层来删除计划
|
// 占位符:此处应调用服务层或仓库层来删除计划
|
||||||
pc.logger.Infof("收到删除计划请求 (占位符)")
|
c.logger.Infof("收到删除计划请求 (占位符)")
|
||||||
controller.SendResponse(c, controller.CodeSuccess, "删除计划接口占位符", nil)
|
controller.SendResponse(ctx, controller.CodeSuccess, "删除计划接口占位符", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// StartPlan godoc
|
// StartPlan godoc
|
||||||
@@ -232,10 +232,10 @@ func (pc *Controller) DeletePlan(c *gin.Context) {
|
|||||||
// @Success 200 {object} controller.Response "业务码为200代表成功启动计划"
|
// @Success 200 {object} controller.Response "业务码为200代表成功启动计划"
|
||||||
// @Failure 200 {object} controller.Response "业务失败,具体错误码和信息见响应体(例如400, 404, 500)"
|
// @Failure 200 {object} controller.Response "业务失败,具体错误码和信息见响应体(例如400, 404, 500)"
|
||||||
// @Router /plans/{id}/start [post]
|
// @Router /plans/{id}/start [post]
|
||||||
func (pc *Controller) StartPlan(c *gin.Context) {
|
func (c *Controller) StartPlan(ctx *gin.Context) {
|
||||||
// 占位符:此处应调用服务层或仓库层来启动计划
|
// 占位符:此处应调用服务层或仓库层来启动计划
|
||||||
pc.logger.Infof("收到启动计划请求 (占位符)")
|
c.logger.Infof("收到启动计划请求 (占位符)")
|
||||||
controller.SendResponse(c, controller.CodeSuccess, "启动计划接口占位符", nil)
|
controller.SendResponse(ctx, controller.CodeSuccess, "启动计划接口占位符", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// StopPlan godoc
|
// StopPlan godoc
|
||||||
@@ -247,8 +247,8 @@ func (pc *Controller) StartPlan(c *gin.Context) {
|
|||||||
// @Success 200 {object} controller.Response "业务码为200代表成功停止计划"
|
// @Success 200 {object} controller.Response "业务码为200代表成功停止计划"
|
||||||
// @Failure 200 {object} controller.Response "业务失败,具体错误码和信息见响应体(例如400, 404, 500)"
|
// @Failure 200 {object} controller.Response "业务失败,具体错误码和信息见响应体(例如400, 404, 500)"
|
||||||
// @Router /plans/{id}/stop [post]
|
// @Router /plans/{id}/stop [post]
|
||||||
func (pc *Controller) StopPlan(c *gin.Context) {
|
func (c *Controller) StopPlan(ctx *gin.Context) {
|
||||||
// 占位符:此处应调用服务层或仓库层来停止计划
|
// 占位符:此处应调用服务层或仓库层来停止计划
|
||||||
pc.logger.Infof("收到停止计划请求 (占位符)")
|
c.logger.Infof("收到停止计划请求 (占位符)")
|
||||||
controller.SendResponse(c, controller.CodeSuccess, "停止计划接口占位符", nil)
|
controller.SendResponse(ctx, controller.CodeSuccess, "停止计划接口占位符", nil)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user