Subversion Repositories SmartDukaan

Rev

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

Rev 11653 Rev 11905
Line 9... Line 9...
9
    to_t_banner_map, to_t_product_notification_request_count, \
9
    to_t_banner_map, to_t_product_notification_request_count, \
10
    to_t_voucher_item_mapping, to_t_insurer, to_t_Amazonlisted, to_t_ebay_item, \
10
    to_t_voucher_item_mapping, to_t_insurer, to_t_Amazonlisted, to_t_ebay_item, \
11
    to_t_uri_mapping, to_t_banner_list, to_t_campaign, to_t_snapdeal_item, \
11
    to_t_uri_mapping, to_t_banner_list, to_t_campaign, to_t_snapdeal_item, \
12
    to_t_snapdeal_item_details, to_t_product_feed_submit, to_t_marketplace_items, \
12
    to_t_snapdeal_item_details, to_t_product_feed_submit, to_t_marketplace_items, \
13
    to_t_marketplace_itemprice, to_t_marketplacepercentage, to_t_flipkart_item, \
13
    to_t_marketplace_itemprice, to_t_marketplacepercentage, to_t_flipkart_item, \
14
    to_t_flipkart_item_details, to_t_market_place_history, to_t_private_deal
14
    to_t_flipkart_item_details, to_t_market_place_history, to_t_private_deal,to_t_amazonoutofsync, \
-
 
15
    to_t_private_deals_comparison
15
from shop2020.model.v1.catalog.impl.DataAcessors import add_item, retire_item, \
16
from shop2020.model.v1.catalog.impl.DataAcessors import add_item, retire_item, \
16
    change_item_status, get_item, get_all_items, get_all_items_by_status, \
17
    change_item_status, get_item, get_all_items, get_all_items_by_status, \
17
    update_item, start_item_on, close_session, retire_item_on, \
18
    update_item, start_item_on, close_session, retire_item_on, \
18
    get_items_by_catalog_id, get_best_deals, get_best_deals_catalog_ids, \
19
    get_items_by_catalog_id, get_best_deals, get_best_deals_catalog_ids, \
19
    get_best_deals_count, get_best_sellers, get_latest_arrivals, \
20
    get_best_deals_count, get_best_sellers, get_latest_arrivals, \
Line 67... Line 68...
67
    get_flipkart_item_by_sku_at_flipkart, get_marketplace_history, \
68
    get_flipkart_item_by_sku_at_flipkart, get_marketplace_history, \
68
    get_all_fbb_listed_items, get_count_for_marketplaceHistory, \
69
    get_all_fbb_listed_items, get_count_for_marketplaceHistory, \
69
    get_marketplace_history_by_date, get_all_fbb_pricing_items, \
70
    get_marketplace_history_by_date, get_all_fbb_pricing_items, \
70
    get_private_deal_details, get_private_deal_items, add_or_update_private_deal, \
71
    get_private_deal_details, get_private_deal_items, add_or_update_private_deal, \
71
    get_all_active_private_deals, get_private_deals_catalog_ids, \
72
    get_all_active_private_deals, get_private_deals_catalog_ids, \
72
    get_private_deals_count
73
    get_private_deals_count,get_amazon_out_of_sync,get_all_private_deals_comparison
73
from shop2020.thriftpy.model.v1.catalog.ttypes import status
74
from shop2020.thriftpy.model.v1.catalog.ttypes import status
74
from shop2020.utils.Utils import log_entry, to_py_date
75
from shop2020.utils.Utils import log_entry, to_py_date
75
import datetime
76
import datetime
76
 
77
 
77
class CatalogServiceHandler:
78
class CatalogServiceHandler:
Line 1582... Line 1583...
1582
    def getPrivateDealsCount(self,):
1583
    def getPrivateDealsCount(self,):
1583
        try:
1584
        try:
1584
            return get_private_deals_count()
1585
            return get_private_deals_count()
1585
        finally:
1586
        finally:
1586
            close_session()
1587
            close_session()
-
 
1588
    
-
 
1589
    def getAmazonOutSyncItems(self,item_id):
-
 
1590
        try:
-
 
1591
            return to_t_amazonoutofsync(get_amazon_out_of_sync(item_id))
-
 
1592
        finally:
-
 
1593
            close_session()
-
 
1594
    
-
 
1595
    def getAllPrivateDealsComparison(self):
-
 
1596
        try:
-
 
1597
            return [to_t_private_deals_comparison(item) for item in get_all_private_deals_comparison()]
-
 
1598
        finally:
-
 
1599
            close_session()
1587
                
1600
                
1588
    
1601
    
1589
if __name__ == '__main__':
1602
if __name__ == '__main__':
1590
    items = get_all_alive_items()
1603
    items = get_all_alive_items()
1591
    ret_items = []
1604
    ret_items = []