industrial_subject.go 807 B

1234567891011121314151617181920212223
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. )
  5. type CygxIndustrialSubject struct {
  6. IndustrialSubjectId int `orm:"column(industrial_subject_id);pk" description:"标的id"`
  7. IndustrialManagementId int `description:"产业id"`
  8. SubjectName string `description:"标的名称"`
  9. CreateTime string `description:"创建时间"`
  10. Source int `description:"来源,1正常添加,2:通过文章添加,3通过活动添加(默认为1)"`
  11. }
  12. // 获取标的列表
  13. func GetCygxIndustrialSubjectListCondition(condition string, pars []interface{}) (items []*CygxIndustrialSubject, err error) {
  14. o := orm.NewOrm()
  15. sql := `SELECT *
  16. FROM
  17. cygx_industrial_subject WHERE 1 = 1 ` + condition
  18. _, err = o.Raw(sql, pars).QueryRows(&items)
  19. return
  20. }