package server

import (
	"game/common/rpc"
	"github.com/fox/fox/processor"
)

func (s *DbService) initRpcProcessor() {
	s.RpcProcessor.RegisterMessages(map[string]processor.RpcHandler{
		rpc.CreateUserAccount:   s.onCreateUserAccount,
		rpc.GetUserAccount:      s.onGetUserAccount,
		rpc.GetUserAccountById:  s.onGetUserAccountById,
		rpc.UpdateUserPassword:  s.onUpdateUserAccount,
		rpc.LogUserAccountLogin: s.onLogUserAccountLogin,
		rpc.GetUserByUid:        s.onGetUserByUid,
		rpc.GetUserByAccountId:  s.onGetUserByAccountId,
		rpc.GetUserResources:    s.onGetUserResources,
		rpc.GetGameUser:         s.onGetGameUser,
		rpc.AddUserResources:    s.onAddUserResources,
		rpc.SaveGameRecordLog:   s.onSaveGameRecordLog,
		rpc.SaveUserRecordLog:   s.onSaveUserRecordLog,

		// 日志查询
		rpc.RpcGetUserResLog: s.onGetUserResLogs,
	})
}
