| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #---------------------------------------------------------------------  | 
| #  | 
| #---------------------------------------------------------------------  | 
| ##@package GMT_GetPlayerFuncInfo  | 
| # GMÃüÁîÌṩ²éÑ¯Íæ¼Ò¹¦ÄÜÐÅÏ¢  | 
| #  | 
| # @author xdh  | 
| # @date 2017-07-13 10:00  | 
| # @version 1.0  | 
| #  | 
| # @note  | 
| #---------------------------------------------------------------------  | 
| """Version = 2017-07-13 10:00"""  | 
| #---------------------------------------------------------------------  | 
| #µ¼Èë  | 
| import GMCommon  | 
| from MangoDBCommon import fix_incomingText  | 
| #---------------------------------------------------------------------  | 
| #È«¾Ö±äÁ¿  | 
|   | 
| #---------------------------------------------------------------------  | 
|   | 
| ## ÊÕµ½gmÃüÁîÖ´ÐÐ  | 
| # @param gmCmdDict:gmÃüÁî×Öµä  | 
| # @return None   | 
| def OnExec(gmCmdDict):  | 
|     playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, '')  | 
|     queryType = gmCmdDict.get(GMCommon.Def_GMKey_QueryType, '')  | 
|     queryFuncKey = gmCmdDict.get(GMCommon.Def_GMKey_FuncKey, '')  | 
|     if queryFuncKey in ['HHZL','ManorWar','FamilysWar']:  | 
|         return GMCommon.Def_SendToGameServer, ''  | 
|       | 
|     elif playerFind == '':  | 
|         return GMCommon.Def_ParamErr, ''  | 
|       | 
|     elif queryType == 'accID':  | 
|         return GMCommon.Def_DoQueryLogDB, ''  | 
|      | 
|     return GMCommon.Def_DoQueryUserDB, '%s'%GMCommon.Def_GMKey_PlayerName  | 
|       | 
|       | 
| ## ²éѯlogdb·µ»Ø  | 
| # @param logdb:logdb  | 
| # @param data:´«ÈëµÄÐÅÏ¢  | 
| # @param gmCmdDict:gmÃüÁî×Öµä  | 
| # @return None   | 
| def LogDBResponse(logdb, data, gmCmdDict):  | 
|     playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, '')  | 
|     queryType = gmCmdDict.get(GMCommon.Def_GMKey_QueryType, '')  | 
|       | 
|     if queryType == 'accID' and GMCommon.GetPlayerOnLineByAccID(logdb, playerFind):  | 
|         return GMCommon.Def_SendToGameServer, ''  | 
|     | 
|     # ×ª»»×Ö·û´®  | 
|     if data != '' and GMCommon.GetPlayerOnLineByAccID(logdb, data):          | 
|         return GMCommon.Def_SendToGameServer, ''  | 
|           | 
|     return GMCommon.Def_PlayerOfLine, ''  | 
|   | 
|   | 
| ## ²éѯuserdb·µ»Ø  | 
| # @param userdb:userdb  | 
| # @param data:´«ÈëµÄÐÅÏ¢  | 
| # @param gmCmdDict:gmÃüÁî×Öµä  | 
| # @return None   | 
| def UserDBResponse(userdb, data, gmCmdDict):  | 
|     queryType = gmCmdDict.get(GMCommon.Def_GMKey_QueryType, '')  | 
|     playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, '')  | 
|       | 
|     playerAccID = ""  | 
|     # Íæ¼ÒÐÕÃû  | 
|     if queryType == GMCommon.Def_GMKey_PlayerName:  | 
|         playerAccID = GMCommon.GetPlayerAccID(userdb, {'PlayerName':fix_incomingText(playerFind), 'IsDeleted':0})  | 
|       | 
|     elif queryType == GMCommon.Def_GMKey_PlayerAccID:  | 
|         playerAccID = GMCommon.GetPlayerAccID(userdb, {'AccID':fix_incomingText(playerFind), 'IsDeleted':0})  | 
|       | 
|     if playerAccID == '':  | 
|         return GMCommon.Def_NoTag, ''  | 
|   | 
|     return GMCommon.Def_DoQueryLogDB, playerAccID  | 
|   | 
|   | 
|   | 
|   | 
|   |