go-admin
go-admin copied to clipboard
[Question]怎么加入条件在特定的AddGenerator
问题描述
想要在Generator生成的表单内生成特定的条件的list,而不需要通过筛选条件
http://doc.go-admin.cn/zh/admin/table/basic/#_11
预查询¶
// 字段, 操作符, 参数 info.Where("type", "=", 0) // 原生sql info.WhereRaw("type = 0 or sex = 1") // or语句,以下会生成:type = 3 or type = 0 info.Where("type", "=", 3).WhereOr("type", "=", 0)