industry_fllow.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  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. FollowType int `description:"1,重点关注,3不感兴趣,0默认接受推送"`
  20. FollowTypeOrder int `description:"排序方式,重点关注在最前面,不感兴趣在最后面。1,重点关注,-1不感兴趣,0默认接受推送"`
  21. }
  22. type CygxIndustryFllowRep struct {
  23. IndustrialManagementId int `description:"产业D"`
  24. }
  25. // 根据手机号获取用户关注的产业
  26. func GetCygxIndustryFllowList(mobile string) (items []*CygxIndustryFllow, err error) {
  27. o := orm.NewOrmUsingDB("hz_cygx")
  28. sql := `SELECT * FROM cygx_industry_fllow WHERE mobile = ?`
  29. _, err = o.Raw(sql, mobile).QueryRows(&items)
  30. return
  31. }