You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
664 B
32 lines
664 B
package api
|
|
|
|
import (
|
|
"WechatGateWay/global"
|
|
"github.com/jinzhu/gorm"
|
|
)
|
|
|
|
/*
|
|
*
|
|
@author: sre
|
|
@date: 2022/9/12 0012
|
|
@desc: todo
|
|
*
|
|
*/
|
|
type BaiduReportInfo struct {
|
|
gorm.Model
|
|
siteId int64
|
|
Domain string
|
|
YesterdayPvCount int
|
|
YesterdayVisitorCount int
|
|
YesterdayIpCount int
|
|
TodayPvCount int
|
|
TodayVisitorCount int
|
|
TodayIpCount int
|
|
}
|
|
|
|
func GetLatestBaiduReportInfo(domain string) (int, int, int) {
|
|
var baiduReportInfo BaiduReportInfo
|
|
global.DB.Where("domain = ?", domain).Last(&baiduReportInfo)
|
|
return baiduReportInfo.TodayPvCount, baiduReportInfo.TodayVisitorCount, baiduReportInfo.TodayIpCount
|
|
}
|