game_sync/model/matchawardlog.go

34 lines
738 B
Go

package model
import (
"time"
)
// 比赛详情
type MatchAwardLog struct {
AwardNum map[string]map[int32]int32 // 奖励数量
Platform string
}
var (
MatchAwardLogDBName = "log"
MatchAwardLogCollName = "log_matchawardlog"
)
func NewMatchAwardLog() *MatchAwardLog {
return &MatchAwardLog{}
}
func InsertOrUpdateMatchAwardLog(logs ...*MatchAwardLog) (err error) {
if rpcCli == nil {
return ErrRPClientNoConn
}
var ret bool
return rpcCli.CallWithTimeout("MatchAwardLogSvc.InsertOrUpdateMatchAwardLog", logs, &ret, time.Second*30)
}
func GetMatchAwardLog(platform string) (ret MatchAwardLog, err error) {
err = rpcCli.CallWithTimeout("MatchAwardLogSvc.GetMatchAward", platform, &ret, time.Second*30)
return ret, err
}