|  |  | 
 |  |  |     if billType != None:
 | 
 |  |  |         billBoardType = billType
 | 
 |  |  |     
 | 
 |  |  |     topNum = GameWorld.ToIntDef(gmCmdDict.get('topNum', ''), 10)
 | 
 |  |  |     queryCount = GameWorld.ToIntDef(gmCmdDict.get('queryCount', ''), 10)
 | 
 |  |  |     startRank = GameWorld.ToIntDef(gmCmdDict.get('startRank', ''), 1)
 | 
 |  |  |     startRank = max(1, startRank)
 | 
 |  |  |     
 | 
 |  |  |     if billBoardType == None:
 | 
 |  |  |         GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_TypeNumErr)
 | 
 |  |  | 
 |  |  |     if not billBoard:
 | 
 |  |  |         GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_TypeNumErr)
 | 
 |  |  |         return False
 | 
 |  |  | 
 | 
 |  |  |     billBoardInfo = []
 | 
 |  |  |     
 | 
 |  |  |     for index in range(0, billBoard.GetCount()):
 | 
 |  |  |          | 
 |  |  |         if index >= topNum:
 | 
 |  |  |     dataTotal = billBoard.GetCount()
 | 
 |  |  |     fromIndex = startRank - 1
 | 
 |  |  |     toIndex = fromIndex + queryCount
 | 
 |  |  |     billBoardInfo = []
 | 
 |  |  |     for index in xrange(fromIndex, toIndex):
 | 
 |  |  |         if index >= dataTotal:
 | 
 |  |  |             break
 | 
 |  |  |         
 | 
 |  |  |         billBoardData = billBoard.At(index)
 | 
 |  |  |         if not billBoardData:
 | 
 |  |  |             continue
 | 
 |  |  |         
 | 
 |  |  |         rank = index + 1
 | 
 |  |  |         billBoardDict = {
 | 
 |  |  |                         "Rank":rank,
 | 
 |  |  |                         "ID":billBoardData.GetID(),
 | 
 |  |  |                         "ID2":billBoardData.GetID2(),
 | 
 |  |  |                         "Name1":billBoardData.GetName1(),
 | 
 |  |  | 
 |  |  |                         "Type2":billBoardData.GetType2(),
 | 
 |  |  |                         "Value1":billBoardData.GetValue1(),
 | 
 |  |  |                         "Value2":billBoardData.GetValue2(),
 | 
 |  |  |                         "Value3":billBoardData.GetValue3(),
 | 
 |  |  |                         "Value4":billBoardData.GetValue4(),
 | 
 |  |  |                         "Value5":billBoardData.GetValue5(),
 | 
 |  |  |                         "Value6":billBoardData.GetValue6(),
 | 
 |  |  |                         "Value7":billBoardData.GetValue7(),
 | 
 |  |  |                         "Value8":billBoardData.GetValue8(),
 | 
 |  |  |                         "CmpValue":billBoardData.GetCmpValue(),
 | 
 |  |  |                         "CmpValue2":billBoardData.GetCmpValue2(),
 | 
 |  |  |                         "CmpValue3":billBoardData.GetCmpValue3(),
 | 
 |  |  |                         "UserData":billBoardData.GetUserData(),
 | 
 |  |  |                          }
 | 
 |  |  |         
 | 
 |  |  |         billBoardInfo.append(billBoardDict)
 | 
 |  |  | 
 |  |  |         GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_MaxLimit)   
 | 
 |  |  |         return
 | 
 |  |  |     
 | 
 |  |  |     backMsg = {"BillBoardType":billBoardType, "BillBoardInfo":billBoardInfo}
 | 
 |  |  |     backMsg = {"BillBoardType":billBoardType, "BillBoardInfo":billBoardInfo, "dataTotal":dataTotal}
 | 
 |  |  |     #执行成功
 | 
 |  |  |     GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success, backMsg)        
 | 
 |  |  |     return
 |