package company_contract import ( "github.com/beego/beego/v2/client/orm" "hongze/hongze_mobile_admin/models/tables/company_contract" ) type CompanyContractDetailResp struct { *company_contract.CompanyContractDetail } func GetCompanyContractById(companyContractId int) (item *company_contract.CompanyContractDetail, err error) { o := orm.NewOrm() sql := `SELECT * FROM company_contract WHERE company_contract_id=? ` err = o.Raw(sql, companyContractId).QueryRow(&item) return }