1234567891011121314151617181920212223242526272829 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type CygxXzsChooseCategory struct {
- Id int `orm:"column(id);pk"`
- UserId int `description:"用户ID"`
- Mobile string `description:"手机号"`
- Email string `description:"邮箱"`
- CompanyId int `description:"公司id"`
- CompanyName string `description:"公司名称"`
- RealName string `description:"用户实际名称"`
- CategoryId int `description:"权益文章对应分类,cygx_article"`
- CreateTime time.Time `description:"创建时间"`
- ModifyTime time.Time `description:"更新时间"`
- IdCygx int `description:"cygx_report_mapping_cygx 表主键ID"`
- FollowType int `description:"1,重点关注,3不感兴趣,0默认接受推送"`
- }
- // 根据手机号获取用户关注的产业
- func GetCygxXzsChooseCategoryList(mobile string) (items []*CygxXzsChooseCategory, err error) {
- o := orm.NewOrmUsingDB("hz_cygx")
- sql := `SELECT * FROM cygx_xzs_choose_category WHERE mobile = ?`
- _, err = o.Raw(sql, mobile).QueryRows(&items)
- return
- }
|