1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/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) 
 
 
 
      
##################################################################