| Line 11... |
Line 11... |
| 11 |
delete_discounts_from_cart, save_discounts, show_cod_option, insure_item, \
|
11 |
delete_discounts_from_cart, save_discounts, show_cod_option, insure_item, \
|
| 12 |
cancel_insurance, store_insurance_specific_details, is_insurance_detail_present, \
|
12 |
cancel_insurance, store_insurance_specific_details, is_insurance_detail_present, \
|
| 13 |
add_store_to_cart, get_products_added_to_cart, validate_cart_plus
|
13 |
add_store_to_cart, get_products_added_to_cart, validate_cart_plus
|
| 14 |
from shop2020.model.v1.user.impl.Converters import to_t_user, to_t_cart, \
|
14 |
from shop2020.model.v1.user.impl.Converters import to_t_user, to_t_cart, \
|
| 15 |
to_t_address, to_t_user_communication, to_t_master_affiliate, to_t_affiliate, \
|
15 |
to_t_address, to_t_user_communication, to_t_master_affiliate, to_t_affiliate, \
|
| 16 |
to_t_tracker, to_t_track_log
|
16 |
to_t_tracker, to_t_track_log,to_t_private_deal
|
| 17 |
from shop2020.model.v1.user.impl.Dataservice import UserWidgetItem
|
17 |
from shop2020.model.v1.user.impl.Dataservice import UserWidgetItem
|
| 18 |
from shop2020.model.v1.user.impl.UserDataAccessors import create_user, \
|
18 |
from shop2020.model.v1.user.impl.UserDataAccessors import create_user, \
|
| 19 |
update_user, get_user_by_id, get_user_by_email, update_password, \
|
19 |
update_user, get_user_by_id, get_user_by_email, update_password, \
|
| 20 |
set_user_as_logged_out, set_user_as_logged_in, remove_address_for_user, \
|
20 |
set_user_as_logged_out, set_user_as_logged_in, remove_address_for_user, \
|
| 21 |
add_address_for_user, authenticate_user, user_exists, initialize, \
|
21 |
add_address_for_user, authenticate_user, user_exists, initialize, \
|
| Line 29... |
Line 29... |
| 29 |
get_master_affiliate_by_name, get_affiliates_by_master_affiliate, \
|
29 |
get_master_affiliate_by_name, get_affiliates_by_master_affiliate, \
|
| 30 |
get_all_master_affiliates, get_my_research_items, get_browse_history_items, \
|
30 |
get_all_master_affiliates, get_my_research_items, get_browse_history_items, \
|
| 31 |
update_my_research, delete_item_from_my_research, update_browse_history, \
|
31 |
update_my_research, delete_item_from_my_research, update_browse_history, \
|
| 32 |
get_user_by_mobile_number, is_alive, increase_trust_level, get_user_by_cart_id, \
|
32 |
get_user_by_mobile_number, is_alive, increase_trust_level, get_user_by_cart_id, \
|
| 33 |
get_trust_level, remove_user_communication, get_user_emails, \
|
33 |
get_trust_level, remove_user_communication, get_user_emails, \
|
| 34 |
is_private_deal_user
|
34 |
is_private_deal_user,add_private_deal_user,change_private_deal_user_status,get_private_deal_user
|
| 35 |
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
|
35 |
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
|
| 36 |
from shop2020.utils.Utils import log_entry, to_py_date
|
36 |
from shop2020.utils.Utils import log_entry, to_py_date
|
| 37 |
|
37 |
|
| 38 |
|
38 |
|
| 39 |
|
39 |
|
| Line 847... |
Line 847... |
| 847 |
CartDataAccessors.close_session()
|
847 |
CartDataAccessors.close_session()
|
| 848 |
UserDataAccessors.close_session()
|
848 |
UserDataAccessors.close_session()
|
| 849 |
|
849 |
|
| 850 |
def isPrivateDealUser(self,userId):
|
850 |
def isPrivateDealUser(self,userId):
|
| 851 |
return is_private_deal_user(userId)
|
851 |
return is_private_deal_user(userId)
|
| - |
|
852 |
|
| - |
|
853 |
def addPrivateDealUser(self,userId):
|
| 852 |
|
854 |
try:
|
| - |
|
855 |
return add_private_deal_user(userId)
|
| - |
|
856 |
finally:
|
| - |
|
857 |
self.closeSession()
|
| - |
|
858 |
|
| - |
|
859 |
def changePrivateDealUserStatus(self,userId,isActive):
|
| - |
|
860 |
try:
|
| - |
|
861 |
return change_private_deal_user_status(userId,isActive)
|
| - |
|
862 |
finally:
|
| - |
|
863 |
self.closeSession()
|
| - |
|
864 |
|
| - |
|
865 |
def getPrivateDealUser(self,userId):
|
| - |
|
866 |
try:
|
| - |
|
867 |
return to_t_private_deal(get_private_deal_user(userId))
|
| - |
|
868 |
finally:
|
| - |
|
869 |
self.closeSession()
|
| 853 |
|
870 |
|
| 854 |
def isAlive(self, ):
|
871 |
def isAlive(self, ):
|
| 855 |
"""
|
872 |
"""
|
| 856 |
For checking weather service is active alive or not. It also checks connectivity with database
|
873 |
For checking weather service is active alive or not. It also checks connectivity with database
|
| 857 |
"""
|
874 |
"""
|
| 858 |
try:
|
875 |
try:
|
| 859 |
return is_alive()
|
876 |
return is_alive()
|
| 860 |
finally:
|
877 |
finally:
|
| 861 |
self.closeSession()
|
878 |
self.closeSession()
|
| - |
|
879 |
|
| 862 |
|
880 |
|
| 863 |
|
881 |
|