model.go 304 B

12345678910111213
  1. package research_group
  2. import "hongze/hongze_yb/global"
  3. // GetResearchGroupList 获取研究方向分组列表
  4. func GetResearchGroupList() (list []*ResearchGroup, err error) {
  5. err = global.DEFAULT_MYSQL.Model(ResearchGroup{}).
  6. Where("state = 1").
  7. Order("sort ASC").
  8. Scan(&list).Error
  9. return
  10. }