예제 #1
0
#!/usr/bin/env python
#-*-coding:utf-8-*-

import torndb_handler
import os
import time
import iter_gmatch

SEP = os.linesep
PASSWORD_DB = torndb_handler.MyDB(
    host="rm-2ze208m29he873gr9.mysql.rds.aliyuncs.com:3306",
    database="dts_jjd",
    user="******",
    password="******",
    tablename="user_passport")

TRADE_DB = torndb_handler.MyDB(
    host="rm-2ze208m29he873gr9.mysql.rds.aliyuncs.com:3306",
    database="dts_jjd",
    user="******",
    password="******",
    tablename="trade")

LOAN_OFFLINE_DB = torndb_handler.MyDB(
    host="rm-2ze208m29he873gr9.mysql.rds.aliyuncs.com:3306",
    database="dts_jjd",
    user="******",
    password="******",
    tablename="loan_offline")

PRODUCT_BID_DB = torndb_handler.MyDB(
#!/usr/bin/env python
#-*-coding:utf-8-*-

import torndb_handler
import os
import time
import iter_gmatch

SEP = os.linesep

LOAN_INSTALLMENT_LIST_DB = torndb_handler.MyDB(
    host="rm-2ze208m29he873gr9.mysql.rds.aliyuncs.com:3306",
    database="dts_jjd",
    user="******",
    password="******",
    tablename="loan_installment_list")


def conver_file(input_file, output_file, valid):
    with open(input_file, 'r') as fin:
        with open(output_file, 'w') as fout:
            for line in fin:
                if not line.startswith(valid):
                    continue
                line.rstrip()
                pre_pos = line.find("VALUES")
                if pre_pos == -1:
                    continue
                post = line[(pre_pos + 1):]
                pre = line[:(pre_pos + 1 + len("VALUES"))]
                new_values = []
        res = self.db.query(sql, origin_id)
        res = res[0].id if res else "NULL"
        return res


OUTPUT_FILE = "/tmp/t_iou_overdue_list_out2.sql"
INPUT_FILE0 = "t_iou_overdue_list000"
INPUT_FILE1 = "t_iou_overdue_list001"
INPUT_FILE2 = "t_iou_overdue_list002"
INPUT_FILE3 = "t_iou_overdue_list003"
INPUT_FILE4 = "t_iou_overdue_list004"
INPUT_LIST = (INPUT_FILE0, INPUT_FILE1, INPUT_FILE2, INPUT_FILE3, INPUT_FILE4)
SEP = os.linesep
MYDB0 = torndb_handler.MyDB(
    host="rm-2ze208m29he873gr9.mysql.rds.aliyuncs.com:3306",
    database="dts_jjd",
    user="******",
    password="******",
    tablename="loan_installment_list")
MYDB1 = torndb_handler.MyDB(
    host="rm-2ze208m29he873gr9.mysql.rds.aliyuncs.com:3306",
    database="dts_jjd",
    user="******",
    password="******",
    tablename="loan_installment_list")
MYDB2 = torndb_handler.MyDB(
    host="rm-2ze208m29he873gr9.mysql.rds.aliyuncs.com:3306",
    database="dts_jjd",
    user="******",
    password="******",
    tablename="loan_installment_list")
MYDB3 = torndb_handler.MyDB(
예제 #4
0
#!/usr/bin/env python
#-*-coding:utf-8-*-

import torndb_handler
from config import *

LOAN_DB = torndb_handler.MyDB(host=HOST, database=DATABASE,
                              user=USER, password=PASS,
                              tablename="loan")

LOAN_INSTALLMENT_LIST_DB = torndb_handler.MyDB(host=HOST, database=DATABASE,
                                               user=USER, password=PASS,
                                               tablename="loan_installment_list")

LOAN_WRITE_OFF_DB = torndb_handler.MyDB(host=HOST, database=DATABASE,
                                        user=USER, password=PASS,
                                        tablename="loan_write_off")

USER_PASSPORT_DB = torndb_handler.MyDB(host=HOST, database=DATABASE,
                                       user=USER, password=PASS,
                                       tablename="user_passport")

TRADE_DB = torndb_handler.MyDB(host=HOST, database=DATABASE,
                               user=USER, password=PASS,
                               tablename="trade")

COLLECTION_ACCOUNT_DB = torndb_handler.MyDB(host=HOST, database=DATABASE,
                                            user=USER, password=PASS,
                                            tablename="collection_account")

COLLECTION_APPLY_DB = torndb_handler.MyDB(host=HOST, database=DATABASE,
예제 #5
0
import torndb_handler

MYDB = torndb_handler.MyDB(host="rm-2ze208m29he873gr9.mysql.rds.aliyuncs.com:3306",
                           database="dts_jjd", user="******",
                           password="******",
                           tablename="user_passport")


print(MYDB.fetch_from_salt("201712150135062978"))
print(MYDB.get_max_uid())
#!/usr/bin/env python
#-*-coding:utf-8-*-

import torndb_handler
import os
import time
import iter_gmatch

SEP = os.linesep

LOAN_DB = torndb_handler.MyDB(
    host="rm-2ze208m29he873gr9.mysql.rds.aliyuncs.com:3306",
    database="dts_jjd",
    user="******",
    password="******",
    tablename="loan")

LOAN_INSTALLMENT_LIST_DB = torndb_handler.MyDB(
    host="rm-2ze208m29he873gr9.mysql.rds.aliyuncs.com:3306",
    database="dts_jjd",
    user="******",
    password="******",
    tablename="loan_installment_list")

LOAN_WRITE_OFF_DB = torndb_handler.MyDB(
    host="rm-2ze208m29he873gr9.mysql.rds.aliyuncs.com:3306",
    database="dts_jjd",
    user="******",
    password="******",
    tablename="loan_write_off")