report_mapping_cygx.go 1.1 KB

123456789101112131415161718192021222324252627282930
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. //"time"
  5. )
  6. type CygxReportMappingCygx struct {
  7. Id int `orm:"column(id);pk" description:"id"`
  8. ChartPermissionId int `description:"行业ID"`
  9. ChartPermissionName string `description:"行业名称"`
  10. MatchTypeName string `description:"分类名称"`
  11. ReportType int `description:"报告类型,2产业报告,1行业报告"`
  12. Sort int `description:"排序"`
  13. IsCustom int `description:"是否属于自定义的匹配类型 ,1是,0否"`
  14. IsSummary int `description:"是否是纪要库,1是,0否"`
  15. IsReport int `description:"是否是报告,1是,0否"`
  16. PermissionType int `description:"1主观,2客观"`
  17. }
  18. // 列表
  19. func GetCygxReportMappingCygxByCon(condition string, pars []interface{}) (items []*CygxReportMappingCygx, err error) {
  20. o := orm.NewOrm()
  21. sql := `SELECT * FROM cygx_report_mapping_cygx as art WHERE 1= 1 `
  22. if condition != "" {
  23. sql += condition
  24. }
  25. _, err = o.Raw(sql, pars).QueryRows(&items)
  26. return
  27. }