| Line 1... |
Line 1... |
| 1 |
from shop2020.thriftpy.model.v1.user.ttypes import Address as TAddress, UserCommunication as TUserCommunication, \
|
1 |
from shop2020.thriftpy.model.v1.user.ttypes import Address as TAddress, UserCommunication as TUserCommunication, \
|
| 2 |
User as TUser, Cart as TCart, Line as TLine, MasterAffiliate as TMasterAffiliate, \
|
2 |
User as TUser, Cart as TCart, Line as TLine, MasterAffiliate as TMasterAffiliate, \
|
| 3 |
Affiliate as TAffiliate, Tracker as TTracker, TrackLog as TTrackLog, Promotion as TPromotion, \
|
3 |
Affiliate as TAffiliate, Tracker as TTracker, TrackLog as TTrackLog, Promotion as TPromotion, \
|
| 4 |
Coupon as TCoupon, Discount as TDiscount, ItemCouponDiscount as TItemCouponDiscount,\
|
4 |
Coupon as TCoupon, Discount as TDiscount, ItemCouponDiscount as TItemCouponDiscount,\
|
| 5 |
Voucher, CouponCategory, PrivateDealUser as TPrivateDealUser
|
5 |
Voucher, CouponCategory, PrivateDealUser as TPrivateDealUser, Counter as TCounter
|
| 6 |
|
6 |
|
| 7 |
from shop2020.utils.Utils import to_java_date
|
7 |
from shop2020.utils.Utils import to_java_date
|
| - |
|
8 |
from shop2020.model.v1.user.impl.Dataservice import Counter
|
| 8 |
|
9 |
|
| 9 |
def to_t_address(address):
|
10 |
def to_t_address(address):
|
| 10 |
t_address = TAddress()
|
11 |
t_address = TAddress()
|
| 11 |
t_address.id = address.id
|
12 |
t_address.id = address.id
|
| 12 |
t_address.line1 = address.line_1
|
13 |
t_address.line1 = address.line_1
|
| Line 237... |
Line 238... |
| 237 |
if privateDeal is not None:
|
238 |
if privateDeal is not None:
|
| 238 |
t_private_deal.userId = privateDeal.id
|
239 |
t_private_deal.userId = privateDeal.id
|
| 239 |
t_private_deal.addedOn = to_java_date(privateDeal.created_on)
|
240 |
t_private_deal.addedOn = to_java_date(privateDeal.created_on)
|
| 240 |
t_private_deal.isActive = privateDeal.isActive
|
241 |
t_private_deal.isActive = privateDeal.isActive
|
| 241 |
return t_private_deal
|
242 |
return t_private_deal
|
| - |
|
243 |
|
| - |
|
244 |
def to_t_counter(counter):
|
| - |
|
245 |
t_counter = TCounter()
|
| - |
|
246 |
t_counter.addedOn = to_java_date(counter.createdOn)
|
| - |
|
247 |
t_counter.alternateMobile = counter.alternateMobile
|
| - |
|
248 |
t_counter.mobile = counter.mobile
|
| - |
|
249 |
t_counter.dob = counter.dob
|
| - |
|
250 |
t_counter.name = counter.name
|
| - |
|
251 |
t_counter.ownerName = counter.ownerName
|
| - |
|
252 |
t_counter.id = counter.id
|
| - |
|
253 |
t_counter.address = counter.addressId
|
| - |
|
254 |
t_counter.email = counter.email
|
| - |
|
255 |
t_counter.fpCounterSize = counter.fpCounterSize
|
| - |
|
256 |
t_counter.spCounterSize = counter.spCounterSize
|
| - |
|
257 |
t_counter.striker = counter.striker
|
| - |
|
258 |
t_counter.tin = counter.tin
|
| - |
|
259 |
return t_counter
|
| 242 |
|
260 |
|
| 243 |
|
261 |
|