12345678910111213141516171819202122232425262728 |
- 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
- }
- // 1 场景
- // 2 动力学模型
- // 3 传感器
- // 4 算法
- //service
- c.JSON(http.StatusOK, entity.HttpResult{Status: true, Code: "2000", Message: "项目启动请求已被成功接收,等待调度处理。"})
- }
|