package models import ( "github.com/beego/beego/v2/client/orm" "time" ) type CygxIndustryFllow struct { Id int `orm:"column(id);pk"` IndustrialManagementId int `description:"产业D"` UserId int `description:"用户ID"` Mobile string `description:"手机号"` Email string `description:"邮箱"` CompanyId int `description:"公司id"` CompanyName string `description:"公司名称"` Type int `description:"操作方式,1报名,2取消报名"` CreateTime time.Time `description:"创建时间"` ModifyTime time.Time `description:"更新时间"` RealName string `description:"用户实际名称"` Source int `description:"来源1查研观向,2查研观向小助手"` FollowType int `description:"1,重点关注,3不感兴趣,0默认接受推送"` FollowTypeOrder int `description:"排序方式,重点关注在最前面,不感兴趣在最后面。1,重点关注,-1不感兴趣,0默认接受推送"` } type CygxIndustryFllowRep struct { IndustrialManagementId int `description:"产业D"` } // 根据手机号获取用户关注的产业 func GetCygxIndustryFllowList(mobile string) (items []*CygxIndustryFllow, err error) { o := orm.NewOrmUsingDB("hz_cygx") sql := `SELECT * FROM cygx_industry_fllow WHERE mobile = ?` _, err = o.Raw(sql, mobile).QueryRows(&items) return }