123456789101112131415161718192021222324252627282930313233 |
- package company_approval
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type CompanyApproval struct {
- CompanyApprovalId int `orm:"column(company_approval_id);pk"`
- CompanyId int
- ProductId int
- ApproveStatus string `description:"'待审批','已审批','驳回','已撤回'"`
- ApproveUserId int `description:"审批人"`
- ApproveRoleTypeCode string `description:"审批人角色类型"`
- ApproveRealName string `description:"审批人姓名"`
- ApproveTime time.Time `description:"审批时间"`
- ApproveContent string `description:"待审内容"`
- ApplyMethod int `description:"申请类型:1:试用->正式,2:冻结—>试用,3:流失—>正式,4:试用延期,5:原销售申请领取流失客户,6:正式客户申请服务更新"`
- ApplyReasons string `description:"申请原因"`
- ApplyUserId int `description:"申请人"`
- ApplyRealName string `description:"申请人姓名"`
- CreateTime time.Time `description:"申请时间"`
- ModifyTime time.Time `description:"修改时间"`
- CompanyContractId int `description:"合同id"`
- }
- //根据合同id获取审批单
- func GetCompanyApprovalByCompanyContractId(companyContractId int) (item *CompanyApproval, err error) {
- o := orm.NewOrm()
- sql := `SELECT * FROM company_approval WHERE company_contract_id=? order by company_approval_id desc`
- err = o.Raw(sql, companyContractId).QueryRow(&item)
- return
- }
|