| Line 1... |
Line 1... |
| 1 |
from shop2020.thriftpy.model.v1.user.ttypes import Address as TAddress,\
|
1 |
from shop2020.thriftpy.model.v1.user.ttypes import Address as TAddress, Phone as TPhone, \
|
| 2 |
Phone as TPhone, SocialHandles as TSocialHandles, UserCommunication as TUserCommunication,\
|
2 |
SocialHandles as TSocialHandles, UserCommunication as TUserCommunication, UserState as TUserState, \
|
| 3 |
UserState as TUserState, User as TUser, Cart as TCart, Line as TLine, Sex as TSex,\
|
3 |
User as TUser, Cart as TCart, Line as TLine, Sex as TSex, MasterAffiliate as TMasterAffiliate, \
|
| 4 |
MasterAffiliate as TMasterAffiliate, Affiliate as TAffiliate, Tracker as TTracker, TrackLog as TTrackLog,\
|
4 |
Affiliate as TAffiliate, Tracker as TTracker, TrackLog as TTrackLog, Promotion as TPromotion, \
|
| 5 |
Promotion as TPromotion, Coupon as TCoupon, UserNote as TUserNote, Discount as TDiscount
|
5 |
Coupon as TCoupon, UserNote as TUserNote, Discount as TDiscount, ItemCouponDiscount as TItemCouponDiscount
|
| - |
|
6 |
|
| 6 |
from shop2020.utils.Utils import to_java_date
|
7 |
from shop2020.utils.Utils import to_java_date
|
| 7 |
|
8 |
|
| 8 |
def to_t_address(address):
|
9 |
def to_t_address(address):
|
| 9 |
t_address = TAddress()
|
10 |
t_address = TAddress()
|
| 10 |
t_address.id = address.id
|
11 |
t_address.id = address.id
|
| Line 230... |
Line 231... |
| 230 |
t_user_note.user_id = user_note.user_id
|
231 |
t_user_note.user_id = user_note.user_id
|
| 231 |
t_user_note.entity_id = user_note.entity_id
|
232 |
t_user_note.entity_id = user_note.entity_id
|
| 232 |
t_user_note.slide = user_note.slide
|
233 |
t_user_note.slide = user_note.slide
|
| 233 |
t_user_note.note = user_note.note
|
234 |
t_user_note.note = user_note.note
|
| 234 |
|
235 |
|
| 235 |
return t_user_note
|
- |
|
| 236 |
|
236 |
return t_user_note
|
| - |
|
237 |
|
| - |
|
238 |
def to_t_item_coupon_discount(item_coupon_discount):
|
| - |
|
239 |
t_item_coupon_discount = TItemCouponDiscount()
|
| - |
|
240 |
|
| - |
|
241 |
if item_coupon_discount:
|
| - |
|
242 |
t_item_coupon_discount.itemId = item_coupon_discount[0]
|
| - |
|
243 |
t_item_coupon_discount.couponCode = item_coupon_discount[1]
|
| - |
|
244 |
t_item_coupon_discount.discount = item_coupon_discount[2]
|
| - |
|
245 |
|
| - |
|
246 |
return t_item_coupon_discount
|
| - |
|
247 |
|
| 237 |
|
248 |
|