query.go 599 B

1234567891011121314151617
  1. package chart_permission_first
  2. import (
  3. "hongze/hongze_yb/global"
  4. )
  5. // GetIndexShowList 查询首页展示的权限一级分类
  6. func GetIndexShowList() (list []*ChartPermissionFirst, err error) {
  7. err = global.DEFAULT_MYSQL.Model(ChartPermissionFirst{}).Where("yb_index_show = 1").Scan(&list).Error
  8. return
  9. }
  10. // GetIndexShowListOrderSort 查询首页展示的权限一级分类
  11. func GetIndexShowListOrderSort() (list []*ChartPermissionFirst, err error) {
  12. err = global.DEFAULT_MYSQL.Model(ChartPermissionFirst{}).Where("yb_index_show = 1").Order("yb_index_sort asc").Scan(&list).Error
  13. return
  14. }