liuxiaolong
2019-08-22 f4e8f206a6760bdc31734dfcb1c65916b5b76311
controllers/sdk.go
@@ -30,7 +30,9 @@
   Name  string `json:"name"`  //参数名称
   Type  string `json:"type"`  //参数类型(整数,字符串或数组)
   Must  bool   `json:"must"`  //是否必填
   Unit  string `json:"unit"`
   Range string `json:"range"` //值的范围,eg:0,100表示从0到100
   DefaultValue string `json:"default_value"`
   Sort  int    `json:"sort"`  //参数顺序
}
@@ -100,6 +102,23 @@
   }
}
// @Router /data/api-v/sdkArg/getSdkArgs [get]
func (sc SdkController) GetSdkArgs(c *gin.Context) {
   sdkId := c.Query("sdkId")
   scope := c.Query("scope")
   if sdkId== "" || scope == ""{
      util.ResponseFormat(c,code.RequestParamError,"参数有误")
      return
   }
   var api dbapi.SdkApi
   b,d := api.GetSdkArgs(sdkId, scope)
   if b{
      util.ResponseFormat(c,code.Success,d)
   } else {
      util.ResponseFormat(c,code.ComError,"查询失败")
   }
}
// @Summary 根据taskId获取算法信息
// @Description 根据taskId获取算法信息
// @Produce json