package models import ( "github.com/beego/beego/v2/client/orm" ) // ๆ ‡็š„ๅˆ—่กจ func GetIndustrialArticleGroupSubjectListByHz(IndustrialManagementId int) (items []*IndustrialSubject, err error) { o := orm.NewOrm() sql := `SELECT i.* FROM cygx_industrial_subject AS i INNER JOIN cygx_industrial_article_group_subject AS sg ON sg.industrial_subject_id = i.industrial_subject_id INNER JOIN cygx_article AS a ON a.article_id = sg.article_id WHERE i.industrial_management_id = ? AND a.article_type_id = 0 GROUP BY i.industrial_subject_id ` _, err = o.Raw(sql, IndustrialManagementId).QueryRows(&items) return }