zhangzengfei
2024-12-18 c09b0e6c39a0ebc6c4ca5884d35fbadea090e48a
添加参数校验
1个文件已修改
7 ■■■■ 已修改文件
models/gather_model.go 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/gather_model.go
@@ -81,7 +81,12 @@
        }
    }
    fmt.Printf("GatherModel init finish ... rule:%+v\n", m)
    fmt.Printf("GatherModel init finish ...task id:%s, name:%s, rule:%+v\n", task.ID, task.Name, task.Rules)
    if m.GatherPersons == 0 || m.AppearInterval == 0 || m.DaysWindow == 0 || m.Threshold == 0 {
        return errors.New("invalid parameters")
    }
    return nil
}