#!/usr/bin/python # -*- coding: utf-8 -*- from alpbusiness import Credit, Loan from comm import ChangeEngine, GetResult, Mongo, Mysql import alpbusiness.RequestDataSql as RequestDataSql from apibase import JCapi import unittest, time, Env # 读取数据库信息 business, platform, rule = Env.env()[2], Env.env()[3], Env.env()[4] # 定义mysql数据库封装类对象 Mysql, Mongo = Mysql.MysqlDB(), Mongo.MongoDB() tel, name, card = '13000000001', '用户1', '110101190202174170' channel = 'Android' # 申请渠道:Android, IOS engine = '386' periods, amount = '6', '100' GRXXlist = ['GRXX1007', 'GRXX1002', 'GRXX1111'] process = 'Loan' class Test_GRXX(unittest.TestCase): '''用户申请,获取入引擎的业务字段''' def test_GRXX(self): if process == 'Credit': # ChangeEngine.changeCreditEngine(channel=channel, engine1=engine, engine2='344', engine3='345') # 修改授信引擎 alreadyapply = Mysql.selectwithparams( business, 'select count(*) from mag_customer_apply where tel=%s', tel)[0] if alreadyapply == '0': Credit.credit(name=name, card=card, tel=tel, channel=channel) # 额度申请
#!/usr/bin/python # -*- coding: utf-8 -*- from comm import Mysql import webbrowser import os import Env selectsqlpath = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'testfile', 'selectsql.txt') htmlpath = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'testfile', 'html.html') # 读取数据库信息 business = Env.env()[2] # 定义mysql数据库封装类对象 Mysql = Mysql.MysqlDB() def titlelist(): # 用户信息 titlelist1 = ['用户手机号', '用户编号', '客户编号', '渠道号', '平台号', '姓名', '性别', '年龄', '身份证号', '户籍地址', '身份证有效期', '活体得分(0-1)', '活体识别照片比对分数(0-1)', '人脸公安验证结果(1通过,0未通过)', '人脸识别状态(1通过,0未通过)', '人脸图片锦程方路径', '身份证正面锦程方路径', '身份证反面锦程方路径'] # 个人信息 titlelist2 = ['月收入', '学历', '居住地址', '详细居住地址', '公司名称', '公司地址', '详细公司地址'] # 联系人信息 titlelist3 = ['联系人1姓名', '联系人1电话', '联系人1关系', '联系人2姓名', '联系人2电话', '联系人2关系'] # 设备信息 titlelist4 = ['设备类型', '设备品牌', '设备型号', '操作系统', 'imei', 'oaid', '网络类型', 'wifiname', 'IP地址', 'wifiMac', '申请省份', '申请市', '申请区', '申请地理位置', '纬度', '经度'] # 额度信息 titlelist5 = ['产品名称', '年利率', '锦程额度申请流水号jcLtNo', '预授信额度', '总额度', '剩余额度', '是否过期', '是否销户', '是否冻结'] titlelist = titlelist1 + titlelist2 + titlelist3 + titlelist4 + titlelist5 return titlelist