Subversion Repositories SmartDukaan

Rev

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

Rev 15040 Rev 15041
Line 359... Line 359...
359
            temp.append(temp_map)
359
            temp.append(temp_map)
360
            brandPrefMap[(x.brand).strip().upper()] = temp
360
            brandPrefMap[(x.brand).strip().upper()] = temp
361
        
361
        
362
    for x in session.query(user_actions).filter_by(user_id=userId).all():
362
    for x in session.query(user_actions).filter_by(user_id=userId).all():
363
        actionsMap[x.store_product_id] = 1 if x.action == 'like' else 0
363
        actionsMap[x.store_product_id] = 1 if x.action == 'like' else 0
364
    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,'brand_id':1}).sort([('totalPoints',pymongo.DESCENDING),('bestSellerPoints',pymongo.DESCENDING),('nlcPoints',pymongo.DESCENDING),('rank',pymongo.DESCENDING)]))
364
    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)]))
365
    all_category_deals = []
365
    all_category_deals = []
366
    mobile_deals = []
366
    mobile_deals = []
367
    tablet_deals = []
367
    tablet_deals = []
368
    for deal in all_deals:
368
    for deal in all_deals:
369
        if actionsMap.get(deal['_id']) == 0:
369
        if actionsMap.get(deal['_id']) == 0: