1234567891011121314151617181920212223242526272829303132333435363738 |
- package contract_service_detail
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- //合同的服务内容详情,表单数据
- type ContractServiceDetail struct {
- Id int `orm:"column(id);pk"`
- ContractServiceId int `description:"合同服务id"`
- ContractId int `description:"合同id"`
- ServiceTemplateId int `description:"服务模板id"`
- Col1 string `orm:"column(col_1)"description:"第1列数据"`
- Col2 string `orm:"column(col_2)"description:"第2列数据"`
- Col3 string `orm:"column(col_3)"description:"第3列数据"`
- Col4 string `orm:"column(col_4)"description:"第4列数据"`
- Col5 string `orm:"column(col_5)"description:"第5列数据"`
- Col6 string `orm:"column(col_6)"description:"第6列数据"`
- Col7 string `orm:"column(col_7)"description:"第7列数据"`
- CreateTime time.Time `description:"数据添加时间"`
- }
- //根据服务模板id获取对应的套餐表格数据详情
- func GetContractServiceDetailByTemplateId(serviceTemplateId int) (list []*ContractServiceDetail, err error) {
- o := orm.NewOrm()
- sql := `select * from contract_service_detail where service_template_id = ? and contract_service_id = 0 order by id asc`
- _, err = o.Raw(sql, serviceTemplateId).QueryRows(&list)
- return
- }
- //根据合同服务id获取对应的套餐表格数据详情
- func GetContractServiceDetailListByServiceId(contractServiceId int) (list []*ContractServiceDetail, err error) {
- o := orm.NewOrm()
- sql := `select * from contract_service_detail where contract_service_id = ? order by id asc`
- _, err = o.Raw(sql, contractServiceId).QueryRows(&list)
- return
- }
|