|
@@ -40,14 +40,13 @@ func GetCompanyProductPermissionCount(companyId, productId int) (count int, err
|
|
|
INNER JOIN company_product AS b ON a.company_id=b.company_id
|
|
|
INNER JOIN company_report_permission AS c ON a.company_id=c.company_id
|
|
|
WHERE b.company_id=? AND b.product_id=?
|
|
|
- AND b.status IN('正式','试用')
|
|
|
+ AND b.status IN('正式','试用','永续')
|
|
|
AND c.product_id=? `
|
|
|
o := orm.NewOrm()
|
|
|
err = o.Raw(sql, companyId, productId, productId).QueryRow(&count)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
type CompanyProductDetail struct {
|
|
|
CompanyProductId int `orm:"column(company_product_id);pk" description:"客户产品id"`
|
|
|
CompanyId int `description:"客户id"`
|
|
@@ -83,4 +82,4 @@ func GetCompanyProductsByUserId(userId int) (items []*CompanyProductDetail, err
|
|
|
o := orm.NewOrm()
|
|
|
_, err = o.Raw(sql, userId).QueryRows(&items)
|
|
|
return
|
|
|
-}
|
|
|
+}
|