chart_permission.go 351 B

1234567891011
  1. package models
  2. import "github.com/rdlucklib/rdluck_tools/orm"
  3. // GetDefaultChartPermissionCount 获取默认的权限数目
  4. func GetDefaultChartPermissionCount(productId int) (count int, err error) {
  5. sql := ` select count(1) COUNT from chart_permission where product_id=?`
  6. o := orm.NewOrm()
  7. err = o.Raw(sql, productId).QueryRow(&count)
  8. return
  9. }