123456789101112131415161718192021222324252627282930313233343536373839404142 |
- package contract
- import (
- "github.com/beego/beego/v2/client/orm"
- "hongze/hongze_mobile_admin/models/tables/contract_service_detail"
- "time"
- )
- //合同的服务内容
- type ContractService struct {
- ContractServiceId int `orm:"column(contract_service_id);pk"`
- ContractId int `description:"合同id"`
- ProductId int `description:"产品id,1:ficc;2:权益"`
- ServiceTemplateId int `description:"合同服务模板id"`
- Title string `description:"套餐名称"`
- Value string `description:"套餐的值"`
- TableValue string `description:"表格数据,用于word生成时的json数据"`
- HasDetail string `description:"是否有详情,枚举值:是、否;默认:否"`
- CreateTime time.Time `description:"合同添加时间"`
- }
- //合同的服务内容
- type ContractServiceAndDetail struct {
- ContractServiceId int `orm:"column(contract_service_id);pk"`
- ContractId int `description:"合同id"`
- ProductId int `description:"产品id,1:ficc;2:权益"`
- ServiceTemplateId int `description:"合同服务模板id"`
- Title string `description:"套餐标题"`
- Value string `description:"套餐的值"`
- TableValue string `description:"表格数据,用于word生成时的json数据"`
- HasDetail string `description:"是否有详情,枚举值:是、否;默认:否"`
- ChartPermissionId int `description:"权限id"`
- DetailList []*contract_service_detail.ContractServiceDetail
- }
- //获取合同列表数据
- func GetContractServiceAndDetailList(contractId int) (list []*ContractServiceAndDetail, err error) {
- o := orm.NewOrm()
- sql := "select * from contract_service where contract_id = ? "
- _, err = o.Raw(sql, contractId).QueryRows(&list)
- return
- }
|