Subversion Repositories SmartDukaan

Rev

Rev 6903 | Rev 7075 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6903 Rev 7073
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
10
    Attribute as T_Attribute, EmiScheme as T_EmiScheme, RechargeTransaction as T_rechargeTransaction
11
from shop2020.utils.Utils import to_java_date
11
from shop2020.utils.Utils import to_java_date
12
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
12
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
13
 
13
 
14
def to_t_transaction(transaction):
14
def to_t_transaction(transaction):
15
    t_transaction = T_Transaction()
15
    t_transaction = T_Transaction()
Line 185... Line 185...
185
        t_emi_scheme.tenure = emi_scheme.tenure
185
        t_emi_scheme.tenure = emi_scheme.tenure
186
        t_emi_scheme.tenureDescription = emi_scheme.tenureDescription
186
        t_emi_scheme.tenureDescription = emi_scheme.tenureDescription
187
        t_emi_scheme.minAmount = emi_scheme.minAmount
187
        t_emi_scheme.minAmount = emi_scheme.minAmount
188
        t_emi_scheme.chargeType = emi_scheme.chargeType
188
        t_emi_scheme.chargeType = emi_scheme.chargeType
189
        t_emi_scheme.chargeValue = emi_scheme.chargeValue
189
        t_emi_scheme.chargeValue = emi_scheme.chargeValue
190
    return t_emi_scheme
-
 
191
190
    return t_emi_scheme
-
 
191
 
-
 
192
def to_t_rechargeTransaction(rechargeTransaction):
-
 
193
    t_recharge = T_rechargeTransaction()
-
 
194
    if rechargeTransaction:
-
 
195
        rechargeTransaction.amount = t_recharge.amount
-
 
196
        t_recharge.circleId = rechargeTransaction.circleId 
-
 
197
        t_recharge.deviceNum = rechargeTransaction.deviceNum
-
 
198
        t_recharge.deviceType = rechargeTransaction.deviceType
-
 
199
        t_recharge.discount = rechargeTransaction.discount 
-
 
200
        t_recharge.email = rechargeTransaction.email
-
 
201
        t_recharge.name = rechargeTransaction.name
-
 
202
        t_recharge.cafNum = rechargeTransaction.cafNum
-
 
203
        t_recharge.simNum = rechargeTransaction.simNum
-
 
204
        t_recharge.isFrc = rechargeTransaction.isFrc
-
 
205
        t_recharge.status = rechargeTransaction.status
-
 
206
        t_recharge.storeId = rechargeTransaction.storeId
-
 
207
        t_recharge.transactionTime = rechargeTransaction.transactionTime
-
 
208
    return t_recharge
-
 
209
192
210