Subversion Repositories SmartDukaan

Rev

Rev 14323 | Rev 14393 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14323 Rev 14353
Line 185... Line 185...
185
    if window==None:
185
    if window==None:
186
        window = 50
186
        window = 50
187
    result = {}
187
    result = {}
188
    skip = (page-1)*window
188
    skip = (page-1)*window
189
    
189
    
-
 
190
    if userId is not None:
190
    searchMap['userId'] = userId
191
        searchMap['userId'] = userId
191
    collection = get_mongo_connection().Dtr.merchantOrder
192
    collection = get_mongo_connection().Dtr.merchantOrder
192
    cursor = collection.find(searchMap).sort("_id",-1)
193
    cursor = collection.find(searchMap).sort("_id",-1)
193
    total_count = cursor.count()
194
    total_count = cursor.count()
194
    pages = total_count/window + (0 if total_count%window==0 else 1)  
195
    pages = total_count/window + (0 if total_count%window==0 else 1)  
195
    print "total_count", total_count
196
    print "total_count", total_count