1234567891011121314151617181920212223242526 |
- package company
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type CompanyContractPermission struct {
- Id int `orm:"column(id);pk" description:"客户合同id"`
- CompanyId int `description:"客户id"`
- CompanyContractId int `description:"合同id"`
- ChartPermissionId int `description:"权限id"`
- IsUpgrade int `description:"是否升级,1是,0否"`
- ExpensiveYx int `description:"权益研选: 0-3w; 1-5w"`
- StartDate string `description:"开始日期"`
- EndDate string `description:"结束日期"`
- CreateTime time.Time `description:"创建时间"`
- ModifyTime time.Time `description:"修改时间"`
- }
- func GetCompanyContractPermissionCheck(companyContractId, permissionId int) (count int, err error) {
- o := orm.NewOrmUsingDB("weekly_report")
- sql := `SELECT COUNT(1) AS count FROM company_contract_permission AS a WHERE a.company_contract_id=? AND a.chart_permission_id=? `
- err = o.Raw(sql, companyContractId, permissionId).QueryRow(&count)
- return
- }
|