first commit
This commit is contained in:
@@ -0,0 +1,307 @@
|
||||
<?php
|
||||
//程序安装文件
|
||||
error_reporting(0);
|
||||
date_default_timezone_set("PRC");
|
||||
$databaseFile = '../config.php';//数据库配额文件
|
||||
|
||||
@header('Content-Type: text/html; charset=UTF-8');
|
||||
$step=isset($_GET['step'])?$_GET['step']:1;
|
||||
if(file_exists('install.lock')){
|
||||
exit('你已经成功安装,如需重新安装,请手动删除install目录下install.lock文件!');
|
||||
}
|
||||
|
||||
function clearpack() {
|
||||
$array=glob('../epay_release*');
|
||||
foreach($array as $dir){
|
||||
unlink($dir);
|
||||
}
|
||||
$array=glob('../epay_update*');
|
||||
foreach($array as $dir){
|
||||
unlink($dir);
|
||||
}
|
||||
}
|
||||
|
||||
function random($length, $numeric = 0) {
|
||||
$seed = base_convert(md5(microtime().$_SERVER['DOCUMENT_ROOT']), 16, $numeric ? 10 : 35);
|
||||
$seed = $numeric ? (str_replace('0', '', $seed).'012340567890') : ($seed.'zZ'.strtoupper($seed));
|
||||
$hash = '';
|
||||
$max = strlen($seed) - 1;
|
||||
for($i = 0; $i < $length; $i++) {
|
||||
$hash .= $seed[mt_rand(0, $max)];
|
||||
}
|
||||
return $hash;
|
||||
}
|
||||
|
||||
if($step==3){
|
||||
if($_GET['jump']==1){
|
||||
include '../config.php';
|
||||
if(!$dbconfig['user']||!$dbconfig['pwd']||!$dbconfig['dbname']) {
|
||||
$errorMsg='请先填写好数据库并保存后再安装!';
|
||||
}
|
||||
}else{
|
||||
$host=isset($_POST['host'])?$_POST['host']:null;
|
||||
$port=isset($_POST['port'])?$_POST['port']:null;
|
||||
$user=isset($_POST['user'])?$_POST['user']:null;
|
||||
$pwd=isset($_POST['pwd'])?$_POST['pwd']:null;
|
||||
$database=isset($_POST['database'])?$_POST['database']:null;
|
||||
$dbqz=isset($_POST['dbqz'])?$_POST['dbqz']:null;
|
||||
if(empty($host) || empty($port) || empty($user) || empty($pwd) || empty($database) || empty($dbqz)){
|
||||
$errorMsg='请填写完整所有数据库信息!';
|
||||
}
|
||||
$dbconfig=array(
|
||||
'host' => $host,
|
||||
'port' => $port,
|
||||
'user' => $user,
|
||||
'pwd' => $pwd,
|
||||
'dbname' => $database,
|
||||
'dbqz' => $dbqz
|
||||
);
|
||||
$config="<?php
|
||||
/*数据库配置*/
|
||||
\$dbconfig=array(
|
||||
'host' => '{$host}', //数据库服务器
|
||||
'port' => {$port}, //数据库端口
|
||||
'user' => '{$user}', //数据库用户名
|
||||
'pwd' => '{$pwd}', //数据库密码
|
||||
'dbname' => '{$database}', //数据库名
|
||||
'dbqz' => '{$dbqz}' //数据表前缀
|
||||
);
|
||||
";
|
||||
}
|
||||
if(empty($errorMsg)){
|
||||
try{
|
||||
$DB=new PDO("mysql:host=".$dbconfig['host'].";dbname=".$dbconfig['dbname'].";port=".$dbconfig['port'],$dbconfig['user'],$dbconfig['pwd']);
|
||||
}catch(Exception $e){
|
||||
if($e->getCode() == 2002){
|
||||
$errorMsg='连接数据库失败:数据库地址填写错误!';
|
||||
}elseif($e->getCode() == 1045){
|
||||
$errorMsg='连接数据库失败:数据库用户名或密码填写错误!';
|
||||
}elseif($e->getCode() == 1049){
|
||||
$errorMsg='连接数据库失败:数据库名不存在!';
|
||||
}else{
|
||||
$errorMsg='连接数据库失败:'.$e->getMessage();
|
||||
}
|
||||
}
|
||||
if(empty($errorMsg)){
|
||||
$DB->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
|
||||
$DB->exec("set sql_mode = ''");
|
||||
$DB->exec("set names utf8");
|
||||
$mysqlversion = $DB->query("select version()")->fetchColumn();
|
||||
if(version_compare($mysqlversion, '5.5.3', '<')){
|
||||
$errorMsg='MySQL数据库版本太低,需要MySQL 5.6或以上版本!';
|
||||
}
|
||||
if(!$_GET['jump'] && !file_put_contents($databaseFile, $config)){
|
||||
$errorMsg='保存失败,请确保网站根目录有写入权限';
|
||||
}
|
||||
}
|
||||
}
|
||||
}elseif($step==4){
|
||||
include '../config.php';
|
||||
if(!$dbconfig['user']||!$dbconfig['pwd']||!$dbconfig['dbname']) {
|
||||
$errorMsg='请先填写好数据库并保存后再安装!';
|
||||
}else{
|
||||
try{
|
||||
$DB=new PDO("mysql:host=".$dbconfig['host'].";dbname=".$dbconfig['dbname'].";port=".$dbconfig['port'],$dbconfig['user'],$dbconfig['pwd']);
|
||||
}catch(Exception $e){
|
||||
$errorMsg='连接数据库失败:'.$e->getMessage();
|
||||
}
|
||||
if(empty($errorMsg) && !$_GET['jump']){
|
||||
$dbqz = $dbconfig['dbqz'];
|
||||
$DB->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
|
||||
$DB->exec("set sql_mode = ''");
|
||||
$DB->exec("set names utf8");
|
||||
$sqls=file_get_contents('install.sql');
|
||||
$sqls=explode(';', $sqls);
|
||||
$sqls[]="INSERT INTO `".$dbqz."_config` VALUES ('syskey', '".random(32)."')";
|
||||
$sqls[]="INSERT INTO `".$dbqz."_config` VALUES ('build', '".date("Y-m-d")."')";
|
||||
$sqls[]="INSERT INTO `".$dbqz."_config` VALUES ('cronkey', '".rand(111111,999999)."')";
|
||||
$success=0;$error=0;$errorMsg=null;
|
||||
foreach ($sqls as $value) {
|
||||
$value=trim($value);
|
||||
if(empty($value))continue;
|
||||
$value = str_replace('pre_',$dbqz.'_',$value);
|
||||
if($DB->exec($value)===false){
|
||||
$error++;
|
||||
$dberror=$DB->errorInfo();
|
||||
$errorMsg.=$dberror[2]."<br>";
|
||||
}else{
|
||||
$success++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(empty($errorMsg)){
|
||||
$lock_status = file_put_contents("install.lock",'安装锁');
|
||||
clearpack();
|
||||
$step = 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<title>彩虹易支付 - 安装程序</title>
|
||||
<link href="//lib.baomitu.com/twitter-bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container"><br>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-10 col-md-8 center-block" style="float: none;">
|
||||
<pre><h4>彩虹易支付 - 安装程序</h4></pre>
|
||||
<div class="panel panel-warning">
|
||||
<?php
|
||||
if($step==2){
|
||||
?>
|
||||
<div class="panel-heading text-center">MYSQL数据库信息配置</div>
|
||||
<div class="panel-body">
|
||||
<div class="list-group text-success">
|
||||
<form class="form-horizontal" action="?step=3" method="post">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">数据库地址</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="host" class="form-control" value="localhost" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">数据库端口</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="port" class="form-control" value="3306" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">数据库用户名</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="user" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">数据库密码</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="pwd" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">数据库名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="database" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">数据表前缀</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="dbqz" class="form-control" value="pay" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-success btn-block">确认无误,下一步</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
(如果已事先填写好config.php相关数据库配置,请 <a href="?step=3&jump=1">点击此处</a> 跳过这一步!)
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php }elseif($step==3){ ?>
|
||||
<div class="panel-heading text-center">保存数据库配置</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
if(!empty($errorMsg)){
|
||||
echo '<div class="alert alert-danger text-center" role="alert">'.$errorMsg.'</div><div class="list-group-item"><a href="javascript:history.back(-1)" class="btn btn-block btn-info"><< 返回上一页</a></div>';
|
||||
}else{
|
||||
echo '<div class="alert alert-success text-center" role="alert">数据库配置文件保存成功!</div>';
|
||||
if($DB->query("select * from ".$dbconfig['dbqz']."_config")){
|
||||
?>
|
||||
<div class="list-group-item list-group-item-info text-center">系统检测到你已安装过彩虹易支付</div>
|
||||
<div class="list-group-item">
|
||||
<a href="?step=4&jump=1" class="btn btn-block btn-info">跳过安装数据表</a>
|
||||
</div>
|
||||
<div class="list-group-item">
|
||||
<a href="?step=4" onclick="if(!confirm('全新安装将会清空所有数据,是否继续?')){return false;}" class="btn btn-block btn-warning">强制全新安装</a>
|
||||
</div>
|
||||
<?php }else{?>
|
||||
<div class="list-group-item">
|
||||
<a href="?step=4" class="btn btn-block btn-success">立即安装数据表 >></a>
|
||||
</div>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php }elseif($step==4){ ?>
|
||||
<div class="panel-heading text-center">安装数据表</div>
|
||||
<div class="panel-body">
|
||||
<div class="alert alert-danger" role="alert"><?php echo $errorMsg?></div>
|
||||
<div class="list-group-item"><a href="?step=4" class="btn btn-block btn-warning">点此进行重试</a></div>
|
||||
<div class="list-group-item"><a href="javascript:history.back(-1)" class="btn btn-block btn-info"><< 返回上一页</a></div>
|
||||
</div>
|
||||
<?php }elseif($step==5){ ?>
|
||||
<div class="panel-heading text-center">安装完成</div>
|
||||
<div class="panel-body">
|
||||
<?php if($success>0){?><div class="alert alert-success" role="alert">成功执行SQL语句<?php echo $success;?>条,失败<?php echo $error;?>条!</div><?php }?>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">1、系统已成功安装完毕!</li>
|
||||
<li class="list-group-item">2、后台地址:<a href="/admin/" target="_blank">/admin/</a> 密码:123456</li>
|
||||
<li class="list-group-item">3、请及时修改后台管理员密码!</li>
|
||||
<?php if(!$lock_status){?><li class="list-group-item">4、<font color="#FF0033">你的空间不支持本地文件读写,请自行在 /install/ 目录建立 install.lock 文件!</font></li><?php }?>
|
||||
<li class="list-group-item"><a href="/" class="btn btn-block btn-default">进入网站首页</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php }else{ ?>
|
||||
<div class="panel-heading text-center">安装环境检测</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$install=true;
|
||||
if(function_exists('curl_exec')){
|
||||
$check[2]='<span class="pull-right label label-success">支持</span>';
|
||||
}else{
|
||||
$check[2]='<span class="pull-right label label-danger">不支持</span>';
|
||||
$install=false;
|
||||
}
|
||||
if(class_exists("PDO")){
|
||||
$check[0]='<span class="pull-right label label-success">支持</span>';
|
||||
}else{
|
||||
$check[0]='<span class="pull-right label label-danger">不支持</span>';
|
||||
$install=false;
|
||||
}
|
||||
if(is_writable($databaseFile)) {
|
||||
$check[1]='<span class="pull-right label label-success">支持</span>';
|
||||
}else{
|
||||
$check[1]='<span class="pull-right label label-danger">不支持</span>';
|
||||
}
|
||||
if(version_compare(PHP_VERSION,'7.4.0','<')){
|
||||
$check[3]='<span class="pull-right label label-danger">不支持</span>';
|
||||
$install=false;
|
||||
}else{
|
||||
$check[3]='<span class="pull-right label label-success">支持</span>';
|
||||
}
|
||||
|
||||
?>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">PHP版本>=7.4 <?php echo $check[3];?></li>
|
||||
<li class="list-group-item">PDO_MYSQL组件 <?php echo $check[0];?></li>
|
||||
<li class="list-group-item">CURL组件 <?php echo $check[2];?></li>
|
||||
<li class="list-group-item">主目录写入权限 <?php echo $check[1];?></li>
|
||||
<li class="list-group-item">成功安装后安装文件就会锁定,如需重新安装,请手动删除install目录下install.lock配置文件!</li>
|
||||
<?php
|
||||
if($install) echo'<li class="list-group-item"><a href="?step=2" class="btn btn-block btn-default">检测通过,下一步</a></li>';
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<pre><center>Powered by <a href="#">彩虹</a> !</center></pre>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,556 @@
|
||||
DROP TABLE IF EXISTS `pre_config`;
|
||||
create table `pre_config` (
|
||||
`k` varchar(32) NOT NULL,
|
||||
`v` text NULL,
|
||||
PRIMARY KEY (`k`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO `pre_config` VALUES ('version', '2045');
|
||||
INSERT INTO `pre_config` VALUES ('admin_user', 'admin');
|
||||
INSERT INTO `pre_config` VALUES ('admin_pwd', '123456');
|
||||
INSERT INTO `pre_config` VALUES ('admin_paypwd', '123456');
|
||||
INSERT INTO `pre_config` VALUES ('homepage', '0');
|
||||
INSERT INTO `pre_config` VALUES ('sitename', '聚合支付平台');
|
||||
INSERT INTO `pre_config` VALUES ('title', '聚合支付 - 行业领先的免签约支付平台');
|
||||
INSERT INTO `pre_config` VALUES ('keywords', '聚合支付,支付宝免签约即时到账,财付通免签约,微信免签约支付,QQ钱包免签约,免签约支付');
|
||||
INSERT INTO `pre_config` VALUES ('description', '聚合支付是XX公司旗下的免签约支付产品,完美解决支付难题,一站式接入支付宝,微信,财付通,QQ钱包,微信wap,帮助开发者快速集成到自己相应产品,效率高,见效快,费率低!');
|
||||
INSERT INTO `pre_config` VALUES ('orgname', 'XX公司');
|
||||
INSERT INTO `pre_config` VALUES ('kfqq', '123456789');
|
||||
INSERT INTO `pre_config` VALUES ('template', 'index1');
|
||||
INSERT INTO `pre_config` VALUES ('pre_maxmoney', '1000');
|
||||
INSERT INTO `pre_config` VALUES ('blockname', '');
|
||||
INSERT INTO `pre_config` VALUES ('blockalert', '温馨提醒该商品禁止出售,如有疑问请联系网站客服!');
|
||||
INSERT INTO `pre_config` VALUES ('settle_open', '1');
|
||||
INSERT INTO `pre_config` VALUES ('settle_type', '1');
|
||||
INSERT INTO `pre_config` VALUES ('settle_money', '30');
|
||||
INSERT INTO `pre_config` VALUES ('settle_rate', '0.5');
|
||||
INSERT INTO `pre_config` VALUES ('settle_fee_min', '0.1');
|
||||
INSERT INTO `pre_config` VALUES ('settle_fee_max', '20');
|
||||
INSERT INTO `pre_config` VALUES ('settle_alipay', '1');
|
||||
INSERT INTO `pre_config` VALUES ('settle_wxpay', '1');
|
||||
INSERT INTO `pre_config` VALUES ('settle_qqpay', '1');
|
||||
INSERT INTO `pre_config` VALUES ('settle_bank', '0');
|
||||
INSERT INTO `pre_config` VALUES ('transfer_alipay', '0');
|
||||
INSERT INTO `pre_config` VALUES ('transfer_wxpay', '0');
|
||||
INSERT INTO `pre_config` VALUES ('transfer_qqpay', '0');
|
||||
INSERT INTO `pre_config` VALUES ('transfer_name', '聚合支付平台');
|
||||
INSERT INTO `pre_config` VALUES ('transfer_desc', '聚合支付平台自动结算');
|
||||
INSERT INTO `pre_config` VALUES ('login_qq', '0');
|
||||
INSERT INTO `pre_config` VALUES ('login_alipay', '0');
|
||||
INSERT INTO `pre_config` VALUES ('login_alipay_channel', '0');
|
||||
INSERT INTO `pre_config` VALUES ('login_wx', '0');
|
||||
INSERT INTO `pre_config` VALUES ('login_wx_channel', '0');
|
||||
INSERT INTO `pre_config` VALUES ('reg_open', '1');
|
||||
INSERT INTO `pre_config` VALUES ('reg_pay', '1');
|
||||
INSERT INTO `pre_config` VALUES ('reg_pre_uid', '1000');
|
||||
INSERT INTO `pre_config` VALUES ('reg_pre_price', '5');
|
||||
INSERT INTO `pre_config` VALUES ('verifytype', '1');
|
||||
INSERT INTO `pre_config` VALUES ('test_open', '1');
|
||||
INSERT INTO `pre_config` VALUES ('test_pre_uid', '1000');
|
||||
INSERT INTO `pre_config` VALUES ('mail_cloud', '0');
|
||||
INSERT INTO `pre_config` VALUES ('mail_smtp', 'smtp.qq.com');
|
||||
INSERT INTO `pre_config` VALUES ('mail_port', '465');
|
||||
INSERT INTO `pre_config` VALUES ('mail_name', '');
|
||||
INSERT INTO `pre_config` VALUES ('mail_pwd', '');
|
||||
INSERT INTO `pre_config` VALUES ('sms_api', '0');
|
||||
INSERT INTO `pre_config` VALUES ('captcha_open', '1');
|
||||
INSERT INTO `pre_config` VALUES ('captcha_id', '');
|
||||
INSERT INTO `pre_config` VALUES ('captcha_key', '');
|
||||
INSERT INTO `pre_config` VALUES ('onecode', '1');
|
||||
INSERT INTO `pre_config` VALUES ('recharge', '1');
|
||||
INSERT INTO `pre_config` VALUES ('pageordername', '1');
|
||||
INSERT INTO `pre_config` VALUES ('notifyordername', '1');
|
||||
INSERT INTO `pre_config` VALUES ('user_refund', '1');
|
||||
INSERT INTO `pre_config` VALUES ('cdnpublic', '4');
|
||||
INSERT INTO `pre_config` VALUES ('ip_type', '2');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `pre_cache`;
|
||||
create table `pre_cache` (
|
||||
`k` varchar(32) NOT NULL,
|
||||
`v` longtext NULL,
|
||||
`expire` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`k`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_anounce`;
|
||||
create table `pre_anounce` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`content` text DEFAULT NULL,
|
||||
`color` varchar(10) DEFAULT NULL,
|
||||
`sort` int(11) NOT NULL DEFAULT '1',
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_type`;
|
||||
CREATE TABLE `pre_type` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(30) NOT NULL,
|
||||
`device` int(1) unsigned NOT NULL DEFAULT '0',
|
||||
`showname` varchar(30) NOT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `name` (`name`,`device`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO `pre_type` VALUES (1, 'alipay', 0, '支付宝', 1);
|
||||
INSERT INTO `pre_type` VALUES (2, 'wxpay', 0, '微信支付', 1);
|
||||
INSERT INTO `pre_type` VALUES (3, 'qqpay', 0, 'QQ钱包', 1);
|
||||
INSERT INTO `pre_type` VALUES (4, 'bank', 0, '网银支付', 0);
|
||||
INSERT INTO `pre_type` VALUES (5, 'jdpay', 0, '京东支付', 0);
|
||||
INSERT INTO `pre_type` VALUES (6, 'paypal', 0, 'PayPal', 0);
|
||||
|
||||
DROP TABLE IF EXISTS `pre_plugin`;
|
||||
CREATE TABLE `pre_plugin` (
|
||||
`name` varchar(30) NOT NULL,
|
||||
`showname` varchar(60) DEFAULT NULL,
|
||||
`author` varchar(60) DEFAULT NULL,
|
||||
`link` varchar(255) DEFAULT NULL,
|
||||
`types` varchar(50) DEFAULT NULL,
|
||||
`transtypes` varchar(50) DEFAULT NULL,
|
||||
PRIMARY KEY (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_channel`;
|
||||
CREATE TABLE `pre_channel` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`mode` tinyint(1) DEFAULT 0,
|
||||
`type` int(11) unsigned NOT NULL,
|
||||
`plugin` varchar(30) NOT NULL,
|
||||
`name` varchar(30) NOT NULL,
|
||||
`rate` decimal(5,2) NOT NULL DEFAULT '100.00',
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`apptype` varchar(50) DEFAULT NULL,
|
||||
`daytop` int(10) DEFAULT 0,
|
||||
`daystatus` tinyint(1) DEFAULT 0,
|
||||
`paymin` varchar(10) DEFAULT NULL,
|
||||
`paymax` varchar(10) DEFAULT NULL,
|
||||
`appwxmp` int(11) DEFAULT NULL,
|
||||
`appwxa` int(11) DEFAULT NULL,
|
||||
`costrate` decimal(5,2) DEFAULT NULL,
|
||||
`config` text DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `type` (`type`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_roll`;
|
||||
CREATE TABLE `pre_roll` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`type` int(11) unsigned NOT NULL,
|
||||
`name` varchar(30) NOT NULL,
|
||||
`kind` int(1) unsigned NOT NULL DEFAULT '0',
|
||||
`info` text DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`index` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=101;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_weixin`;
|
||||
CREATE TABLE `pre_weixin` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`type` tinyint(4) unsigned NOT NULL DEFAULT '0',
|
||||
`name` varchar(30) NOT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`appid` varchar(150) DEFAULT NULL,
|
||||
`appsecret` varchar(250) DEFAULT NULL,
|
||||
`access_token` varchar(300) DEFAULT NULL,
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`updatetime` datetime DEFAULT NULL,
|
||||
`expiretime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_order`;
|
||||
CREATE TABLE `pre_order` (
|
||||
`trade_no` char(19) NOT NULL,
|
||||
`out_trade_no` varchar(150) NOT NULL,
|
||||
`api_trade_no` varchar(150) DEFAULT NULL,
|
||||
`uid` int(11) unsigned NOT NULL,
|
||||
`tid` tinyint(11) unsigned NOT NULL DEFAULT '0',
|
||||
`type` int(10) unsigned NOT NULL,
|
||||
`channel` int(10) unsigned NOT NULL,
|
||||
`name` varchar(64) NOT NULL,
|
||||
`money` decimal(10,2) NOT NULL,
|
||||
`realmoney` decimal(10,2) DEFAULT NULL,
|
||||
`getmoney` decimal(10,2) DEFAULT NULL,
|
||||
`profitmoney` decimal(10,2) DEFAULT NULL,
|
||||
`refundmoney` decimal(10,2) DEFAULT NULL,
|
||||
`notify_url` varchar(255) DEFAULT NULL,
|
||||
`return_url` varchar(255) DEFAULT NULL,
|
||||
`param` varchar(255) DEFAULT NULL,
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`endtime` datetime DEFAULT NULL,
|
||||
`date` date DEFAULT NULL,
|
||||
`domain` varchar(64) DEFAULT NULL,
|
||||
`domain2` varchar(64) DEFAULT NULL,
|
||||
`ip` varchar(50) DEFAULT NULL,
|
||||
`buyer` varchar(100) DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`notify` int(5) NOT NULL DEFAULT '0',
|
||||
`notifytime` datetime DEFAULT NULL,
|
||||
`invite` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
`invitemoney` decimal(10,2) DEFAULT NULL,
|
||||
`combine` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`profits` int(11) NOT NULL DEFAULT '0',
|
||||
`profits2` int(11) NOT NULL DEFAULT '0',
|
||||
`settle` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`subchannel` int(11) NOT NULL DEFAULT '0',
|
||||
`payurl` varchar(500) DEFAULT NULL,
|
||||
`ext` text DEFAULT NULL,
|
||||
`version` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`bill_trade_no` varchar(150) DEFAULT NULL,
|
||||
`mobile` varchar(100) DEFAULT NULL,
|
||||
PRIMARY KEY (`trade_no`),
|
||||
KEY `uid` (`uid`),
|
||||
KEY `out_trade_no` (`out_trade_no`,`uid`),
|
||||
KEY `api_trade_no` (`api_trade_no`),
|
||||
KEY `bill_trade_no` (`bill_trade_no`),
|
||||
KEY `date` (`date`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_group`;
|
||||
CREATE TABLE `pre_group` (
|
||||
`gid` int(11) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(30) NOT NULL,
|
||||
`info` varchar(1024) DEFAULT NULL,
|
||||
`isbuy` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`price` decimal(10,2) DEFAULT NULL,
|
||||
`sort` int(10) NOT NULL DEFAULT 0,
|
||||
`expire` int(10) NOT NULL DEFAULT 0,
|
||||
`config` text DEFAULT NULL,
|
||||
`settings` text DEFAULT NULL,
|
||||
`visible` varchar(30) DEFAULT NULL,
|
||||
PRIMARY KEY (`gid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO `pre_group` (`gid`, `name`, `info`) VALUES
|
||||
(0, '默认用户组', '{"1":{"type":"","channel":"-1","rate":""},"2":{"type":"","channel":"-1","rate":""},"3":{"type":"","channel":"-1","rate":""}}');
|
||||
UPDATE `pre_group` SET `gid` = '0' WHERE `gid` = 1;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_user`;
|
||||
CREATE TABLE `pre_user` (
|
||||
`uid` int(11) unsigned NOT NULL auto_increment,
|
||||
`gid` int(11) unsigned NOT NULL DEFAULT 0,
|
||||
`upid` int(11) unsigned NOT NULL DEFAULT 0,
|
||||
`key` varchar(32) NOT NULL,
|
||||
`pwd` varchar(32) DEFAULT NULL,
|
||||
`account` varchar(128) DEFAULT NULL,
|
||||
`username` varchar(128) DEFAULT NULL,
|
||||
`codename` varchar(32) DEFAULT NULL,
|
||||
`settle_id` tinyint(4) NOT NULL DEFAULT '1',
|
||||
`alipay_uid` varchar(32) DEFAULT NULL,
|
||||
`qq_uid` varchar(32) DEFAULT NULL,
|
||||
`wx_uid` varchar(32) DEFAULT NULL,
|
||||
`money` decimal(10,2) NOT NULL,
|
||||
`email` varchar(32) DEFAULT NULL,
|
||||
`phone` varchar(20) DEFAULT NULL,
|
||||
`qq` varchar(20) DEFAULT NULL,
|
||||
`url` varchar(64) DEFAULT NULL,
|
||||
`cert` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`certtype` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`certmethod` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`certno` varchar(18) DEFAULT NULL,
|
||||
`certname` varchar(32) DEFAULT NULL,
|
||||
`certtime` datetime DEFAULT NULL,
|
||||
`certtoken` varchar(64) DEFAULT NULL,
|
||||
`certcorpno` varchar(30) DEFAULT NULL,
|
||||
`certcorpname` varchar(80) DEFAULT NULL,
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`lasttime` datetime DEFAULT NULL,
|
||||
`endtime` datetime DEFAULT NULL,
|
||||
`level` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`pay` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`settle` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`keylogin` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`apply` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`mode` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`refund` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`transfer` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`keytype` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`publickey` varchar(500) DEFAULT NULL,
|
||||
`channelinfo` text DEFAULT NULL,
|
||||
`ordername` varchar(255) DEFAULT NULL,
|
||||
`msgconfig` varchar(300) DEFAULT NULL,
|
||||
`remain_money` varchar(20) DEFAULT NULL,
|
||||
`open_code` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`deposit` decimal(10,2) DEFAULT NULL,
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `email` (`email`),
|
||||
KEY `phone` (`phone`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1000;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_settle`;
|
||||
CREATE TABLE `pre_settle` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`uid` int(11) NOT NULL,
|
||||
`batch` varchar(20) DEFAULT NULL,
|
||||
`auto` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`type` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`account` varchar(128) NOT NULL,
|
||||
`username` varchar(128) NOT NULL,
|
||||
`money` decimal(10,2) NOT NULL,
|
||||
`realmoney` decimal(10,2) NOT NULL,
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`endtime` datetime DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`transfer_no` varchar(64) DEFAULT NULL,
|
||||
`transfer_channel` int(10) unsigned DEFAULT NULL,
|
||||
`transfer_status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`transfer_result` varchar(64) DEFAULT NULL,
|
||||
`transfer_date` datetime DEFAULT NULL,
|
||||
`transfer_ext` text DEFAULT NULL,
|
||||
`result` varchar(64) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `uid` (`uid`),
|
||||
KEY `batch` (`batch`),
|
||||
KEY `transfer_no` (`transfer_no`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_log`;
|
||||
CREATE TABLE `pre_log` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`uid` int(11) NOT NULL DEFAULT '0',
|
||||
`type` varchar(20) NULL,
|
||||
`date` datetime NOT NULL,
|
||||
`ip` varchar(50) DEFAULT NULL,
|
||||
`city` varchar(20) DEFAULT NULL,
|
||||
`data` text NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `logincheck` (`ip`,`date`,`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_record`;
|
||||
CREATE TABLE `pre_record` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`uid` int(11) NOT NULL,
|
||||
`action` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`money` decimal(10,2) NOT NULL,
|
||||
`oldmoney` decimal(10,2) NOT NULL,
|
||||
`newmoney` decimal(10,2) NOT NULL,
|
||||
`type` varchar(20) DEFAULT NULL,
|
||||
`trade_no` varchar(64) DEFAULT NULL,
|
||||
`date` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `uid` (`uid`),
|
||||
KEY `trade_no` (`trade_no`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_batch`;
|
||||
CREATE TABLE `pre_batch` (
|
||||
`batch` varchar(20) NOT NULL,
|
||||
`allmoney` decimal(10,2) NOT NULL,
|
||||
`count` int(11) NOT NULL DEFAULT '0',
|
||||
`time` datetime DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`batch`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_regcode`;
|
||||
CREATE TABLE `pre_regcode` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`uid` int(11) NOT NULL DEFAULT '0',
|
||||
`scene` varchar(20) NOT NULL DEFAULT '',
|
||||
`type` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`code` varchar(32) NOT NULL,
|
||||
`to` varchar(32) DEFAULT NULL,
|
||||
`time` int(11) NOT NULL,
|
||||
`ip` varchar(50) DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`errcount` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `code` (`to`,`type`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_risk`;
|
||||
CREATE TABLE `pre_risk` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`uid` int(11) NOT NULL DEFAULT '0',
|
||||
`type` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`url` varchar(64) DEFAULT NULL,
|
||||
`content` varchar(64) DEFAULT NULL,
|
||||
`date` datetime DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `uid` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_domain`;
|
||||
CREATE TABLE `pre_domain` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`uid` int(11) NOT NULL DEFAULT '0',
|
||||
`domain` varchar(128) NOT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`endtime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `domain` (`domain`,`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_psreceiver`;
|
||||
CREATE TABLE `pre_psreceiver` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`channel` int(11) NOT NULL,
|
||||
`subchannel` int(11) DEFAULT NULL,
|
||||
`uid` int(11) DEFAULT NULL,
|
||||
`account` varchar(128) NOT NULL,
|
||||
`name` varchar(50) DEFAULT NULL,
|
||||
`rate` varchar(10) DEFAULT NULL,
|
||||
`minmoney` varchar(10) DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `channel` (`channel`,`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_psorder`;
|
||||
CREATE TABLE `pre_psorder` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`rid` int(11) NOT NULL,
|
||||
`trade_no` char(19) NOT NULL,
|
||||
`api_trade_no` varchar(150) NOT NULL,
|
||||
`settle_no` varchar(150) DEFAULT NULL,
|
||||
`money` decimal(10,2) NOT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`result` text DEFAULT NULL,
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`delay` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `trade_no` (`trade_no`),
|
||||
KEY `addtime` (`addtime`,`delay`,`status`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_subchannel`;
|
||||
CREATE TABLE `pre_subchannel` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`channel` int(11) NOT NULL,
|
||||
`uid` int(11) NOT NULL,
|
||||
`name` varchar(30) NOT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`info` text DEFAULT NULL,
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`usetime` datetime DEFAULT NULL,
|
||||
`apply_id` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `channel` (`channel`),
|
||||
KEY `uid` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_blacklist`;
|
||||
CREATE TABLE `pre_blacklist` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`type` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`content` varchar(50) NOT NULL,
|
||||
`addtime` datetime NOT NULL,
|
||||
`endtime` datetime DEFAULT NULL,
|
||||
`remark` varchar(80) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `content`(`content`,`type`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_wework`;
|
||||
CREATE TABLE `pre_wework` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(30) NOT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`appid` varchar(150) DEFAULT NULL,
|
||||
`appsecret` varchar(250) DEFAULT NULL,
|
||||
`access_token` varchar(300) DEFAULT NULL,
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`updatetime` datetime DEFAULT NULL,
|
||||
`expiretime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_wxkfaccount`;
|
||||
CREATE TABLE `pre_wxkfaccount` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`wid` int(11) unsigned NOT NULL,
|
||||
`openkfid` varchar(60) NOT NULL,
|
||||
`url` varchar(100) DEFAULT NULL,
|
||||
`cursor` varchar(30) DEFAULT NULL,
|
||||
`name` varchar(300) DEFAULT NULL,
|
||||
`addtime` datetime NOT NULL,
|
||||
`usetime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `wid`(`wid`),
|
||||
UNIQUE KEY `openkfid`(`openkfid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_wxkflog`;
|
||||
CREATE TABLE `pre_wxkflog` (
|
||||
`trade_no` char(19) NOT NULL,
|
||||
`aid` int(11) unsigned NOT NULL,
|
||||
`sid` char(32) NOT NULL,
|
||||
`payurl` varchar(500) NOT NULL,
|
||||
`addtime` datetime NOT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`trade_no`),
|
||||
KEY `sid`(`sid`),
|
||||
KEY `addtime`(`addtime`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_transfer`;
|
||||
CREATE TABLE `pre_transfer` (
|
||||
`biz_no` char(19) NOT NULL,
|
||||
`pay_order_no` varchar(80) DEFAULT NULL,
|
||||
`uid` int(11) NOT NULL,
|
||||
`type` varchar(10) NOT NULL,
|
||||
`channel` int(10) unsigned NOT NULL,
|
||||
`account` varchar(128) NOT NULL,
|
||||
`username` varchar(128) DEFAULT NULL,
|
||||
`money` decimal(10,2) NOT NULL,
|
||||
`costmoney` decimal(10,2) DEFAULT NULL,
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`paytime` datetime DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`api` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`desc` varchar(80) DEFAULT NULL,
|
||||
`result` varchar(80) DEFAULT NULL,
|
||||
`ext` text DEFAULT NULL,
|
||||
PRIMARY KEY (`biz_no`),
|
||||
KEY `uid` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_invitecode`;
|
||||
CREATE TABLE `pre_invitecode` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`code` varchar(40) NOT NULL,
|
||||
`addtime` datetime NOT NULL,
|
||||
`usetime` datetime DEFAULT NULL,
|
||||
`uid` int(11) DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `code` (`code`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_refundorder`;
|
||||
CREATE TABLE `pre_refundorder` (
|
||||
`refund_no` char(19) NOT NULL,
|
||||
`out_refund_no` varchar(150) NOT NULL,
|
||||
`trade_no` char(19) NOT NULL,
|
||||
`uid` int(11) NOT NULL DEFAULT '0',
|
||||
`money` decimal(10,2) NOT NULL,
|
||||
`reducemoney` decimal(10,2) DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`endtime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`refund_no`),
|
||||
KEY `out_refund_no` (`out_refund_no`,`uid`),
|
||||
KEY `trade_no` (`trade_no`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `pre_suborder`;
|
||||
CREATE TABLE `pre_suborder` (
|
||||
`sub_trade_no` varchar(25) NOT NULL,
|
||||
`trade_no` char(19) NOT NULL,
|
||||
`api_trade_no` varchar(150) DEFAULT NULL,
|
||||
`money` decimal(10,2) NOT NULL,
|
||||
`refundmoney` decimal(10,2) DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`settle` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`sub_trade_no`),
|
||||
KEY `trade_no` (`trade_no`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
error_reporting(0);
|
||||
define('DB_VERSION', '2045');
|
||||
require '../config.php';
|
||||
|
||||
@header('Content-Type: text/html; charset=UTF-8');
|
||||
|
||||
try{
|
||||
$db=new PDO("mysql:host=".$dbconfig['host'].";dbname=".$dbconfig['dbname'].";port=".$dbconfig['port'],$dbconfig['user'],$dbconfig['pwd']);
|
||||
}catch(Exception $e){
|
||||
exit('链接数据库失败:'.$e->getMessage());
|
||||
}
|
||||
date_default_timezone_set("PRC");
|
||||
$date = date("Y-m-d");
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
|
||||
$db->exec("set sql_mode = ''");
|
||||
$db->exec("set names utf8");
|
||||
|
||||
$version = 0;
|
||||
if($rs = $db->query("SELECT v FROM pay_config WHERE k='version'")){
|
||||
$version = $rs->fetchColumn();
|
||||
}
|
||||
|
||||
if($version==DB_VERSION){
|
||||
exit('你的网站已经升级到最新版本了');
|
||||
}elseif($version<2044){
|
||||
$sqls = file_get_contents('update2.sql');
|
||||
$sqls .= file_get_contents('update3.sql');
|
||||
$sqls=explode(';', $sqls);
|
||||
$sqls[]="UPDATE `pre_config` SET `v` = '".DB_VERSION."' where `k` = 'version'";
|
||||
}elseif($version<DB_VERSION){
|
||||
$sqls = file_get_contents('update3.sql');
|
||||
$sqls=explode(';', $sqls);
|
||||
$sqls[]="UPDATE `pre_config` SET `v` = '".DB_VERSION."' where `k` = 'version'";
|
||||
}else{
|
||||
exit('数据库不兼容,请重新安装!');
|
||||
}
|
||||
$sqls[]="UPDATE `pre_cache` SET `v` = '' where `k` = 'config'";
|
||||
$success=0;$error=0;$errorMsg=null;
|
||||
foreach ($sqls as $value) {
|
||||
$value=trim($value);
|
||||
if(empty($value))continue;
|
||||
$value = str_replace('pre_',$dbconfig['dbqz'].'_',$value);
|
||||
if($db->exec($value)===false){
|
||||
$error++;
|
||||
$dberror=$db->errorInfo();
|
||||
$errorMsg.=$dberror[2]."<br>";
|
||||
}else{
|
||||
$success++;
|
||||
}
|
||||
}
|
||||
echo '成功执行SQL语句'.$success.'条!<br/>';
|
||||
if($errorMsg){
|
||||
//echo '<div class="alert alert-danger text-center" role="alert">'.$errorMsg.'</div>';
|
||||
}
|
||||
echo '<hr/><a href="/">点此返回首页</a>';
|
||||
?>
|
||||
@@ -0,0 +1,322 @@
|
||||
ALTER TABLE `pre_channel`
|
||||
ADD COLUMN `mode` int(1) DEFAULT 0;
|
||||
|
||||
ALTER TABLE `pre_channel`
|
||||
ADD COLUMN `daytop` int(10) DEFAULT 0,
|
||||
ADD COLUMN `daystatus` int(1) DEFAULT 0;
|
||||
|
||||
ALTER TABLE `pre_user`
|
||||
ADD COLUMN `channelinfo` text DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_group`
|
||||
ADD COLUMN `settle_open` int(1) DEFAULT 0,
|
||||
ADD COLUMN `settle_type` int(1) DEFAULT 0,
|
||||
ADD COLUMN `settings` text DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_channel`
|
||||
ADD COLUMN `paymin` varchar(10) DEFAULT NULL,
|
||||
ADD COLUMN `paymax` varchar(10) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_order`
|
||||
ADD COLUMN `notifytime` datetime DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_order`
|
||||
ADD COLUMN `param` varchar(255) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_user`
|
||||
ADD COLUMN `certtype` tinyint(4) NOT NULL DEFAULT '0',
|
||||
ADD COLUMN `certtoken` varchar(64) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_order`
|
||||
ADD COLUMN `domain2` varchar(64) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_user`
|
||||
CHANGE COLUMN `wxid` `wx_uid` varchar(32) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_user`
|
||||
ADD COLUMN `certmethod` tinyint(4) NOT NULL DEFAULT '0',
|
||||
ADD COLUMN `certcorpno` varchar(30) DEFAULT NULL,
|
||||
ADD COLUMN `certcorpname` varchar(80) DEFAULT NULL,
|
||||
ADD COLUMN `ordername` varchar(255) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_regcode`
|
||||
ADD COLUMN `errcount` int(11) NOT NULL DEFAULT '0';
|
||||
|
||||
ALTER TABLE `pre_channel`
|
||||
ADD COLUMN `appwxmp` int(11) DEFAULT NULL,
|
||||
ADD COLUMN `appwxa` int(11) DEFAULT NULL,
|
||||
ADD COLUMN `appswitch` tinyint(4) DEFAULT NULL;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pre_weixin` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`type` tinyint(4) unsigned NOT NULL DEFAULT '0',
|
||||
`name` varchar(30) NOT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`appid` varchar(150) DEFAULT NULL,
|
||||
`appsecret` varchar(250) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO `pre_type` VALUES (6, 'paypal', 0, 'PayPal', 0);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pre_domain` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`uid` int(11) NOT NULL DEFAULT '0',
|
||||
`domain` varchar(128) NOT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`endtime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `domain` (`domain`,`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `pre_user`
|
||||
ADD COLUMN `refund` tinyint(1) NOT NULL DEFAULT '0';
|
||||
|
||||
ALTER TABLE `pre_order`
|
||||
ADD COLUMN `combine` tinyint(1) NOT NULL DEFAULT '0',
|
||||
ADD COLUMN `profits` int(11) NOT NULL DEFAULT '0';
|
||||
|
||||
ALTER TABLE `pre_user`
|
||||
ADD COLUMN `endtime` datetime DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_order`
|
||||
ADD COLUMN `profits2` int(11) NOT NULL DEFAULT '0';
|
||||
|
||||
ALTER TABLE `pre_order`
|
||||
ADD COLUMN `settle` tinyint(1) NOT NULL DEFAULT '0';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pre_psreceiver` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`channel` int(11) NOT NULL,
|
||||
`uid` int(11) DEFAULT NULL,
|
||||
`account` varchar(128) NOT NULL,
|
||||
`name` varchar(50) DEFAULT NULL,
|
||||
`rate` varchar(10) DEFAULT NULL,
|
||||
`minmoney` varchar(10) DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `channel` (`channel`,`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pre_psorder` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`rid` int(11) NOT NULL,
|
||||
`trade_no` char(19) NOT NULL,
|
||||
`api_trade_no` varchar(150) NOT NULL,
|
||||
`settle_no` varchar(150) DEFAULT NULL,
|
||||
`money` decimal(10,2) NOT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`result` text DEFAULT NULL,
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `trade_no` (`trade_no`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pre_subchannel` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`channel` int(11) NOT NULL,
|
||||
`uid` int(11) NOT NULL,
|
||||
`name` varchar(30) NOT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`info` text DEFAULT NULL,
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`usetime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `channel` (`channel`),
|
||||
KEY `uid` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `pre_order`
|
||||
ADD COLUMN `subchannel` int(11) NOT NULL DEFAULT '0';
|
||||
|
||||
ALTER TABLE `pre_order`
|
||||
ADD COLUMN `payurl` varchar(500) DEFAULT NULL,
|
||||
ADD COLUMN `ext` text DEFAULT NULL;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pre_blacklist` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`type` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`content` varchar(50) NOT NULL,
|
||||
`addtime` datetime NOT NULL,
|
||||
`endtime` datetime DEFAULT NULL,
|
||||
`remark` varchar(80) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `content`(`content`,`type`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `pre_group`
|
||||
ADD COLUMN `settle_rate` varchar(10) DEFAULT NULL;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pre_wework` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(30) NOT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`appid` varchar(150) DEFAULT NULL,
|
||||
`appsecret` varchar(250) DEFAULT NULL,
|
||||
`access_token` varchar(300) DEFAULT NULL,
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`updatetime` datetime DEFAULT NULL,
|
||||
`expiretime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pre_wxkfaccount` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`wid` int(11) unsigned NOT NULL,
|
||||
`openkfid` varchar(60) NOT NULL,
|
||||
`url` varchar(100) DEFAULT NULL,
|
||||
`cursor` varchar(30) DEFAULT NULL,
|
||||
`name` varchar(300) DEFAULT NULL,
|
||||
`addtime` datetime NOT NULL,
|
||||
`usetime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `wid`(`wid`),
|
||||
UNIQUE KEY `openkfid`(`openkfid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pre_wxkflog` (
|
||||
`trade_no` char(19) NOT NULL,
|
||||
`aid` int(11) unsigned NOT NULL,
|
||||
`sid` char(32) NOT NULL,
|
||||
`payurl` varchar(500) NOT NULL,
|
||||
`addtime` datetime NOT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`trade_no`),
|
||||
KEY `sid`(`sid`),
|
||||
KEY `addtime`(`addtime`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `pre_weixin`
|
||||
ADD COLUMN `access_token` varchar(300) DEFAULT NULL,
|
||||
ADD COLUMN `addtime` datetime DEFAULT NULL,
|
||||
ADD COLUMN `updatetime` datetime DEFAULT NULL,
|
||||
ADD COLUMN `expiretime` datetime DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_wxkfaccount`
|
||||
ADD COLUMN `name` varchar(300) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_user`
|
||||
ADD COLUMN `msgconfig` varchar(300) DEFAULT NULL;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pre_transfer` (
|
||||
`biz_no` char(19) NOT NULL,
|
||||
`pay_order_no` varchar(80) DEFAULT NULL,
|
||||
`uid` int(11) NOT NULL,
|
||||
`type` varchar(10) NOT NULL,
|
||||
`channel` int(10) unsigned NOT NULL,
|
||||
`account` varchar(128) NOT NULL,
|
||||
`username` varchar(128) DEFAULT NULL,
|
||||
`money` decimal(10,2) NOT NULL,
|
||||
`costmoney` decimal(10,2) DEFAULT NULL,
|
||||
`paytime` datetime DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`api` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`desc` varchar(80) DEFAULT NULL,
|
||||
`result` varchar(80) DEFAULT NULL,
|
||||
PRIMARY KEY (`biz_no`),
|
||||
KEY uid (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `pre_plugin`
|
||||
ADD COLUMN `transtypes` varchar(50) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_regcode`
|
||||
ADD COLUMN `scene` varchar(20) NOT NULL DEFAULT '';
|
||||
|
||||
ALTER TABLE `pre_group`
|
||||
ADD COLUMN `config` text DEFAULT NULL,
|
||||
DROP COLUMN `settle_open`,
|
||||
DROP COLUMN `settle_type`,
|
||||
DROP COLUMN `settle_rate`;
|
||||
|
||||
UPDATE pre_config SET v='0' WHERE k='settle_type' AND v='2';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pre_invitecode` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`code` varchar(40) NOT NULL,
|
||||
`addtime` datetime NOT NULL,
|
||||
`usetime` datetime DEFAULT NULL,
|
||||
`uid` int(11) DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `code` (`code`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `pre_subchannel`
|
||||
ADD COLUMN `apply_id` int(11) DEFAULT NULL;
|
||||
ALTER TABLE `pre_channel`
|
||||
ADD COLUMN `costrate` decimal(5,2) DEFAULT NULL;
|
||||
ALTER TABLE `pre_order`
|
||||
ADD COLUMN `profitmoney` decimal(10,2) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_channel`
|
||||
ADD COLUMN `config` text DEFAULT NULL;
|
||||
ALTER TABLE `pre_order`
|
||||
ADD COLUMN `refundmoney` decimal(10,2) DEFAULT NULL,
|
||||
ADD COLUMN `version` tinyint(1) NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `pre_user`
|
||||
ADD COLUMN `transfer` tinyint(1) NOT NULL DEFAULT '0',
|
||||
ADD COLUMN `keytype` tinyint(1) NOT NULL DEFAULT '0',
|
||||
ADD COLUMN `publickey` varchar(500) DEFAULT NULL;
|
||||
CREATE TABLE IF NOT EXISTS `pre_refundorder` (
|
||||
`refund_no` char(19) NOT NULL,
|
||||
`out_refund_no` varchar(150) NOT NULL,
|
||||
`trade_no` char(19) NOT NULL,
|
||||
`uid` int(11) NOT NULL DEFAULT '0',
|
||||
`money` decimal(10,2) NOT NULL,
|
||||
`reducemoney` decimal(10,2) DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`addtime` datetime DEFAULT NULL,
|
||||
`endtime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`refund_no`),
|
||||
KEY `out_refund_no` (`out_refund_no`,`uid`),
|
||||
KEY `trade_no` (`trade_no`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `pre_log`
|
||||
ADD INDEX `logincheck` (`ip`,`date`,`uid`);
|
||||
ALTER TABLE `pre_order`
|
||||
ADD COLUMN `bill_trade_no` varchar(150) DEFAULT NULL,
|
||||
ADD INDEX `bill_trade_no` (`bill_trade_no`);
|
||||
|
||||
ALTER TABLE `pre_user`
|
||||
ADD COLUMN `remain_money` varchar(20) DEFAULT NULL,
|
||||
ADD COLUMN `open_code` tinyint(1) NOT NULL DEFAULT '0';
|
||||
|
||||
ALTER TABLE `pre_psreceiver`
|
||||
ADD COLUMN `subchannel` int(11) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_transfer`
|
||||
ADD COLUMN `addtime` datetime DEFAULT NULL,
|
||||
ADD COLUMN `ext` text DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_settle`
|
||||
ADD COLUMN `transfer_channel` int(10) unsigned DEFAULT NULL,
|
||||
ADD COLUMN `transfer_no` varchar(64) DEFAULT NULL,
|
||||
ADD COLUMN `transfer_ext` text DEFAULT NULL,
|
||||
ADD INDEX `transfer_no` (`transfer_no`);
|
||||
|
||||
ALTER TABLE `pre_order`
|
||||
ADD COLUMN `mobile` varchar(100) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_user`
|
||||
ADD COLUMN `deposit` decimal(10,2) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_order`
|
||||
MODIFY COLUMN `ip` varchar(50) DEFAULT NULL;
|
||||
ALTER TABLE `pre_log`
|
||||
MODIFY COLUMN `ip` varchar(50) DEFAULT NULL;
|
||||
ALTER TABLE `pre_regcode`
|
||||
MODIFY COLUMN `ip` varchar(50) DEFAULT NULL;
|
||||
ALTER TABLE `pre_user`
|
||||
MODIFY COLUMN `msgconfig` varchar(300) DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `pre_group`
|
||||
ADD COLUMN `visible` varchar(30) DEFAULT NULL;
|
||||
ALTER TABLE `pre_psorder`
|
||||
ADD COLUMN `delay` tinyint(1) NOT NULL DEFAULT '0',
|
||||
ADD INDEX `addtime` (`addtime`,`delay`,`status`);
|
||||
ALTER TABLE `pre_order`
|
||||
MODIFY COLUMN `buyer` varchar(100) DEFAULT NULL;
|
||||
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE IF NOT EXISTS `pre_suborder` (
|
||||
`sub_trade_no` varchar(25) NOT NULL,
|
||||
`trade_no` char(19) NOT NULL,
|
||||
`api_trade_no` varchar(150) DEFAULT NULL,
|
||||
`money` decimal(10,2) NOT NULL,
|
||||
`refundmoney` decimal(10,2) DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`settle` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`sub_trade_no`),
|
||||
KEY `trade_no` (`trade_no`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
Reference in New Issue
Block a user