package models import "github.com/beego/beego/v2/client/orm" func GetCompanyApprovalCount(companyId int,productId int) (count int, err error) { sql:=`SELECT COUNT(1) AS count FROM company_approval WHERE company_id = ? AND product_id = ? AND approve_status='待审批' ` o:=orm.NewOrm() err=o.Raw(sql,companyId,productId).QueryRow(&count) return }