12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type BannerViewHistory struct {
- ViewHistoryID uint64 `orm:"column(view_history_id);pk"`
- UserID uint64
- Mobile string
- Email string
- RealName string
- CompanyName string
- CreatedTime time.Time
- LastUpdatedTime time.Time
- FirstSource int
- SecondSource int
- BannerUrl string
- }
- func GetBannerHistoryList() (items []*BannerHistoryListRespItem, err error) {
- sql := ` SELECT * FROM banner_view_history WHERE 1=1 GROUP BY banner_url `
- o := orm.NewOrm()
- _, err = o.Raw(sql).QueryRows(&items)
- return
- }
- type SourcePv struct {
- FirstSource int
- SecondSource int
- PV int
- LastUpdatedTime string
- }
- type BannerHistoryListRespItem struct {
- ViewHistoryID uint64 `orm:"column(view_history_id);pk"`
- UserID uint64
- Mobile string
- Email string
- RealName string
- CompanyName string
- CreatedTime string
- LastUpdatedTime string
- FirstSource int
- SecondSource int
- BannerUrl string
- PV int
- SourceList []SourcePv
- }
- type BannerHistoryListResp struct {
- List []*BannerHistoryListRespItem
- }
|