report_mapping_group.go 798 B

1234567891011121314151617181920212223242526
  1. package cygx
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxReportMappingGroup struct {
  7. Id int `orm:"column(id);pk" description:"id"`
  8. IdCygx int `description:"分类ID"`
  9. CategoryIdCelue int `description:"分类ID"`
  10. CreateTime time.Time `description:"创建时间"`
  11. ModifyTime time.Time `description:"更新时间"`
  12. }
  13. // 列表
  14. func GetCygxReportMappingGroupList(condition string, pars []interface{}, startSize, pageSize int) (items []*CygxReportMappingGroup, err error) {
  15. o := orm.NewOrmUsingDB("hz_cygx")
  16. sql := `SELECT * FROM cygx_report_mapping_group as art WHERE 1= 1 `
  17. if condition != "" {
  18. sql += condition
  19. }
  20. sql += ` LIMIT ?,? `
  21. _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
  22. return
  23. }