game_sync/model/matchawardlog.go

33 lines
657 B
Go

package model
import (
"time"
)
var (
MatchAwardLogDBName = "log"
MatchAwardLogCollName = "log_matchawardlog"
)
type MatchAward struct {
Platform string `bson:"-"`
Award map[int32]int32
}
func UpsertMatchAward(data *MatchAward) error {
if rpcCli == nil {
return ErrRPClientNoConn
}
var ret bool
return rpcCli.CallWithTimeout("MatchAwardSvc.UpsertMatchAward", data, &ret, time.Second*30)
}
func GetMatchAward(platform string) (ret *MatchAward, err error) {
if rpcCli == nil {
return nil, ErrRPClientNoConn
}
ret = new(MatchAward)
err = rpcCli.CallWithTimeout("MatchAwardSvc.GetMatchAward", platform, ret, time.Second*30)
return
}