zhangqian
2023-11-09 71b0e418839dda386043fb6cad1ec335bcdc06c6
增加设置是否跳过设置工艺参数接口
2个文件已修改
5 ■■■■■ 已修改文件
api/v1/device.go 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
router/index.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/v1/device.go
@@ -56,14 +56,14 @@
    ctx.Ok()
}
// SetDeviceConfig
// Config
// @Tags      设备
// @Summary   设置设备一些配置
// @Produce   application/json
// @Param     object  body    request.DeviceConfig true  "查询参数"
// @Success   200   {object}  contextx.Response{}  "成功"
// @Router    /v1/device/config [post]
func (slf *DeviceApi) config(c *gin.Context) {
func (slf *DeviceApi) Config(c *gin.Context) {
    var params request.DeviceConfig
    ctx, ok := contextx.NewContext(c, &params)
    if !ok {
router/index.go
@@ -73,6 +73,7 @@
    {
        deviceGroup.GET("list", deviceApi.DeviceList)                        // 可选设备列表
        deviceGroup.POST("setCurrentDeviceId", deviceApi.SetCurrentDeviceId) // 切换设备ID
        deviceGroup.POST("config", deviceApi.Config)                         // 配置一些字段
    }
    systemApi := new(v1.SystemApi)