| Line 27... |
Line 27... |
| 27 |
add_authorization_log_for_item, get_thrift_item_list, get_all_brands, \
|
27 |
add_authorization_log_for_item, get_thrift_item_list, get_all_brands, \
|
| 28 |
get_coming_soon, get_coming_soon_catalog_ids, get_coming_soon_count, initialize, \
|
28 |
get_coming_soon, get_coming_soon_catalog_ids, get_coming_soon_count, initialize, \
|
| 29 |
get_clearance_sale_catalog_ids, add_update_voucher_for_item, \
|
29 |
get_clearance_sale_catalog_ids, add_update_voucher_for_item, \
|
| 30 |
delete_voucher_for_item, get_voucher_amount, get_all_vouchers_for_item, \
|
30 |
delete_voucher_for_item, get_voucher_amount, get_all_vouchers_for_item, \
|
| 31 |
is_valid_catalog_id, check_risky_item, get_vat_percentage_for_item, \
|
31 |
is_valid_catalog_id, check_risky_item, get_vat_percentage_for_item, \
|
| 32 |
get_vat_amount_for_item, add_tag,get_all_tags,get_all_entities_by_tag_name,delete_tag,delete_entity_tag
|
32 |
get_vat_amount_for_item, add_tag, get_all_tags, get_all_entities_by_tag_name, \
|
| - |
|
33 |
delete_tag, delete_entity_tag, get_all_ignored_inventoryupdate_items_list
|
| 33 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status
|
34 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status
|
| 34 |
from shop2020.utils.Utils import log_entry, to_py_date
|
35 |
from shop2020.utils.Utils import log_entry, to_py_date
|
| 35 |
import datetime
|
36 |
import datetime
|
| 36 |
|
37 |
|
| 37 |
class CatalogServiceHandler:
|
38 |
class CatalogServiceHandler:
|
| Line 842... |
Line 843... |
| 842 |
"""
|
843 |
"""
|
| 843 |
try:
|
844 |
try:
|
| 844 |
return check_risky_item(itemId)
|
845 |
return check_risky_item(itemId)
|
| 845 |
finally:
|
846 |
finally:
|
| 846 |
close_session()
|
847 |
close_session()
|
| - |
|
848 |
|
| - |
|
849 |
def getAllIgnoredInventoryUpdateItemsList(self,offset, limit):
|
| - |
|
850 |
try:
|
| - |
|
851 |
return get_all_ignored_inventoryupdate_items_list(offset,limit)
|
| - |
|
852 |
finally:
|
| - |
|
853 |
close_session
|
| 847 |
|
854 |
|
| 848 |
def is_valid(item):
|
855 |
def is_valid(item):
|
| 849 |
if item.status in [status.ACTIVE, status.PAUSED, status.PAUSED_BY_RISK]:
|
856 |
if item.status in [status.ACTIVE, status.PAUSED, status.PAUSED_BY_RISK]:
|
| 850 |
if item.startDate:
|
857 |
if item.startDate:
|
| 851 |
return not(datetime.datetime.now() < item.startDate or item.sellingPrice == 0)
|
858 |
return not(datetime.datetime.now() < item.startDate or item.sellingPrice == 0)
|