123456789101112 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- )
- // 获取是否属于权益客户
- func GetCountCompanyProductCompanyId(companyId, productId int) (count int, err error) {
- sql := `SELECT COUNT(1) AS count FROM company_product WHERE company_id = ? AND product_id = ? `
- err = orm.NewOrm().Raw(sql, companyId, productId).QueryRow(&count)
- return
- }
|