package chart_permission_first

import (
	"hongze/hongze_yb/global"
)

// GetIndexShowList 查询首页展示的权限一级分类
func GetIndexShowList() (list []*ChartPermissionFirst, err error) {
	err = global.DEFAULT_MYSQL.Model(ChartPermissionFirst{}).Where("yb_index_show = 1").Scan(&list).Error
	return
}

// GetIndexShowListOrderSort 查询首页展示的权限一级分类
func GetIndexShowListOrderSort() (list []*ChartPermissionFirst, err error) {
	err = global.DEFAULT_MYSQL.Model(ChartPermissionFirst{}).Where("yb_index_show = 1").Order("yb_index_sort asc").Scan(&list).Error
	return
}
