package models import ( "github.com/beego/beego/v2/client/orm" ) type CygxZhouqiArticleMap struct { CategoryId int `description:"产业Id"` MatchTypeName string `description:"行业名称"` SeriesName string `description:"系列名称"` ArticleUpdateTime string `description:"对应文章的更新时间"` } // 获取周期下面的一级分类 func GetCygxZhouqiArticleMapFirst() (items []*CygxZhouqiArticleMap, err error) { o := orm.NewOrmUsingDB("hz_cygx") sql := `SELECT category_id, match_type_name, series_name FROM cygx_zhouqi_article_map WHERE hidden = 0 AND parent_id = 0 ORDER BY sort DESC ` _, err = o.Raw(sql).QueryRows(&items) return }