Пример #1
0
    def log_to_db(cls, user, data):
        d = AbRechargeWithdrawLog()
        d.user = user
        d.status = 3
        d.event = 2 #入金

        d.trade_date = datetime.now().date()
        d.trade_time = datetime.now().time()
        d.inst_serial = data['inst_serial']

        d.bank_account = data['bank_account']
        d.inst_func_acc = data['inst_fund_acc']
        d.client_name = data['client_name']
        d.client_no = data['client_no']
        d.transfer_amount = data['transfer_amount']

        d.user_comment = data.get('comment', '')
        d.save()

        return d