123456789101112131415161718192021222324252627 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- )
- type ChartPermissionResp struct {
- ChartPermissionId int `description:"权限id"`
- PermissionName string `description:"权限名称"`
- HasCheck bool `description:"是否有权限"`
- AllTracks string `default:"全部赛道";description:"全部赛道"`
- //List []*IndustrialManagementRep
- ListFollow []*IndustrialManagementRep // 重点关注
- CheckListFollow []int // 重点关注的ID
- ListPush []*IndustrialManagementRep // 接受推送
- CheckListPush []int // 接受推送的ID
- ListUninterested []*IndustrialManagementRep // 不感兴趣
- CheckListUninterested []int // 不感兴趣的ID
- //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
- }
|