1234567891011121314151617181920 |
- 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.NewOrm()
- sql := `SELECT * FROM chart_permission WHERE product_id=2 AND is_report=1 AND permission_type!=2 AND chart_permission_id != 52 ` + condition + ` ORDER BY sort ASC `
- _, err = o.Raw(sql, pars).QueryRows(&items)
- return
- }
|