1234567891011121314151617181920212223242526 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type ReportViewRecord struct {
- Id int `orm:"column(id);pk"`
- UserId int `description:"用户id"`
- ReportId int `description:"报告id"`
- Mobile string `description:"手机号"`
- Email string `description:"邮箱"`
- RealName string `description:"用户实际姓名"`
- CompanyName string `description:"公司名称"`
- CreateTime time.Time `description:"创建时间"`
- }
- //获取需要修复的数据列表
- func GetViewListByReportId(reportId int) (total int64, list []*ReportViewRecord, err error) {
- o := orm.NewOrmUsingDB("rddp")
- sql := `select * from report_view_record where report_id = ? order by id desc `
- total, err = o.Raw(sql, reportId).QueryRows(&list)
- return
- }
|