industry_fllow.go 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxIndustryFllow struct {
  7. Id int `orm:"column(id);pk"`
  8. IndustrialManagementId int `description:"产业D"`
  9. UserId int `description:"用户ID"`
  10. Mobile string `description:"手机号"`
  11. Email string `description:"邮箱"`
  12. CompanyId int `description:"公司id"`
  13. CompanyName string `description:"公司名称"`
  14. Type int `description:"操作方式,1报名,2取消报名"`
  15. CreateTime time.Time `description:"创建时间"`
  16. ModifyTime time.Time `description:"更新时间"`
  17. RealName string `description:"用户实际名称"`
  18. Source int `description:"来源1查研观向,2查研观向小助手"`
  19. }
  20. type CygxIndustryFllowRep struct {
  21. IndustrialManagementId int `description:"产业D"`
  22. }
  23. // 根据手机号获取用户关注的产业
  24. func GetCygxIndustryFllowList(mobile string) (items []*CygxIndustryFllow, err error) {
  25. o := orm.NewOrmUsingDB("hz_cygx")
  26. sql := `SELECT * FROM cygx_industry_fllow WHERE mobile = ?`
  27. _, err = o.Raw(sql, mobile).QueryRows(&items)
  28. return
  29. }