Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentMonthSum ¶
GetCurrentMonthSum 获取指定统计项在本月内的总和
func GetSumInRange ¶
GetSumInRange 获取指定统计项在一段时间内的总和
Types ¶
type Entity ¶
type Entity struct {
StatDate time.Time `gorm:"primaryKey;column:stat_date;type:date;not null;" json:"statDate"` // 日期,格式 YYYY-MM-DD
StatKey string `gorm:"primaryKey;column:stat_key;type:varchar(128);not null;" json:"statKey"` // 统计项的 Key (带前缀)
StatValue int64 `gorm:"column:stat_value;type:bigint;not null;default:0;" json:"statValue"` // 统计数值
}
func GetStatsInRange ¶
GetStatsInRange 获取指定时间范围内的统计项列表
Click to show internal directories.
Click to hide internal directories.