Subversion Repositories SmartDukaan

Rev

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

Rev 9724 Rev 9776
Line 17... Line 17...
17
    Category, EntityIDGenerator, SimilarItems, ProductNotification, Source, \
17
    Category, EntityIDGenerator, SimilarItems, ProductNotification, Source, \
18
    SourceItemPricing, AuthorizationLog, VoucherItemMapping, CategoryVatMaster, \
18
    SourceItemPricing, AuthorizationLog, VoucherItemMapping, CategoryVatMaster, \
19
    OOSTracker, EntityTag, ItemInsurerMapping, Insurer, Banner, BannerMap, \
19
    OOSTracker, EntityTag, ItemInsurerMapping, Insurer, Banner, BannerMap, \
20
    FreebieItem, BrandInfo, Amazonlisted, StorePricing, ItemVatMaster, \
20
    FreebieItem, BrandInfo, Amazonlisted, StorePricing, ItemVatMaster, \
21
    PageViewEvents, CartEvents, EbayItem, BannerUriMapping, Campaign, SnapdealItem, \
21
    PageViewEvents, CartEvents, EbayItem, BannerUriMapping, Campaign, SnapdealItem, \
22
    SnapdealItemUpdateHistory, ProductFeedSubmit, MarketplaceItems
22
    SnapdealItemUpdateHistory, ProductFeedSubmit, MarketplaceItems, MarketPlaceItemPrice
23
from shop2020.thriftpy.model.v1.catalog.ttypes import status, ItemShippingInfo, \
23
from shop2020.thriftpy.model.v1.catalog.ttypes import status, ItemShippingInfo, \
24
    ItemType, PremiumType, FreebieItem as t_FreebieItem, \
24
    ItemType, PremiumType, FreebieItem as t_FreebieItem, \
25
    StorePricing as tStorePricing, CatalogServiceException, \
25
    StorePricing as tStorePricing, CatalogServiceException, \
26
    BannerType, InsurerType
26
    BannerType, InsurerType
27
from shop2020.thriftpy.model.v1.inventory.ttypes import \
27
from shop2020.thriftpy.model.v1.inventory.ttypes import \
Line 2309... Line 2309...
2309
        return True
2309
        return True
2310
    except Exception as ex:
2310
    except Exception as ex:
2311
        print ex
2311
        print ex
2312
        return False
2312
        return False
2313
    
2313
    
2314
    
-
 
2315
    
-
 
-
 
2314
def get_all_marketplace_items_for_priceupdate(source):
-
 
2315
    marketPlaceItemsPrices = MarketPlaceItemPrice.query.filter(MarketPlaceItemPrice.source == source).filter(MarketPlaceItemPrice.lastUpdatedOn > MarketPlaceItemPrice.lastUpdatedOnMarketplace).all()
2316
    
2316
    print marketPlaceItemsPrices 
2317
    
2317
    return marketPlaceItemsPrices
2318
 
2318
 
-
 
2319
def update_marketplace_priceupdate_status(skuList,timestamp):    
-
 
2320
    for sku in skuList:
-
 
2321
            item = MarketPlaceItemPrice.get_by(item_id=sku)
-
 
2322
            if item is not None:
-
 
2323
                item.lastUpdatedOnMarketplace = to_py_date(timestamp)
2319
    
2324
    session.commit()
2320
 
-