| Line 12... |
Line 12... |
| 12 |
delete_discounts_from_cart, save_discounts, show_cod_option, insure_item, \
|
12 |
delete_discounts_from_cart, save_discounts, show_cod_option, insure_item, \
|
| 13 |
cancel_insurance, store_insurance_specific_details, is_insurance_detail_present, \
|
13 |
cancel_insurance, store_insurance_specific_details, is_insurance_detail_present, \
|
| 14 |
add_store_to_cart, get_products_added_to_cart, validate_cart_plus
|
14 |
add_store_to_cart, get_products_added_to_cart, validate_cart_plus
|
| 15 |
from shop2020.model.v1.user.impl.Converters import to_t_user, to_t_cart, \
|
15 |
from shop2020.model.v1.user.impl.Converters import to_t_user, to_t_cart, \
|
| 16 |
to_t_address, to_t_user_communication, to_t_master_affiliate, to_t_affiliate, \
|
16 |
to_t_address, to_t_user_communication, to_t_master_affiliate, to_t_affiliate, \
|
| 17 |
to_t_tracker, to_t_track_log, to_t_private_deal
|
17 |
to_t_tracker, to_t_track_log, to_t_private_deal, to_t_counter
|
| 18 |
from shop2020.model.v1.user.impl.Dataservice import UserWidgetItem
|
18 |
from shop2020.model.v1.user.impl.Dataservice import UserWidgetItem
|
| 19 |
from shop2020.model.v1.user.impl.UserDataAccessors import create_user, \
|
19 |
from shop2020.model.v1.user.impl.UserDataAccessors import create_user, \
|
| 20 |
update_user, get_user_by_id, get_user_by_email, update_password, \
|
20 |
update_user, get_user_by_id, get_user_by_email, update_password, \
|
| 21 |
set_user_as_logged_out, set_user_as_logged_in, remove_address_for_user, \
|
21 |
set_user_as_logged_out, set_user_as_logged_in, remove_address_for_user, \
|
| 22 |
add_address_for_user, authenticate_user, user_exists, initialize, \
|
22 |
add_address_for_user, authenticate_user, user_exists, initialize, \
|
| Line 31... |
Line 31... |
| 31 |
get_all_master_affiliates, get_my_research_items, get_browse_history_items, \
|
31 |
get_all_master_affiliates, get_my_research_items, get_browse_history_items, \
|
| 32 |
update_my_research, delete_item_from_my_research, update_browse_history, \
|
32 |
update_my_research, delete_item_from_my_research, update_browse_history, \
|
| 33 |
get_user_by_mobile_number, is_alive, increase_trust_level, get_user_by_cart_id, \
|
33 |
get_user_by_mobile_number, is_alive, increase_trust_level, get_user_by_cart_id, \
|
| 34 |
get_trust_level, remove_user_communication, get_user_emails, \
|
34 |
get_trust_level, remove_user_communication, get_user_emails, \
|
| 35 |
is_private_deal_user, add_private_deal_user, change_private_deal_user_status, \
|
35 |
is_private_deal_user, add_private_deal_user, change_private_deal_user_status, \
|
| 36 |
get_private_deal_user, register_counter
|
36 |
get_private_deal_user, register_counter, search_counter, \
|
| - |
|
37 |
get_all_users_by_counter
|
| 37 |
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
|
38 |
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
|
| 38 |
from shop2020.utils.Utils import log_entry, to_py_date
|
39 |
from shop2020.utils.Utils import log_entry, to_py_date
|
| 39 |
|
40 |
|
| 40 |
|
41 |
|
| 41 |
|
42 |
|
| Line 890... |
Line 891... |
| 890 |
def registerCounter(self, tCounter, userId):
|
891 |
def registerCounter(self, tCounter, userId):
|
| 891 |
try:
|
892 |
try:
|
| 892 |
return register_counter(tCounter, userId)
|
893 |
return register_counter(tCounter, userId)
|
| 893 |
finally:
|
894 |
finally:
|
| 894 |
self.closeSession()
|
895 |
self.closeSession()
|
| - |
|
896 |
|
| - |
|
897 |
def searchCounter(self, type1, searchString):
|
| - |
|
898 |
try:
|
| - |
|
899 |
return [to_t_counter(counter) for counter in search_counter(type1, searchString)]
|
| - |
|
900 |
finally:
|
| - |
|
901 |
self.closeSession()
|
| - |
|
902 |
|
| - |
|
903 |
def getAllUsersByCounter(self, counterid):
|
| 895 |
|
904 |
try:
|
| - |
|
905 |
return [to_t_user(user) for user in get_all_users_by_counter(counterid)]
|
| - |
|
906 |
finally:
|
| - |
|
907 |
self.closeSession()
|
| 896 |
def isAlive(self, ):
|
908 |
def isAlive(self, ):
|
| 897 |
"""
|
909 |
"""
|
| 898 |
For checking weather service is active alive or not. It also checks connectivity with database
|
910 |
For checking weather service is active alive or not. It also checks connectivity with database
|
| 899 |
"""
|
911 |
"""
|
| 900 |
try:
|
912 |
try:
|
| 901 |
return is_alive()
|
913 |
return is_alive()
|
| 902 |
finally:
|
914 |
finally:
|
| 903 |
self.closeSession()
|
- |
|
| 904 |
|
- |
|
| 905 |
|
- |
|
| 906 |
|
915 |
self.closeSession()
|
| - |
|
916 |
|
| 907 |
|
917 |
|