package cygx import ( "github.com/beego/beego/v2/client/orm" "time" ) type ChartPermission struct { ChartPermissionId int `description:"权限id"` PermissionName string `description:"权限名称"` IcoLink string `description:"图标链接"` List []*CygxIndustrialManagementNumCheckName } type CygxIndustrialManagementNumCheckName struct { ChartPermissionId int `orm:"column(industrial_management_id);pk" description:"产业id"` PermissionName string `orm:"column(industry_name)" description:"产业名称"` RecommendedIndex int `description:"推荐指数"` CreateTime time.Time `description:"创建时间"` LayoutTime string `description:"布局时间"` ArtNum int `description:"文章数量"` IsRelevance bool `description:"是否存在关联文章"` } func GetChartPermissionAll() (items []*ChartPermission, err error) { o := orm.NewOrm() sql := `SELECT * FROM chart_permission WHERE product_id=2 AND is_report=1 AND is_other = 0 AND permission_type != 2 ORDER BY sort ASC ` _, err = o.Raw(sql).QueryRows(&items) return }