company_approval.go 354 B

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