25 lines
584 B
Go
25 lines
584 B
Go
package rank
|
|
|
|
import (
|
|
"time"
|
|
|
|
"mongo.games.com/goserver/core/logger"
|
|
|
|
"mongo.games.com/game/model"
|
|
"mongo.games.com/game/ranksrv/com"
|
|
)
|
|
|
|
var LotteryLogMgrInstance = com.NewListMgr[*model.LotteryLog](
|
|
func() int64 {
|
|
return int64(time.Hour.Seconds()) // 缓存1小时
|
|
},
|
|
func(platform string, index int32) ([]*model.LotteryLog, error) {
|
|
logger.Logger.Tracef("load LotteryLog platform:%s", platform)
|
|
ret, err := model.GetLotteryLogs(platform, 50)
|
|
if err != nil {
|
|
logger.Logger.Errorf("load LotteryLog err:%s", err.Error())
|
|
return nil, err
|
|
}
|
|
return ret, nil
|
|
})
|