12345678910111213141516171819202122232425262728293031 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- "hongze/hongze_mfyx_gzh/utils"
- )
- type ReportMappingResp struct {
- CategoryId int `description:"分类ID"`
- SubCategoryName string `description:"主题名称"`
- MatchTypeName string `description:"匹配类型"`
- IsRed bool `description:"是否标红"`
- }
- // 获取策略下面的所有分类
- func GetReportMappingStrategyAll() (items []*IndustrialManagementRep, err error) {
- o := orm.NewOrm()
- sql := `SELECT
- match_type_name AS industry_name,
- category_id AS industrial_management_id,
- chart_permission_id
- FROM
- cygx_report_mapping
- WHERE
- report_type = 1
- AND chart_permission_name = ?
- ORDER BY
- sort ASC `
- _, err = o.Raw(sql, utils.CE_LUE_NAME).QueryRows(&items)
- return
- }
|