123456789101112131415161718192021222324252627282930313233343536373839 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type CygxYanxuanSpecialCollect struct {
- CygxYanxuanSpecialCollectId int `orm:"column(cygx_yanxuan_special_collect_id);pk"`
- UserId int // 用户ID
- Mobile string // 手机号
- Email string // 邮箱
- CompanyId int // 公司ID
- CompanyName string // 公司名称
- RealName string // 用户实际名称
- SellerName string // 所属销售
- CreateTime time.Time // 创建时间
- ModifyTime time.Time // 修改时间
- RegisterPlatform int // 来源 1小程序,2:网页
- YanxuanSpecialId int // cygx_yanxuan_special 表主键ID
- }
- func AddCygxYanxuanSpecialCollect(item *CygxYanxuanSpecialCollect) (lastId int64, err error) {
- o := orm.NewOrm()
- lastId, err = o.Insert(item)
- return
- }
- type CollectCygxYanxuanSpecialReq struct {
- Id int // 文章id
- Status int // 1收藏2取消收藏
- }
- func DelCygxYanxuanSpecialCollect(userId, articleId int) (err error) {
- o := orm.NewOrm()
- sql := `DELETE FROM cygx_yanxuan_special_collect WHERE user_id=? AND yanxuan_special_id=? `
- _, err = o.Raw(sql, userId, articleId).Exec()
- return
- }
|