industrial_activity_group_subject.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxIndustrialActivityGroupSubject struct {
  7. Id int `orm:"column(id);pk" description:"主键ID"`
  8. ActivityId int `description:"活动ID"`
  9. IndustrialSubjectId int `description:"cygx_industrial_subject表的文章ID"`
  10. Source int `description:"来源,1 活动,2专项调研"`
  11. CreateTime time.Time `description:"创建时间"`
  12. }
  13. type SubjectActivityGroupManagementRep struct {
  14. IndustrialSubjectId int `description:"产业id"`
  15. SubjectName string `description:"标的名称"`
  16. }
  17. // GetCygxIndustrialActivityGroupSubjectList 获取列表
  18. func GetCygxIndustrialActivityGroupSubjectList(condition string, pars []interface{}) (list []*CygxIndustrialActivityGroupSubject, err error) {
  19. sql := `SELECT
  20. *
  21. FROM
  22. cygx_industrial_activity_group_subject
  23. WHERE
  24. 1 = 1 `
  25. if condition != `` {
  26. sql += condition
  27. }
  28. _, err = orm.NewOrm().Raw(sql, pars).QueryRows(&list)
  29. return
  30. }