1234567891011121314151617181920212223 |
- 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"`
- AlgorithmObjectKey int `json:"algorithmObjectKey"`
- }
- 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: "1003", Message: "请求参数格式错误。"})
- return
- }
- c.JSON(http.StatusOK, entity.HttpResult{Status: true, Code: "2000", Message: "项目启动请求已被成功接收,等待调度处理。"})
- }
|