xzs_choose_category.go 1017 B

12345678910111213141516171819202122232425262728
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxXzsChooseCategory struct {
  7. Id int `orm:"column(id);pk"`
  8. UserId int `description:"用户ID"`
  9. Mobile string `description:"手机号"`
  10. Email string `description:"邮箱"`
  11. CompanyId int `description:"公司id"`
  12. CompanyName string `description:"公司名称"`
  13. RealName string `description:"用户实际名称"`
  14. CategoryId int `description:"权益文章对应分类,cygx_article"`
  15. CreateTime time.Time `description:"创建时间"`
  16. ModifyTime time.Time `description:"更新时间"`
  17. IdCygx int `description:"cygx_report_mapping_cygx 表主键ID"`
  18. }
  19. // 根据手机号获取用户关注的产业
  20. func GetCygxXzsChooseCategoryList(mobile string) (items []*CygxXzsChooseCategory, err error) {
  21. o := orm.NewOrmUsingDB("hz_cygx")
  22. sql := `SELECT * FROM cygx_xzs_choose_category WHERE mobile = ?`
  23. _, err = o.Raw(sql, mobile).QueryRows(&items)
  24. return
  25. }