package models import ( "github.com/beego/beego/v2/client/orm" ) type ChartPermissionResp struct { ChartPermissionId int `description:"权限id"` PermissionName string `description:"权限名称"` AllTracks string `default:"全部赛道";description:"全部赛道"` List []*IndustrialManagementRep CheckList []int } func GetChartPermissionAll(condition string, pars []interface{}) (items []*ChartPermissionResp, err error) { o := orm.NewOrmUsingDB("weekly_report") sql := `SELECT * FROM chart_permission WHERE product_id=2 AND is_report=1 AND permission_type!=2 ` + condition + ` ORDER BY sort ASC ` _, err = o.Raw(sql, pars).QueryRows(&items) return }