game_sync/dbproxy/mq/c_coingivelog.go

26 lines
459 B
Go

package mq
import (
"mongo.games.com/game/dbproxy/svc"
"mongo.games.com/game/model"
"mongo.games.com/game/mq"
)
func init() {
mq.RegisterHandler(&mq.RegisterHandlerParam{
Name: mq.DBGiveLog,
Data: model.CoinGiveLog{},
Handler: func(data interface{}) (err error) {
log, ok := data.(*model.CoinGiveLog)
if !ok {
return
}
c := svc.CoinGiveLogCollection(log.Platform)
if c != nil {
err = c.Insert(log)
}
return
},
})
}