| Line 19... |
Line 19... |
| 19 |
from shop2020.model.v1.user.impl.CartDataAccessors import create_cart, get_cart,\
|
19 |
from shop2020.model.v1.user.impl.CartDataAccessors import create_cart, get_cart,\
|
| 20 |
get_cart_by_id, get_cart_by_user_id_and_status, get_carts_by_status,\
|
20 |
get_cart_by_id, get_cart_by_user_id_and_status, get_carts_by_status,\
|
| 21 |
get_carts_between, change_cart_status, add_item_to_cart,\
|
21 |
get_carts_between, change_cart_status, add_item_to_cart,\
|
| 22 |
change_item_status, add_address_to_cart, commit_cart,\
|
22 |
change_item_status, add_address_to_cart, commit_cart,\
|
| 23 |
validate_cart, merge_cart, delete_item_from_cart, check_out, reset_cart,\
|
23 |
validate_cart, merge_cart, delete_item_from_cart, check_out, reset_cart,\
|
| 24 |
apply_coupon_to_cart, remove_coupon
|
24 |
apply_coupon_to_cart, remove_coupon, get_carts_with_coupon_count
|
| 25 |
from shop2020.model.v1.user.impl.Converters import to_t_user, to_t_user_state, to_t_cart, to_t_address, to_t_user_communication,\
|
25 |
from shop2020.model.v1.user.impl.Converters import to_t_user, to_t_user_state, to_t_cart, to_t_address, to_t_user_communication,\
|
| 26 |
to_t_master_affiliate, to_t_affiliate, to_t_tracker, to_t_track_log,\
|
26 |
to_t_master_affiliate, to_t_affiliate, to_t_tracker, to_t_track_log,\
|
| 27 |
to_t_user_note
|
27 |
to_t_user_note
|
| 28 |
|
28 |
|
| 29 |
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
|
29 |
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
|
| Line 825... |
Line 825... |
| 825 |
try:
|
825 |
try:
|
| 826 |
return get_browse_history_items(userId)
|
826 |
return get_browse_history_items(userId)
|
| 827 |
finally:
|
827 |
finally:
|
| 828 |
UserDataAccessors.close_session()
|
828 |
UserDataAccessors.close_session()
|
| 829 |
|
829 |
|
| - |
|
830 |
def getCartsWithCouponCount(self, couponCode):
|
| - |
|
831 |
'''
|
| - |
|
832 |
Parameters:
|
| - |
|
833 |
- couponCode
|
| - |
|
834 |
'''
|
| - |
|
835 |
try:
|
| - |
|
836 |
return get_carts_with_coupon_count(couponCode)
|
| - |
|
837 |
finally:
|
| - |
|
838 |
CartDataAccessors.close_session()
|
| - |
|
839 |
|
| 830 |
def closeSession(self, ):
|
840 |
def closeSession(self, ):
|
| 831 |
CartDataAccessors.close_session()
|
841 |
CartDataAccessors.close_session()
|
| 832 |
UserDataAccessors.close_session()
|
842 |
UserDataAccessors.close_session()
|
| 833 |
|
843 |
|
| 834 |
def isAlive(self, ):
|
844 |
def isAlive(self, ):
|