| Line 5... |
Line 5... |
| 5 |
'''
|
5 |
'''
|
| 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 |
from shop2020.utils.Utils import to_java_date
|
12 |
from shop2020.utils.Utils import to_java_date
|
| 12 |
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
|
13 |
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
|
| 13 |
|
14 |
|
| 14 |
def to_t_transaction(transaction):
|
15 |
def to_t_transaction(transaction):
|
| 15 |
t_transaction = T_Transaction()
|
16 |
t_transaction = T_Transaction()
|
| Line 190... |
Line 191... |
| 190 |
return t_emi_scheme
|
191 |
return t_emi_scheme
|
| 191 |
|
192 |
|
| 192 |
def to_t_rechargeTransaction(rechargeTransaction):
|
193 |
def to_t_rechargeTransaction(rechargeTransaction):
|
| 193 |
t_recharge = T_rechargeTransaction()
|
194 |
t_recharge = T_rechargeTransaction()
|
| 194 |
if rechargeTransaction:
|
195 |
if rechargeTransaction:
|
| - |
|
196 |
t_recharge.id = rechargeTransaction.id
|
| 195 |
rechargeTransaction.amount = t_recharge.amount
|
197 |
t_recharge.amount = rechargeTransaction.amount
|
| 196 |
t_recharge.circleId = rechargeTransaction.circleId
|
198 |
t_recharge.circleId = rechargeTransaction.circleId
|
| 197 |
t_recharge.operatorId = rechargeTransaction.operatorId
|
199 |
t_recharge.operatorId = rechargeTransaction.operatorId
|
| 198 |
t_recharge.plan = rechargeTransaction.plan
|
200 |
t_recharge.plan = rechargeTransaction.plan
|
| 199 |
t_recharge.deviceNum = rechargeTransaction.deviceNum
|
201 |
t_recharge.deviceNum = rechargeTransaction.deviceNum
|
| 200 |
t_recharge.deviceType = rechargeTransaction.deviceType
|
202 |
t_recharge.deviceType = rechargeTransaction.deviceType
|
| Line 204... |
Line 206... |
| 204 |
t_recharge.cafNum = rechargeTransaction.cafNum
|
206 |
t_recharge.cafNum = rechargeTransaction.cafNum
|
| 205 |
t_recharge.simNum = rechargeTransaction.simNum
|
207 |
t_recharge.simNum = rechargeTransaction.simNum
|
| 206 |
t_recharge.isFrc = rechargeTransaction.isFrc
|
208 |
t_recharge.isFrc = rechargeTransaction.isFrc
|
| 207 |
t_recharge.status = rechargeTransaction.status
|
209 |
t_recharge.status = rechargeTransaction.status
|
| 208 |
t_recharge.storeId = rechargeTransaction.storeId
|
210 |
t_recharge.storeId = rechargeTransaction.storeId
|
| 209 |
t_recharge.transactionTime = rechargeTransaction.transactionTime
|
- |
|
| 210 |
return t_recharge
|
- |
|
| 211 |
|
211 |
t_recharge.alternateNum = rechargeTransaction.alternateNumber
|
| - |
|
212 |
t_recharge.transactionTime = to_java_date(rechargeTransaction.transactionTime)
|
| - |
|
213 |
return t_recharge
|
| - |
|
214 |
|
| - |
|
215 |
def to_t_frc(frc):
|
| - |
|
216 |
t_frc = T_FRC()
|
| - |
|
217 |
if frc:
|
| - |
|
218 |
t_frc.id = frc.id
|
| - |
|
219 |
t_frc.operatorId =frc.operatorId
|
| - |
|
220 |
t_frc.circleId = frc.circleId
|
| - |
|
221 |
t_frc.denomination = frc.denomination
|
| - |
|
222 |
t_frc.maxDiscount = frc.maxDiscount
|
| - |
|
223 |
return t_frc
|
| - |
|
224 |
|
| 212 |
|
225 |
|