Subversion Repositories SmartDukaan

Rev

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

Rev 14322 Rev 14323
Line 286... Line 286...
286
            temp.append(temp_map)
286
            temp.append(temp_map)
287
            brandPrefMap[(x.brand).strip().upper()] = temp
287
            brandPrefMap[(x.brand).strip().upper()] = temp
288
        
288
        
289
    for x in session.query(user_actions).filter_by(user_id=userId).all():
289
    for x in session.query(user_actions).filter_by(user_id=userId).all():
290
        actionsMap[x.store_product_id] = 1 if x.action == 'like' else 0
290
        actionsMap[x.store_product_id] = 1 if x.action == 'like' else 0
291
    all_deals = list(get_mongo_connection().Catalog.Deals.find({"$and":outer_query},{'_id':1,'category_id':1,'brand':1,'totalPoints':1,'bestSellerPoints':1,'nlcPoints':1,'rank':1,'available_price':1}).sort([('totalPoints',pymongo.DESCENDING),('bestSellerPoints',pymongo.DESCENDING),('nlcPoints',pymongo.DESCENDING),('rank',pymongo.DESCENDING)]))
291
    all_deals = list(get_mongo_connection().Catalog.Deals.find({"$and":outer_query},{'_id':1,'category_id':1,'brand':1,'totalPoints':1,'bestSellerPoints':1,'nlcPoints':1,'rank':1,'available_price':1,'dealType':1,'source_id':1}).sort([('totalPoints',pymongo.DESCENDING),('bestSellerPoints',pymongo.DESCENDING),('nlcPoints',pymongo.DESCENDING),('rank',pymongo.DESCENDING)]))
292
    all_category_deals = []
292
    all_category_deals = []
293
    mobile_deals = []
293
    mobile_deals = []
294
    tablet_deals = []
294
    tablet_deals = []
295
    for deal in all_deals:
295
    for deal in all_deals:
296
        if actionsMap.get(deal['_id']) == 0:
296
        if actionsMap.get(deal['_id']) == 0: