contract_service_detail.go 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. package crm
  2. import (
  3. "hongze/fms_api/global"
  4. "time"
  5. )
  6. type ContractServiceDetail struct {
  7. Id int `description:"id"`
  8. ContractServiceId int `description:"合同服务id"`
  9. ContractId int `description:"合同id"`
  10. ServiceTemplateId int `description:"服务模板id"`
  11. Col1 string `gorm:"column:col_1" description:"第1列数据"`
  12. Col2 string `gorm:"column:col_2" description:"第2列数据"`
  13. Col3 string `gorm:"column:col_3" description:"第3列数据"`
  14. Col4 string `gorm:"column:col_4" description:"第4列数据"`
  15. Col5 string `gorm:"column:col_5" description:"第5列数据"`
  16. Col6 string `gorm:"column:col_6" description:"第6列数据"`
  17. Col7 string `gorm:"column:col_7" description:"第7列数据"`
  18. CreateTime time.Time `description:"数据添加时间"`
  19. }
  20. // GetContractServiceDetailListByServiceId 根据合同服务id获取对应的套餐表格数据详情
  21. func GetContractServiceDetailListByServiceId(contractServiceId int) (list []*ContractServiceDetail, err error) {
  22. list = make([]*ContractServiceDetail, 0)
  23. err = global.MYSQL["report"].Table("contract_service_detail").
  24. Where("contract_service_id = ?", contractServiceId).
  25. Order("id ASC").
  26. Find(&list).Error
  27. return
  28. }