forked from all_user/stat_center
Initial commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package innerserverser
|
||||
|
||||
import (
|
||||
"stat/api/proto"
|
||||
"time"
|
||||
)
|
||||
|
||||
type AppInformation struct {
|
||||
Id int
|
||||
Name string
|
||||
BeginCol int
|
||||
Total proto.InnerDailyRecharge
|
||||
}
|
||||
|
||||
type DayRecharge struct {
|
||||
SumDate time.Time
|
||||
List []*proto.InnerDailyRecharge // all items for one day
|
||||
Dict map[int32]*proto.InnerDailyRecharge // map[appId]item
|
||||
Total proto.InnerDailyRecharge
|
||||
}
|
||||
|
||||
type DayRechargeList []*DayRecharge
|
||||
|
||||
func (d DayRechargeList) Len() int {
|
||||
return len(d)
|
||||
}
|
||||
|
||||
func (d DayRechargeList) Less(i, j int) bool {
|
||||
return d[i].SumDate.Before(d[j].SumDate)
|
||||
}
|
||||
|
||||
func (d DayRechargeList) Swap(i, j int) {
|
||||
d[i], d[j] = d[j], d[i]
|
||||
}
|
||||
Reference in New Issue
Block a user