1234567891011121314151617181920212223242526 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- )
- type IndustrialManagementRep struct {
- IndustrialManagementId int `description:"产业ID"`
- ChartPermissionId int `description:"权限id"`
- IndustryName string `description:"产业名称"`
- IsFllow bool `description:"是否关注"`
- }
- // 获取所有的产业
- func GetindustrialManagement() (items []*IndustrialManagementRep, err error) {
- o := orm.NewOrm()
- sql := `SELECT
- i.*
- FROM
- cygx_industrial_management AS i
- INNER JOIN cygx_industrial_article_group_management AS m ON m.industrial_management_id = i.industrial_management_id
- GROUP BY
- i.industrial_management_id `
- _, err = o.Raw(sql).QueryRows(&items)
- return
- }
|