package handler import ( "cicv-data-closedloop/common/config/c_log" "cicv-data-closedloop/common/entity" "github.com/gin-gonic/gin" "net/http" ) type StartProjectParam struct { ProjectId int `json:"projectId"` } func StartProject(c *gin.Context) { projectStartParam := new(StartProjectParam) if err := c.ShouldBindJSON(&projectStartParam); err != nil { c_log.GlobalLogger.Error("项目启动接收请求参数报错:", err) c.JSON(http.StatusBadRequest, entity.HttpResult{Status: false, Code: "1001", Message: "请求参数格式错误。"}) return } c.JSON(http.StatusOK, gin.H{"status": "success"}) }