| Line 12... |
Line 12... |
| 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, \
|
| 15 |
to_t_amazonoutofsync, to_t_private_deals_comparison, \
|
15 |
to_t_amazonoutofsync, to_t_private_deals_comparison, \
|
| 16 |
to_t_snapdeal_marketplace_item, to_t_flipkart_marketplace_item, \
|
16 |
to_t_snapdeal_marketplace_item, to_t_flipkart_marketplace_item, \
|
| 17 |
to_t_competitor_pricing, to_t_amazon_promotion, to_t_Amazonlisted_promo
|
17 |
to_t_competitor_pricing, to_t_amazon_promotion, to_t_Amazonlisted_promo, \
|
| - |
|
18 |
to_t_hsItem
|
| 18 |
from shop2020.model.v1.catalog.impl.DataAcessors import add_item, retire_item, \
|
19 |
from shop2020.model.v1.catalog.impl.DataAcessors import add_item, retire_item, \
|
| 19 |
change_item_status, get_item, get_all_items, get_all_items_by_status, \
|
20 |
change_item_status, get_item, get_all_items, get_all_items_by_status, \
|
| 20 |
update_item, start_item_on, close_session, retire_item_on, \
|
21 |
update_item, start_item_on, close_session, retire_item_on, \
|
| 21 |
get_items_by_catalog_id, get_best_deals, get_best_deals_catalog_ids, \
|
22 |
get_items_by_catalog_id, get_best_deals, get_best_deals_catalog_ids, \
|
| 22 |
get_best_deals_count, get_best_sellers, get_latest_arrivals, \
|
23 |
get_best_deals_count, get_best_sellers, get_latest_arrivals, \
|
| Line 77... |
Line 78... |
| 77 |
get_all_flipkart_marketplaceItem, add_competitor_scraping, \
|
78 |
get_all_flipkart_marketplaceItem, add_competitor_scraping, \
|
| 78 |
get_previous_competitor_scraping, get_upload_result_by_id, add_amazon_promotion, \
|
79 |
get_previous_competitor_scraping, get_upload_result_by_id, add_amazon_promotion, \
|
| 79 |
get_amazon_promotion, update_amazon_promotion, get_vat_rates, \
|
80 |
get_amazon_promotion, update_amazon_promotion, get_vat_rates, \
|
| 80 |
update_item_state_vat, mark_partially_active, get_ex_affiliate_item_info, \
|
81 |
update_item_state_vat, mark_partially_active, get_ex_affiliate_item_info, \
|
| 81 |
get_all_items_to_list_on_fbg, get_all_fbg_listed_items, check_services, \
|
82 |
get_all_items_to_list_on_fbg, get_all_fbg_listed_items, check_services, \
|
| 82 |
get_items
|
83 |
get_items, add_hs_item, get_hs_item, update_hs_item
|
| 83 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status, \
|
84 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status, \
|
| 84 |
CatalogServiceException
|
85 |
CatalogServiceException
|
| 85 |
from shop2020.utils.Utils import log_entry, to_py_date
|
86 |
from shop2020.utils.Utils import log_entry, to_py_date
|
| 86 |
import datetime
|
87 |
import datetime
|
| 87 |
|
88 |
|
| Line 1615... |
Line 1616... |
| 1615 |
def getAllPrivateDealsComparison(self):
|
1616 |
def getAllPrivateDealsComparison(self):
|
| 1616 |
try:
|
1617 |
try:
|
| 1617 |
return [to_t_private_deals_comparison(item) for item in get_all_private_deals_comparison()]
|
1618 |
return [to_t_private_deals_comparison(item) for item in get_all_private_deals_comparison()]
|
| 1618 |
finally:
|
1619 |
finally:
|
| 1619 |
close_session()
|
1620 |
close_session()
|
| - |
|
1621 |
|
| - |
|
1622 |
'''
|
| - |
|
1623 |
def getAllDealTags(self):
|
| - |
|
1624 |
try:
|
| - |
|
1625 |
return [to_t_deal_tag(dealTag) for dealTag in get_all_deal_tags()]
|
| - |
|
1626 |
finally:
|
| - |
|
1627 |
close_session()
|
| - |
|
1628 |
|
| - |
|
1629 |
def addUpdateItemTag(self, itemTag, makeStatusInactive):
|
| - |
|
1630 |
log_entry(self, "addItemTag called")
|
| - |
|
1631 |
try:
|
| - |
|
1632 |
return add_update_item_tag(itemTag, makeStatusInactive)
|
| - |
|
1633 |
finally:
|
| - |
|
1634 |
close_session()
|
| - |
|
1635 |
|
| - |
|
1636 |
def getAllItemTagsByItemId(self, itemId):
|
| - |
|
1637 |
log_entry(self, "get all Item tag called")
|
| - |
|
1638 |
try:
|
| - |
|
1639 |
ret_tags = []
|
| - |
|
1640 |
tags = get_all_item_tags_by_item_id(itemId)
|
| - |
|
1641 |
if tags:
|
| - |
|
1642 |
for tag in tags:
|
| - |
|
1643 |
if tag:
|
| - |
|
1644 |
ret_tags.append(to_t_item_tag(tag))
|
| - |
|
1645 |
return ret_tags
|
| - |
|
1646 |
finally:
|
| - |
|
1647 |
close_session()
|
| - |
|
1648 |
'''
|
| 1620 |
|
1649 |
|
| 1621 |
def getAllSnapdealMarketplaceItem(self):
|
1650 |
def getAllSnapdealMarketplaceItem(self):
|
| 1622 |
try:
|
1651 |
try:
|
| 1623 |
return [to_t_snapdeal_marketplace_item(item) for item in get_all_snapdeal_marketplaceItem()]
|
1652 |
return [to_t_snapdeal_marketplace_item(item) for item in get_all_snapdeal_marketplaceItem()]
|
| 1624 |
finally:
|
1653 |
finally:
|
| Line 1719... |
Line 1748... |
| 1719 |
map_lines = check_services(map_lines)
|
1748 |
map_lines = check_services(map_lines)
|
| 1720 |
return map_lines
|
1749 |
return map_lines
|
| 1721 |
finally:
|
1750 |
finally:
|
| 1722 |
close_session()
|
1751 |
close_session()
|
| 1723 |
|
1752 |
|
| - |
|
1753 |
def addHsItem(self, hsItems):
|
| 1724 |
|
1754 |
try:
|
| - |
|
1755 |
add_hs_item(hsItems)
|
| - |
|
1756 |
finally:
|
| - |
|
1757 |
close_session()
|
| - |
|
1758 |
|
| - |
|
1759 |
def getHsItem(self, hsItemId):
|
| - |
|
1760 |
try:
|
| - |
|
1761 |
return to_t_hsItem(get_hs_item(hsItemId))
|
| - |
|
1762 |
finally:
|
| - |
|
1763 |
close_session()
|
| - |
|
1764 |
|
| - |
|
1765 |
def updateHsItem(self, hsItem):
|
| - |
|
1766 |
try:
|
| - |
|
1767 |
update_hs_item(hsItem)
|
| - |
|
1768 |
finally:
|
| - |
|
1769 |
close_session()
|
| 1725 |
|
1770 |
|
| 1726 |
if __name__ == '__main__':
|
1771 |
if __name__ == '__main__':
|
| 1727 |
items = get_all_alive_items()
|
1772 |
items = get_all_alive_items()
|
| 1728 |
ret_items = []
|
1773 |
ret_items = []
|
| 1729 |
for item in items:
|
1774 |
for item in items:
|