1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package cygx
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type CygxUserRemind struct {
- Id int `orm:"column(id);pk"`
- AdminId int
- UserId int
- CreateTime time.Time
- ModifyTime time.Time
- Mobile string `description:"手机号"`
- Email string `description:"邮箱"`
- CompanyId int `description:"公司id"`
- CompanyName string `description:"公司名称"`
- RealName string `description:"用户实际名称"`
- AdminName string `description:"管理员销售姓名"`
- }
- //添加
- func AddCygxUserRemind(item *CygxUserRemind) (lastId int64, err error) {
- o := orm.NewOrm()
- lastId, err = o.Insert(item)
- return
- }
- type CygxUserRemindResp struct {
- Status int `description:"1:添加,2:取消"`
- }
- func RemoveCygxUserRemind(userId int) (err error) {
- o := orm.NewOrm()
- sql := `DELETE FROM cygx_user_remind WHERE user_id=? `
- _, err = o.Raw(sql, userId).Exec()
- return
- }
- func GetCygxUserRemindCount(userId int) (count int, err error) {
- sql := `SELECT COUNT(1) AS count FROM cygx_user_remind WHERE user_id=? `
- err = orm.NewOrm().Raw(sql, userId).QueryRow(&count)
- return
- }
|