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
- Mobile string
- Email string
- CompanyId int
- CompanyName string
- RealName string
- SellerName string
- CreateTime time.Time
- ModifyTime time.Time
- RegisterPlatform int
- YanxuanSpecialId int
- }
- func AddCygxYanxuanSpecialCollect(item *CygxYanxuanSpecialCollect) (lastId int64, err error) {
- o := orm.NewOrm()
- lastId, err = o.Insert(item)
- return
- }
- type CollectCygxYanxuanSpecialReq struct {
- Id int
- Status int
- }
- 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
- }
|