| Line 6... |
Line 6... |
| 6 |
|
6 |
|
| 7 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction as T_Transaction,\
|
7 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction as T_Transaction,\
|
| 8 |
LineItem as T_LineItem, Order as T_Order, Alert as T_Alert, OrderStatus, DelayReason, \
|
8 |
LineItem as T_LineItem, Order as T_Order, Alert as T_Alert, OrderStatus, DelayReason, \
|
| 9 |
PaymentSettlement as T_PaymentSettlement, CODVerificationAgent as T_CODVerificationAgent, \
|
9 |
PaymentSettlement as T_PaymentSettlement, CODVerificationAgent as T_CODVerificationAgent, \
|
| 10 |
Attribute as T_Attribute, EmiScheme as T_EmiScheme, RechargeTransaction as T_rechargeTransaction, \
|
10 |
Attribute as T_Attribute, EmiScheme as T_EmiScheme, RechargeTransaction as T_rechargeTransaction, \
|
| 11 |
FRC as T_FRC
|
11 |
FRC as T_FRC, HotspotStore as T_HotSpotStore
|
| 12 |
from shop2020.utils.Utils import to_java_date
|
12 |
from shop2020.utils.Utils import to_java_date
|
| 13 |
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
|
13 |
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
|
| 14 |
|
14 |
|
| 15 |
def to_t_transaction(transaction):
|
15 |
def to_t_transaction(transaction):
|
| 16 |
t_transaction = T_Transaction()
|
16 |
t_transaction = T_Transaction()
|
| Line 208... |
Line 208... |
| 208 |
t_recharge.isFrc = rechargeTransaction.isFrc
|
208 |
t_recharge.isFrc = rechargeTransaction.isFrc
|
| 209 |
t_recharge.status = rechargeTransaction.status
|
209 |
t_recharge.status = rechargeTransaction.status
|
| 210 |
t_recharge.storeId = rechargeTransaction.storeId
|
210 |
t_recharge.storeId = rechargeTransaction.storeId
|
| 211 |
t_recharge.alternateNum = rechargeTransaction.alternateNumber
|
211 |
t_recharge.alternateNum = rechargeTransaction.alternateNumber
|
| 212 |
t_recharge.transactionTime = to_java_date(rechargeTransaction.transactionTime)
|
212 |
t_recharge.transactionTime = to_java_date(rechargeTransaction.transactionTime)
|
| - |
|
213 |
t_recharge.description = rechargeTransaction.description
|
| 213 |
return t_recharge
|
214 |
return t_recharge
|
| 214 |
|
215 |
|
| 215 |
def to_t_frc(frc):
|
216 |
def to_t_frc(frc):
|
| 216 |
t_frc = T_FRC()
|
217 |
t_frc = T_FRC()
|
| 217 |
if frc:
|
218 |
if frc:
|
| 218 |
t_frc.id = frc.id
|
219 |
t_frc.id = frc.id
|
| 219 |
t_frc.operatorId =frc.operatorId
|
220 |
t_frc.operatorId =frc.operatorId
|
| 220 |
t_frc.circleId = frc.circleId
|
221 |
t_frc.circleId = frc.circleId
|
| 221 |
t_frc.denomination = frc.denomination
|
222 |
t_frc.denomination = frc.denomination
|
| 222 |
t_frc.maxDiscount = frc.maxDiscount
|
223 |
t_frc.maxDiscount = frc.maxDiscount
|
| 223 |
return t_frc
|
- |
|
| 224 |
|
224 |
return t_frc
|
| - |
|
225 |
|
| - |
|
226 |
def to_t_hotspot(hotspot):
|
| - |
|
227 |
t_hotspot = T_HotSpotStore();
|
| - |
|
228 |
if hotspot:
|
| - |
|
229 |
t_hotspot.id = hotspot.id
|
| - |
|
230 |
t_hotspot.hotspotId = hotspot.hotspotId
|
| - |
|
231 |
t_hotspot.companyId = hotspot.companyId
|
| - |
|
232 |
t_hotspot.name = hotspot.name
|
| - |
|
233 |
t_hotspot.city = hotspot.city
|
| - |
|
234 |
t_hotspot.collectedAmount = hotspot.collectedAmount
|
| - |
|
235 |
t_hotspot.availableLimit = hotspot.availableLimit
|
| - |
|
236 |
t_hotspot.creditLimit = hotspot.creditLimit
|
| - |
|
237 |
t_hotspot.salt = hotspot.salt
|
| - |
|
238 |
t_hotspot.password = hotspot.password
|
| - |
|
239 |
t_hotspot.isActive = hotspot.isActive
|
| - |
|
240 |
t_hotspot.circleId = hotspot.circleId
|
| - |
|
241 |
return t_hotspot
|
| - |
|
242 |
|
| 225 |
|
243 |
|