Subversion Repositories SmartDukaan

Rev

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

Rev 17281 Rev 17302
Line 1696... Line 1696...
1696
    session.commit()
1696
    session.commit()
1697
    campaignId = notificationCampaign.id
1697
    campaignId = notificationCampaign.id
1698
    
1698
    
1699
    session.close()
1699
    session.close()
1700
    return campaignId
1700
    return campaignId
-
 
1701
 
-
 
1702
def getDummyDeals(categoryId, offset, limit):
-
 
1703
    outer_query = []
-
 
1704
    outer_query.append({"showDeal":1})
-
 
1705
    outer_query.append({"category_id":categoryId})
-
 
1706
    query = {}
-
 
1707
    query['$gt'] = -100
-
 
1708
    outer_query.append({'totalPoints':query})
-
 
1709
    all_deals = list(get_mongo_connection().Catalog.Deals.find({"$and":outer_query},{'_id':1}).sort([('totalPoints',pymongo.DESCENDING),('bestSellerPoints',pymongo.DESCENDING),('nlcPoints',pymongo.DESCENDING),('rank',pymongo.DESCENDING)]).skip(offset).limit(limit))
-
 
1710
    returnObj = []
-
 
1711
    for deal in all_deals:
-
 
1712
        item = get_mongo_connection().Catalog.MasterData.find({'_id':deal['_id']})
-
 
1713
        returnObj.append(getItemObjForStaticDeals(item))
-
 
1714
    return returnObj
1701
      
1715
      
1702
def main():
1716
def main():
1703
    #generateRedirectUrl(101,1)
1717
    #generateRedirectUrl(101,1)
1704
    print (getCashBackDetails('1351153', 3))
1718
    print (getCashBackDetails('1351153', 3))
1705
    #print addPayout("10", "55db82c0bcabd7fc59e0a71")
1719
    #print addPayout("10", "55db82c0bcabd7fc59e0a71")