#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
#-------------------------------------------------------------------------------
|
#
|
from Protocol import SendPackProtocol
|
from Common import mylog
|
from DBCommon import CommonDefine
|
import NetPackCommon
|
from Commands import GMCommon
|
import json
|
##################################################################
|
####### ÌṩµÄ½Ó¿Ú ######
|
|
|
#»Ø¸´¸øServersRoute->GM¹¤¾ß ÃüÁîÖ´Ðнá¹û°ü
|
def SendToGMToolCommandResult(orderID, resultMsg, UserData = ''):
|
# if isinstance(Result, unicode):
|
# #Ö±½Ó´ÓÊý¾Ý¿âδ½øÐÐת»¯µÄ»°ÊÇunicode
|
# Result = Result.encode('gbk')
|
|
recvPack = SendPackProtocol.tagGMCommandResult()
|
recvPack.Type = CommonDefine.gstGMToolCommandResult
|
recvPack.OrderLen = len(orderID)
|
recvPack.OrderId = orderID
|
recvPack.ResultLen = len(resultMsg)
|
recvPack.Result = resultMsg
|
recvPack.UserDataLen = len(UserData)
|
recvPack.UserData = UserData
|
|
NetPackCommon.SendPyPackToServersRoute(recvPack.GetBuffer(), recvPack.GetLength())
|
mylog.info('ProjSpecialProcess SendToGMToolCommandResult OrderId = %s'%orderID)
|
|
|
|
|
##################################################################
|