-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- 主机： localhost
-- 生成日期： 2021-12-27 15:33:42
-- 服务器版本： 5.6.50-log
-- PHP 版本： 7.4.27

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- 数据库： `api_qizhixiong_c`
--

-- --------------------------------------------------------

--
-- 表的结构 `black_card`
--

CREATE TABLE `black_card` (
  `id` int(11) UNSIGNED NOT NULL,
  `type` tinyint(11) NOT NULL DEFAULT '1' COMMENT '1完全匹配2包含3不包含',
  `value` varchar(2000) DEFAULT NULL COMMENT '卡号',
  `desc` varchar(500) DEFAULT NULL COMMENT '备注',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1可用0不可用',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='卡号黑名单';

-- --------------------------------------------------------

--
-- 表的结构 `channel_account`
--

CREATE TABLE `channel_account` (
  `id` bigint(20) NOT NULL,
  `day` varchar(50) DEFAULT NULL COMMENT '日期',
  `cid` bigint(20) DEFAULT NULL COMMENT '渠道id',
  `num` varchar(50) DEFAULT '0' COMMENT '成功金额',
  `add` varchar(50) NOT NULL DEFAULT '0' COMMENT '当日加款',
  `hui` varchar(50) NOT NULL DEFAULT '0' COMMENT '截止23时待回款',
  `yue` varchar(50) NOT NULL DEFAULT '0' COMMENT '截止23时余额',
  `dong` varchar(50) NOT NULL DEFAULT '0' COMMENT '冻结额度',
  `zhang` varchar(50) NOT NULL DEFAULT '0',
  `desc` varchar(1000) DEFAULT NULL,
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户-充值-日志';

-- --------------------------------------------------------

--
-- 表的结构 `channel_card`
--

CREATE TABLE `channel_card` (
  `id` int(11) UNSIGNED NOT NULL,
  `cnum` varchar(100) DEFAULT NULL COMMENT '卡号',
  `cpwd` varchar(100) DEFAULT NULL COMMENT '密码',
  `value` int(11) NOT NULL DEFAULT '0' COMMENT '面值',
  `use` tinyint(1) NOT NULL DEFAULT '1' COMMENT '使用状态1可用2下单中3下单成功4下单失败5充值成功6渠道充值失败7卡密充值失败',
  `chongzhi_use` tinyint(1) NOT NULL DEFAULT '1',
  `use_num` int(11) NOT NULL DEFAULT '0' COMMENT '使用次数',
  `use_mid` int(11) NOT NULL DEFAULT '-1' COMMENT '分配的商户',
  `use_info` varchar(1000) DEFAULT NULL COMMENT '充值说明',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态1可用0禁用',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='卡密表';

-- --------------------------------------------------------

--
-- 表的结构 `channel_list`
--

CREATE TABLE `channel_list` (
  `id` bigint(20) NOT NULL,
  `name` varchar(50) DEFAULT '' COMMENT '渠道名称',
  `key` varchar(100) DEFAULT NULL COMMENT '渠道关键词',
  `order_limit` int(11) NOT NULL DEFAULT '0' COMMENT '每分钟请求次数',
  `system_id` int(11) NOT NULL DEFAULT '0' COMMENT '系统id',
  `contacts` varchar(50) DEFAULT NULL COMMENT '联系人',
  `phone` varchar(50) DEFAULT NULL COMMENT '联系电话',
  `percent` decimal(10,0) DEFAULT '0' COMMENT '渠道分成',
  `mid` varchar(100) DEFAULT NULL COMMENT '商户id',
  `token` varchar(8000) DEFAULT NULL COMMENT '商户token',
  `host` varchar(255) DEFAULT NULL COMMENT '接口主机域名',
  `notify_url` varchar(255) DEFAULT '' COMMENT '回调地址',
  `describe` varchar(255) DEFAULT '' COMMENT '渠道备注',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态(0禁用,1启用)',
  `sort` bigint(20) DEFAULT '0' COMMENT '排序权重',
  `is_deleted` tinyint(1) DEFAULT '0' COMMENT '删除(1删除,0未删)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='渠道';

--
-- 转存表中的数据 `channel_list`
--

INSERT INTO `channel_list` (`id`, `name`, `key`, `order_limit`, `system_id`, `contacts`, `phone`, `percent`, `mid`, `token`, `host`, `notify_url`, `describe`, `status`, `sort`, `is_deleted`, `create_at`) VALUES
(1, '测试渠道', 'test', 0, 0, NULL, NULL, '0', 'test', 'test', 'test', '', '', 1, 0, 0, '2021-12-27 07:03:52');

-- --------------------------------------------------------

--
-- 表的结构 `channel_percent`
--

CREATE TABLE `channel_percent` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `cid` bigint(20) DEFAULT '0' COMMENT '所属渠道',
  `pid` int(11) DEFAULT NULL COMMENT '产品id',
  `percent_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '分成类型1折扣，2固定数值',
  `percent` decimal(10,4) DEFAULT NULL COMMENT '渠道分成',
  `rule` varchar(2000) DEFAULT NULL COMMENT '分面值规则',
  `gid` varchar(100) DEFAULT NULL COMMENT '默认产品id',
  `gid_rule` varchar(2000) DEFAULT NULL COMMENT '按面值产品id',
  `order_limit` varchar(100) DEFAULT NULL COMMENT '每分钟订单数',
  `order_limit_rule` varchar(2000) DEFAULT NULL COMMENT '分面值每分钟订单数',
  `isp_rule` varchar(1000) DEFAULT NULL,
  `status` tinyint(1) UNSIGNED DEFAULT '1' COMMENT '使用状态',
  `is_deleted` tinyint(1) UNSIGNED DEFAULT '0' COMMENT '删除状态',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='渠道-商品' ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `channel_product`
--

CREATE TABLE `channel_product` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `cid` bigint(20) DEFAULT '0' COMMENT '所属渠道',
  `service_id` int(11) NOT NULL DEFAULT '0' COMMENT '业务ID，service_info的id',
  `percent_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '分成类型1折扣，2固定数值',
  `percent` decimal(10,4) NOT NULL DEFAULT '0.0000' COMMENT '分成',
  `shop_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT '' COMMENT '商品名称',
  `key` varchar(100) DEFAULT '' COMMENT '拼音KEY',
  `remark` varchar(999) DEFAULT NULL COMMENT '商品描述',
  `opentime` varchar(1000) DEFAULT NULL COMMENT '开放时间可以是区间值',
  `value` varchar(800) NOT NULL DEFAULT '0' COMMENT '面值，多个逗号隔开',
  `auto_value` varchar(800) NOT NULL DEFAULT '0' COMMENT '自动切换渠道的面额',
  `limit_order` int(11) NOT NULL DEFAULT '0' COMMENT '同时限制处理订单数',
  `sort` bigint(20) UNSIGNED DEFAULT '0' COMMENT '排序权重',
  `rule` varchar(5000) DEFAULT NULL COMMENT '分面值规则',
  `gid` varchar(100) DEFAULT NULL COMMENT '默认产品id',
  `gid_rule` varchar(5000) DEFAULT NULL COMMENT '按面值产品id',
  `order_limit` varchar(100) DEFAULT NULL COMMENT '每分钟订单数',
  `order_limit_rule` varchar(2000) DEFAULT NULL COMMENT '分面值每分钟订单数',
  `status` tinyint(1) UNSIGNED DEFAULT '1' COMMENT '使用状态',
  `is_deleted` tinyint(1) UNSIGNED DEFAULT '0' COMMENT '删除状态',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='渠道-商品' ROW_FORMAT=COMPACT;

--
-- 转存表中的数据 `channel_product`
--

INSERT INTO `channel_product` (`id`, `cid`, `service_id`, `percent_type`, `percent`, `shop_id`, `name`, `key`, `remark`, `opentime`, `value`, `auto_value`, `limit_order`, `sort`, `rule`, `gid`, `gid_rule`, `order_limit`, `order_limit_rule`, `status`, `is_deleted`, `create_at`) VALUES
(1, 1, 1, 1, '0.0000', NULL, '通用中石化油卡充值', 'zshcz', NULL, NULL, '50,100,200,500,1000,2000', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 1, 0, '2021-12-27 07:26:23'),
(2, 1, 2, 1, '0.0000', NULL, '通用中石油油卡充值', 'zsycz', NULL, NULL, '50,100,200,500,1000,2000', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 1, 0, '2021-12-27 07:26:23'),
(3, 1, 3, 1, '0.0000', NULL, '通用话费充值', 'dhcz', NULL, NULL, '移动,联通,电信', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 1, 0, '2021-12-27 07:31:34'),
(4, 1, 5, 1, '0.0000', NULL, '抖音币', 'dy', NULL, NULL, '20,30,50,100,200,300,500,1000,2000', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 1, 0, '2021-12-27 07:31:34');

-- --------------------------------------------------------

--
-- 表的结构 `channel_shop`
--

CREATE TABLE `channel_shop` (
  `id` int(11) NOT NULL,
  `cid` int(11) NOT NULL COMMENT '渠道id',
  `name` varchar(200) DEFAULT NULL,
  `shop_id` varchar(11) DEFAULT NULL,
  `value` varchar(1000) DEFAULT NULL COMMENT '面值，暂时没用',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `status` tinyint(1) DEFAULT '1',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `merchant_account`
--

CREATE TABLE `merchant_account` (
  `id` bigint(20) NOT NULL,
  `day` varchar(50) DEFAULT NULL COMMENT '日期',
  `mid` bigint(20) DEFAULT NULL COMMENT '商户id',
  `num` varchar(50) DEFAULT '0' COMMENT '成功金额',
  `add` varchar(50) NOT NULL DEFAULT '0' COMMENT '当日加款',
  `hui` varchar(50) NOT NULL DEFAULT '0' COMMENT '截止23时待回款',
  `yue` varchar(50) NOT NULL DEFAULT '0' COMMENT '截止23时余额',
  `dong` varchar(50) NOT NULL DEFAULT '0' COMMENT '冻结额度',
  `desc` varchar(1000) DEFAULT NULL,
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户-充值-日志';

-- --------------------------------------------------------

--
-- 表的结构 `merchant_account_log`
--

CREATE TABLE `merchant_account_log` (
  `id` bigint(20) NOT NULL,
  `type` tinyint(1) DEFAULT '1' COMMENT '1 => ''后台充值'', 2 => ''后台减少'', 3 => ''API使用''',
  `oper` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1增加2减少',
  `is_type` tinyint(1) DEFAULT '1' COMMENT '1充值；2授信',
  `account_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '账户类型1余额账户2授信账户',
  `mid` bigint(20) DEFAULT NULL COMMENT '商户id',
  `num` decimal(60,2) DEFAULT '0.00' COMMENT '充值金额',
  `yue` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '当前余额',
  `qian_yue` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变动前余额',
  `is_yue` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否计入余额1计入2不计入',
  `order_id` varchar(200) DEFAULT NULL COMMENT '订单id',
  `order_date` timestamp NULL DEFAULT NULL COMMENT '订单下单时间',
  `product_cash` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '所使用的产品分成计算后的价格',
  `profit` decimal(10,2) NOT NULL DEFAULT '0.00',
  `pid` int(11) NOT NULL DEFAULT '0' COMMENT '产品id',
  `desc` longtext COMMENT '充值说明',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户-充值-日志';

-- --------------------------------------------------------

--
-- 表的结构 `merchant_account_log_history`
--

CREATE TABLE `merchant_account_log_history` (
  `id` bigint(20) NOT NULL,
  `log_id` int(11) NOT NULL,
  `type` tinyint(1) DEFAULT '1' COMMENT '1,授信 2,充值 3,API',
  `oper` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1增加2减少',
  `account_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '账户类型1充值、2授信',
  `mid` bigint(20) DEFAULT NULL COMMENT '商户id',
  `num` decimal(60,2) DEFAULT '0.00' COMMENT '充值金额',
  `yue` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '当前余额',
  `is_yue` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否计入余额1计入2不计入',
  `order_id` varchar(100) DEFAULT NULL COMMENT '订单id',
  `order_date` timestamp NULL DEFAULT NULL COMMENT '订单下单时间',
  `product_cash` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '所使用的产品分成计算后的价格',
  `profit` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '本单利润',
  `pid` int(11) NOT NULL DEFAULT '0' COMMENT '产品id',
  `desc` longtext COMMENT '充值说明',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户-充值-日志';

-- --------------------------------------------------------

--
-- 表的结构 `merchant_card`
--

CREATE TABLE `merchant_card` (
  `id` int(11) UNSIGNED NOT NULL,
  `card_id` int(11) NOT NULL,
  `mid` int(11) NOT NULL,
  `order_id` varchar(800) NOT NULL COMMENT '系统订单号',
  `card` varchar(100) DEFAULT NULL COMMENT '油卡卡号',
  `cash` varchar(100) DEFAULT NULL COMMENT '油卡面额',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '使用状态1可用2下单中3下单成功4下单失败5充值成功6渠道充值失败7卡密充值失败',
  `info` varchar(1000) DEFAULT NULL COMMENT '充值说明',
  `msg` varchar(1000) DEFAULT NULL,
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商户使用卡密记录表';

-- --------------------------------------------------------

--
-- 表的结构 `merchant_card_mobile`
--

CREATE TABLE `merchant_card_mobile` (
  `id` int(11) UNSIGNED NOT NULL,
  `card` varchar(100) DEFAULT NULL COMMENT '油卡卡号',
  `mobile` varchar(100) DEFAULT NULL COMMENT '手机号',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商户使用卡密记录表';

-- --------------------------------------------------------

--
-- 表的结构 `merchant_day`
--

CREATE TABLE `merchant_day` (
  `id` int(11) UNSIGNED NOT NULL,
  `mid` int(11) NOT NULL,
  `day` int(11) NOT NULL,
  `account_surplus` decimal(20,2) DEFAULT '0.00' COMMENT '	账户余额',
  `account_add` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '当日加款',
  `account_des` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '当日退款',
  `account_consum` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '当日消费',
  `credit_surplus` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '授信余额',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1未结算2已结算',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `merchant_dong_log`
--

CREATE TABLE `merchant_dong_log` (
  `id` bigint(20) NOT NULL,
  `day` varchar(50) DEFAULT NULL COMMENT '日期',
  `mid` bigint(20) DEFAULT NULL COMMENT '商户id',
  `num` varchar(50) DEFAULT '0' COMMENT '成功金额',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户-充值-日志';

-- --------------------------------------------------------

--
-- 表的结构 `merchant_list`
--

CREATE TABLE `merchant_list` (
  `id` bigint(20) NOT NULL,
  `name` varchar(50) DEFAULT NULL COMMENT '商户名称',
  `username` varchar(50) DEFAULT NULL COMMENT '商户后台登陆账号',
  `password` varchar(32) DEFAULT NULL COMMENT '登陆密码',
  `show_pwd` varchar(1000) DEFAULT NULL,
  `headimg` varchar(255) DEFAULT '' COMMENT '头像地址',
  `authorize` varchar(255) DEFAULT '2' COMMENT '权限授权-默认给商户查询后台权限',
  `contacts` varchar(50) DEFAULT NULL COMMENT '联系人',
  `phone` varchar(50) DEFAULT NULL COMMENT '联系电话',
  `percent` decimal(10,4) DEFAULT '0.0000' COMMENT '渠道分成%',
  `account_total` decimal(20,2) DEFAULT '0.00' COMMENT '累计充值',
  `account_surplus` decimal(20,2) DEFAULT '0.00' COMMENT '账户余额',
  `account_baitiao` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '余额白条额度',
  `account_consum` decimal(20,2) DEFAULT '0.00' COMMENT '累计消费',
  `credit_total` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '授信额度',
  `credit_surplus` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '授信账户当前余额',
  `credit_consum` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '授信账户消费余额',
  `appid` varchar(100) DEFAULT '' COMMENT 'AppID',
  `appsecret` varchar(100) DEFAULT '' COMMENT 'AppKey',
  `api_url` varchar(255) DEFAULT '' COMMENT '接口地址',
  `notify_url` varchar(255) DEFAULT '' COMMENT '回调地址',
  `notify_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1post2postjson3get4getjson',
  `describe` varchar(255) DEFAULT '' COMMENT '商户备注',
  `login_ip` varchar(255) DEFAULT NULL COMMENT '登录地址',
  `login_at` varchar(20) DEFAULT NULL COMMENT '登录时间',
  `login_num` bigint(20) DEFAULT '0' COMMENT '登录次数',
  `cids` varchar(1000) DEFAULT NULL COMMENT '商户使用的渠道列表',
  `auto` tinyint(1) NOT NULL DEFAULT '1' COMMENT '自动切换渠道，1为不切换，2为切换',
  `order_auto` tinyint(1) NOT NULL DEFAULT '1' COMMENT '下单失败是否自动切换渠道',
  `callback_auto` tinyint(1) NOT NULL DEFAULT '1' COMMENT '渠道回调如果失败自动切换1不切换2切换',
  `order_handle_num` int(11) NOT NULL DEFAULT '0' COMMENT '检测当前的处理单数，如果超过多少单，就自动切换到另外一个渠道',
  `stop` tinyint(1) NOT NULL DEFAULT '1',
  `callback_fc` varchar(11) NOT NULL DEFAULT '0',
  `callback_fc_time` int(11) NOT NULL DEFAULT '0',
  `opentime` varchar(1000) DEFAULT NULL COMMENT '维护时间',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态(0禁用,1启用)',
  `sort` bigint(20) DEFAULT '0' COMMENT '排序权重',
  `is_deleted` tinyint(1) DEFAULT '0' COMMENT '删除(1删除,0未删)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户';

--
-- 转存表中的数据 `merchant_list`
--

INSERT INTO `merchant_list` (`id`, `name`, `username`, `password`, `show_pwd`, `headimg`, `authorize`, `contacts`, `phone`, `percent`, `account_total`, `account_surplus`, `account_baitiao`, `account_consum`, `credit_total`, `credit_surplus`, `credit_consum`, `appid`, `appsecret`, `api_url`, `notify_url`, `notify_type`, `describe`, `login_ip`, `login_at`, `login_num`, `cids`, `auto`, `order_auto`, `callback_auto`, `order_handle_num`, `stop`, `callback_fc`, `callback_fc_time`, `opentime`, `status`, `sort`, `is_deleted`, `create_at`) VALUES
(1, '测试商户', 'test', '59f2443a4317918ce29ad28a14e1bdb7', 't123456', '', '2', NULL, NULL, '0.9900', '0.00', '0.00', '50000.00', '0.00', '0.00', '0.00', '0.00', 'app574223018568', '6CQHLFVV4VQKWAW1034IAI7LSH26R7N5', '', '', 1, '', NULL, NULL, 0, '', 1, 1, 1, 0, 1, '0', 300, '', 1, 0, 0, '2021-12-27 07:26:11');

-- --------------------------------------------------------

--
-- 表的结构 `merchant_order`
--

CREATE TABLE `merchant_order` (
  `id` int(11) NOT NULL,
  `mid` int(11) NOT NULL COMMENT '商户id',
  `cid` int(11) NOT NULL COMMENT '渠道id',
  `pid` int(11) NOT NULL COMMENT '产品id',
  `product_key` varchar(100) DEFAULT NULL COMMENT '商品key',
  `project_id` int(11) NOT NULL DEFAULT '0' COMMENT '商户项目id(通道)',
  `cash` float NOT NULL COMMENT '付的金额',
  `actual_cash` float NOT NULL DEFAULT '0' COMMENT '实际扣费',
  `product_cash` float NOT NULL DEFAULT '0' COMMENT '使用的渠道产品实际支付的价格',
  `account_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '账户类型1余额账户2授信账户',
  `url` varchar(300) NOT NULL COMMENT '请求地址',
  `account` varchar(200) DEFAULT NULL COMMENT '账户：卡号或者手机号',
  `isp` int(11) NOT NULL DEFAULT '-1' COMMENT '移动运营商1移动2联通3电信4其他',
  `order_id` varchar(800) DEFAULT NULL COMMENT '本站订单id',
  `num` int(11) NOT NULL DEFAULT '0' COMMENT '复冲次数',
  `parent_order_id` varchar(800) DEFAULT NULL,
  `channel_order_id` varchar(800) DEFAULT NULL COMMENT '渠道订单id，一般为请求后生成',
  `merchant_order_id` varchar(1000) DEFAULT NULL COMMENT '商户订单id',
  `param` varchar(1000) DEFAULT NULL COMMENT '商户请求的数据,json格式',
  `request` text COMMENT '请求参数',
  `response` text COMMENT '请求时返回的数据',
  `channel_callback_msg` text COMMENT '渠道回调时返回的数据',
  `channel_callback_at` timestamp NULL DEFAULT NULL COMMENT '渠道回调时间',
  `merchant_callback_msg` varchar(200) DEFAULT NULL COMMENT '商户回调发过来的消息,success是成功，fail是失败',
  `merchant_callback_error` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1正确2错误',
  `merchant_callback_at` timestamp NULL DEFAULT NULL COMMENT '商家回调时间',
  `merchant_callback_num` int(11) NOT NULL DEFAULT '0' COMMENT '通知次数，5次之后就不发了',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1下单2成功3失败',
  `card_id` int(11) NOT NULL DEFAULT '0' COMMENT '卡密表id',
  `error_account_oper` tinyint(1) NOT NULL DEFAULT '2' COMMENT '错误时是否已经返还金额，1未处理，2已返还',
  `yctime` int(11) DEFAULT NULL,
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `merchant_order_auto_error`
--

CREATE TABLE `merchant_order_auto_error` (
  `id` int(11) NOT NULL,
  `mid` int(11) NOT NULL COMMENT '商户id',
  `cid` int(11) NOT NULL COMMENT '渠道id',
  `pid` int(11) NOT NULL COMMENT '产品id',
  `product_key` varchar(100) DEFAULT NULL COMMENT '产品key',
  `project_id` int(11) NOT NULL DEFAULT '0' COMMENT '商户项目id(通道)',
  `cash` float NOT NULL COMMENT '付的金额',
  `actual_cash` float NOT NULL DEFAULT '0' COMMENT '实际扣费',
  `product_cash` float NOT NULL DEFAULT '0' COMMENT '使用的渠道产品实际支付的价格',
  `account_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '账户类型1余额账户2授信账户',
  `url` varchar(300) NOT NULL COMMENT '请求地址',
  `account` varchar(200) DEFAULT NULL COMMENT '账户：卡号或者手机号',
  `isp` int(11) NOT NULL DEFAULT '-1' COMMENT '移动运营商1移动2联通3电信4其他',
  `order_id` varchar(800) DEFAULT NULL COMMENT '本站订单id',
  `num` int(11) NOT NULL DEFAULT '0' COMMENT '复冲次数',
  `parent_order_id` varchar(800) DEFAULT NULL,
  `channel_order_id` varchar(800) DEFAULT NULL COMMENT '渠道订单id，一般为请求后生成',
  `merchant_order_id` varchar(1000) DEFAULT NULL COMMENT '商户订单id',
  `param` varchar(1000) DEFAULT NULL COMMENT '商户请求的数据,json格式',
  `request` text COMMENT '请求参数',
  `response` text COMMENT '请求时返回的数据',
  `channel_callback_msg` text COMMENT '渠道回调时返回的数据',
  `channel_callback_at` timestamp NULL DEFAULT NULL COMMENT '渠道回调时间',
  `merchant_callback_msg` varchar(200) DEFAULT NULL COMMENT '商户回调发过来的消息,success是成功，fail是失败',
  `merchant_callback_error` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1正确2错误',
  `merchant_callback_at` timestamp NULL DEFAULT NULL COMMENT '商家回调时间',
  `merchant_callback_num` int(11) NOT NULL DEFAULT '0' COMMENT '通知次数，5次之后就不发了',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1下单2成功3失败',
  `card_id` int(11) NOT NULL DEFAULT '0' COMMENT '卡密表id',
  `error_account_oper` tinyint(1) NOT NULL DEFAULT '2' COMMENT '错误时是否已经返还金额，1未处理，2已返还',
  `yctime` int(11) DEFAULT NULL,
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `merchant_order_history`
--

CREATE TABLE `merchant_order_history` (
  `id` int(11) NOT NULL,
  `mid` int(11) NOT NULL COMMENT '商户id',
  `cid` int(11) NOT NULL COMMENT '渠道id',
  `pid` int(11) NOT NULL COMMENT '产品id',
  `product_key` varchar(100) DEFAULT NULL COMMENT '产品key',
  `project_id` int(11) NOT NULL DEFAULT '0' COMMENT '商户项目id(通道)',
  `cash` float NOT NULL COMMENT '付的金额',
  `actual_cash` float NOT NULL DEFAULT '0' COMMENT '实际扣费',
  `product_cash` float NOT NULL DEFAULT '0' COMMENT '使用的渠道产品实际支付的价格',
  `account_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '账户类型1余额账户2授信账户',
  `url` varchar(300) NOT NULL COMMENT '请求地址',
  `account` varchar(200) DEFAULT NULL COMMENT '账户：卡号或者手机号',
  `isp` int(11) NOT NULL DEFAULT '-1' COMMENT '移动运营商1移动2联通3电信4其他',
  `order_id` varchar(800) DEFAULT NULL COMMENT '本站订单id',
  `num` int(11) NOT NULL DEFAULT '0' COMMENT '复冲次数',
  `parent_order_id` varchar(800) DEFAULT NULL,
  `channel_order_id` varchar(800) DEFAULT NULL COMMENT '渠道订单id，一般为请求后生成',
  `merchant_order_id` varchar(1000) DEFAULT NULL COMMENT '商户订单id',
  `param` varchar(1000) DEFAULT NULL COMMENT '商户请求的数据,json格式',
  `request` text COMMENT '请求参数',
  `response` text COMMENT '请求时返回的数据',
  `channel_callback_msg` text COMMENT '渠道回调时返回的数据',
  `channel_callback_at` timestamp NULL DEFAULT NULL COMMENT '渠道回调时间',
  `merchant_callback_msg` varchar(200) DEFAULT NULL COMMENT '商户回调发过来的消息,success是成功，fail是失败',
  `merchant_callback_error` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1正确2错误',
  `merchant_callback_at` timestamp NULL DEFAULT NULL COMMENT '商家回调时间',
  `merchant_callback_num` int(11) NOT NULL DEFAULT '0' COMMENT '通知次数，5次之后就不发了',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1下单2成功3失败',
  `card_id` int(11) NOT NULL DEFAULT '0' COMMENT '卡密表id',
  `error_account_oper` tinyint(1) NOT NULL DEFAULT '2' COMMENT '错误时是否已经返还金额，1未处理，2已返还',
  `yctime` int(11) DEFAULT NULL,
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `merchant_percent`
--

CREATE TABLE `merchant_percent` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `cid` bigint(20) DEFAULT '0' COMMENT '所属渠道',
  `mid` int(11) DEFAULT NULL COMMENT '商户id',
  `product_key` varchar(100) DEFAULT NULL COMMENT '商品key',
  `percent_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '分成类型1折扣，2固定数值',
  `rid` int(11) DEFAULT NULL COMMENT '商品关联表id',
  `percent` decimal(10,4) DEFAULT NULL COMMENT '渠道分成',
  `rule` varchar(1000) DEFAULT NULL COMMENT '分面值规则',
  `isp_rule` varchar(1000) DEFAULT NULL,
  `cash` varchar(1000) DEFAULT NULL COMMENT '禁用面值',
  `status` tinyint(1) UNSIGNED DEFAULT '1' COMMENT '使用状态',
  `is_deleted` tinyint(1) UNSIGNED DEFAULT '0' COMMENT '删除状态',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='渠道-商品' ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `merchant_product`
--

CREATE TABLE `merchant_product` (
  `id` int(11) UNSIGNED NOT NULL,
  `mid` int(11) NOT NULL,
  `cid` int(11) NOT NULL,
  `pid` int(11) NOT NULL,
  `product_key` varchar(100) DEFAULT NULL COMMENT '产品key',
  `sort` int(11) NOT NULL DEFAULT '1' COMMENT '优先级，数字越大优先级越高',
  `cash` varchar(1000) DEFAULT NULL COMMENT '可用面值，多个用逗号隔开',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商户产品设置表';

--
-- 转存表中的数据 `merchant_product`
--

INSERT INTO `merchant_product` (`id`, `mid`, `cid`, `pid`, `product_key`, `sort`, `cash`, `create_at`) VALUES
(1, 1, 1, 4, 'dy', 1, '', '2021-12-27 07:31:46'),
(2, 1, 1, 3, 'dhcz', 1, '', '2021-12-27 07:31:46'),
(3, 1, 1, 2, 'zsycz', 1, '', '2021-12-27 07:31:46'),
(4, 1, 1, 1, 'zshcz', 1, '', '2021-12-27 07:31:46');

-- --------------------------------------------------------

--
-- 表的结构 `merchant_project`
--

CREATE TABLE `merchant_project` (
  `id` int(11) UNSIGNED NOT NULL,
  `name` varchar(100) DEFAULT NULL COMMENT '通道项目名称',
  `mid` int(11) NOT NULL,
  `status` tinyint(1) DEFAULT '1' COMMENT '1启用2禁用',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='通道';

-- --------------------------------------------------------

--
-- 表的结构 `merchant_project_percent`
--

CREATE TABLE `merchant_project_percent` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `mid` int(11) DEFAULT NULL COMMENT '商户id',
  `project_id` int(11) NOT NULL,
  `product_key` varchar(100) DEFAULT NULL COMMENT '商品key',
  `percent` decimal(10,3) DEFAULT NULL COMMENT '渠道分成',
  `rule` varchar(1000) DEFAULT NULL COMMENT '分面值规则',
  `status` tinyint(1) UNSIGNED DEFAULT '1' COMMENT '使用状态',
  `is_deleted` tinyint(1) UNSIGNED DEFAULT '0' COMMENT '删除状态',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='渠道-商品' ROW_FORMAT=COMPACT;

-- --------------------------------------------------------

--
-- 表的结构 `merchant_project_product`
--

CREATE TABLE `merchant_project_product` (
  `id` int(11) UNSIGNED NOT NULL,
  `mid` int(11) NOT NULL,
  `project_id` int(11) NOT NULL,
  `cid` int(11) NOT NULL,
  `pid` int(11) NOT NULL,
  `product_key` varchar(100) DEFAULT NULL COMMENT '产品key',
  `sort` int(11) NOT NULL DEFAULT '1' COMMENT '优先级，数字越大优先级越高',
  `cash` varchar(1000) DEFAULT NULL COMMENT '可用面值，多个用逗号隔开',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商户产品设置表';

-- --------------------------------------------------------

--
-- 表的结构 `merchant_qianmi_apply`
--

CREATE TABLE `merchant_qianmi_apply` (
  `id` int(11) NOT NULL,
  `product` varchar(200) DEFAULT NULL,
  `url` varchar(300) NOT NULL COMMENT '请求地址',
  `reqid` varchar(800) DEFAULT NULL COMMENT '请求id',
  `request` varchar(1000) DEFAULT NULL COMMENT '请求参数',
  `response` text COMMENT '请求时返回的数据',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1下单2成功3失败',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `merchant_qianmi_order`
--

CREATE TABLE `merchant_qianmi_order` (
  `id` int(11) NOT NULL,
  `reqid` varchar(800) NOT NULL COMMENT '请求id',
  `item_id` varchar(800) DEFAULT NULL COMMENT 'item拆分的订单id',
  `item_order_id` varchar(800) DEFAULT NULL COMMENT '订单编号',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1下单2成功3失败',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `merchant_rebate`
--

CREATE TABLE `merchant_rebate` (
  `id` bigint(20) NOT NULL,
  `mid` bigint(20) DEFAULT NULL COMMENT '商户id',
  `product_key` varchar(100) DEFAULT NULL COMMENT '商品key',
  `percent` decimal(10,4) DEFAULT '0.0000' COMMENT '返点分成',
  `num` decimal(10,2) DEFAULT '0.00' COMMENT '总金额',
  `is_yue` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否计入余额1计入2不计入',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户-充值-日志';

-- --------------------------------------------------------

--
-- 表的结构 `merchant_relation`
--

CREATE TABLE `merchant_relation` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `cid` bigint(20) UNSIGNED DEFAULT '0' COMMENT '渠道ID',
  `pid` bigint(20) UNSIGNED DEFAULT '0' COMMENT '商品ID',
  `mid` bigint(20) UNSIGNED DEFAULT '0' COMMENT '商户ID',
  `product_key` varchar(100) DEFAULT '' COMMENT '商品KEY',
  `status` tinyint(1) UNSIGNED DEFAULT '0' COMMENT '状态(0:禁用,1:启用)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户关联渠道商品';

-- --------------------------------------------------------

--
-- 表的结构 `merchant_system_auth`
--

CREATE TABLE `merchant_system_auth` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(100) DEFAULT '' COMMENT '权限名称',
  `desc` varchar(500) DEFAULT '' COMMENT '备注说明',
  `sort` bigint(20) UNSIGNED DEFAULT '0' COMMENT '排序权重',
  `status` tinyint(1) UNSIGNED DEFAULT '1' COMMENT '权限状态(1使用,0禁用)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户系统-系统-权限';

--
-- 转存表中的数据 `merchant_system_auth`
--

INSERT INTO `merchant_system_auth` (`id`, `title`, `desc`, `sort`, `status`, `create_at`) VALUES
(2, '测试商户权限', '测试商户权限', 0, 1, '2020-10-12 10:41:54');

-- --------------------------------------------------------

--
-- 表的结构 `merchant_system_auth_node`
--

CREATE TABLE `merchant_system_auth_node` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `auth` bigint(20) UNSIGNED DEFAULT '0' COMMENT '角色',
  `node` varchar(200) DEFAULT '' COMMENT '节点'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户系统-系统-授权';

--
-- 转存表中的数据 `merchant_system_auth_node`
--

INSERT INTO `merchant_system_auth_node` (`id`, `auth`, `node`) VALUES
(61, 2, 'merchant'),
(62, 2, 'merchant/account'),
(63, 2, 'merchant/account/index'),
(64, 2, 'merchant/account/add'),
(65, 2, 'merchant/account/edit'),
(66, 2, 'merchant/account/pass'),
(67, 2, 'merchant/account/state'),
(68, 2, 'merchant/account/remove'),
(69, 2, 'merchant/money'),
(70, 2, 'merchant/money/index'),
(71, 2, 'merchant/order'),
(72, 2, 'merchant/order/index');

-- --------------------------------------------------------

--
-- 表的结构 `merchant_system_config`
--

CREATE TABLE `merchant_system_config` (
  `type` varchar(20) DEFAULT '' COMMENT '分类',
  `name` varchar(100) DEFAULT '' COMMENT '配置名',
  `value` varchar(2048) DEFAULT '' COMMENT '配置值'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户系统-系统-配置';

--
-- 转存表中的数据 `merchant_system_config`
--

INSERT INTO `merchant_system_config` (`type`, `name`, `value`) VALUES
('base', 'site_name', '七只熊'),
('base', 'site_icon', 'https://v6.thinkadmin.top/upload/f47b8fe06e38ae99/08e8398da45583b9.png'),
('base', 'site_copy', '©版权所有 2019-2020 米尔伟业'),
('base', 'app_name', '七只熊'),
('base', 'app_version', 'v2.3'),
('base', 'miitbeian', ''),
('storage', 'qiniu_http_protocol', 'http'),
('storage', 'type', 'local'),
('storage', 'allow_exts', 'doc,gif,icon,jpg,mp3,mp4,p12,pem,png,rar,xls,xlsx'),
('storage', 'qiniu_region', '华东'),
('storage', 'qiniu_bucket', ''),
('storage', 'qiniu_http_domain', ''),
('storage', 'qiniu_access_key', ''),
('storage', 'qiniu_secret_key', ''),
('wechat', 'type', 'api'),
('wechat', 'token', ''),
('wechat', 'appid', ''),
('wechat', 'appsecret', ''),
('wechat', 'encodingaeskey', ''),
('wechat', 'thr_appid', ''),
('wechat', 'thr_appkey', ''),
('wechat', 'mch_id', ''),
('wechat', 'mch_key', ''),
('wechat', 'mch_ssl_type', 'pem'),
('wechat', 'mch_ssl_p12', ''),
('wechat', 'mch_ssl_key', ''),
('wechat', 'mch_ssl_cer', ''),
('storage', 'alioss_http_protocol', 'http'),
('storage', 'alioss_point', 'oss-cn-hangzhou.aliyuncs.com'),
('storage', 'alioss_bucket', ''),
('storage', 'alioss_http_domain', ''),
('storage', 'alioss_access_key', ''),
('storage', 'alioss_secret_key', ''),
('base', 'xpath', 'admin'),
('base', 'beian', '');

-- --------------------------------------------------------

--
-- 表的结构 `merchant_system_data`
--

CREATE TABLE `merchant_system_data` (
  `id` bigint(11) UNSIGNED NOT NULL,
  `name` varchar(100) DEFAULT '' COMMENT '配置名',
  `value` longtext COMMENT '配置值'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户系统-系统-数据';

-- --------------------------------------------------------

--
-- 表的结构 `merchant_system_menu`
--

CREATE TABLE `merchant_system_menu` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `pid` bigint(20) UNSIGNED DEFAULT '0' COMMENT '上级ID',
  `title` varchar(100) DEFAULT '' COMMENT '菜单名称',
  `icon` varchar(100) DEFAULT '' COMMENT '菜单图标',
  `node` varchar(100) DEFAULT '' COMMENT '节点代码',
  `url` varchar(400) DEFAULT '' COMMENT '链接节点',
  `params` varchar(500) DEFAULT '' COMMENT '链接参数',
  `target` varchar(20) DEFAULT '_self' COMMENT '打开方式',
  `sort` int(11) UNSIGNED DEFAULT '0' COMMENT '排序权重',
  `status` tinyint(1) UNSIGNED DEFAULT '1' COMMENT '状态(0:禁用,1:启用)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户系统-系统-菜单';

--
-- 转存表中的数据 `merchant_system_menu`
--

INSERT INTO `merchant_system_menu` (`id`, `pid`, `title`, `icon`, `node`, `url`, `params`, `target`, `sort`, `status`, `create_at`) VALUES
(2, 0, '系统', '', '', '#', '', '_self', 100, 1, '2018-09-05 10:04:52'),
(3, 4, '系统菜单', 'layui-icon layui-icon-layouts', '', 'admin/menu/index', '', '_self', 1, 1, '2018-09-05 10:05:26'),
(4, 2, '系统配置', '', '', '#', '', '_self', 20, 1, '2018-09-05 10:07:17'),
(5, 12, '系统用户', 'layui-icon layui-icon-username', '', 'admin/user/index', '', '_self', 1, 1, '2018-09-06 03:10:42'),
(7, 12, '访问权限', 'layui-icon layui-icon-vercode', '', 'admin/auth/index', '', '_self', 2, 1, '2018-09-06 07:17:14'),
(11, 4, '系统参数', 'layui-icon layui-icon-set', '', 'admin/config/index', '', '_self', 4, 1, '2018-09-06 08:43:47'),
(12, 2, '权限管理', '', '', '#', '', '_self', 10, 1, '2018-09-06 10:01:31'),
(27, 4, '系统任务', 'layui-icon layui-icon-log', '', 'admin/queue/index', '', '_self', 3, 1, '2018-11-29 03:13:34'),
(49, 4, '系统日志', 'layui-icon layui-icon-form', '', 'admin/oplog/index', '', '_self', 2, 1, '2019-02-18 04:56:56'),
(82, 0, '商户信息', '', '', '#', '', '_self', 0, 1, '2020-10-13 06:13:11'),
(83, 0, '订单数据', '', '', '#', '', '_self', 0, 1, '2020-10-13 06:13:42'),
(84, 82, '商户信息', '', '', '#', '', '_self', 0, 1, '2020-10-13 06:13:50'),
(85, 84, '账户信息', 'layui-icon layui-icon-username', 'merchant/account/index', 'merchant/account/index', '', '_self', 0, 1, '2020-10-13 06:14:10'),
(86, 83, '订单管理', '', '', '#', '', '_self', 0, 1, '2020-10-13 06:14:25'),
(87, 86, '订单列表', 'layui-icon layui-icon-form', 'merchant/order/index', 'merchant/order/index', '', '_self', 0, 1, '2020-10-13 06:14:48'),
(88, 84, '资金明细', 'layui-icon layui-icon-transfer', 'merchant/money/index', 'merchant/money/index', '', '_self', 0, 1, '2020-11-16 10:07:34');

-- --------------------------------------------------------

--
-- 表的结构 `merchant_system_oplog`
--

CREATE TABLE `merchant_system_oplog` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `node` varchar(200) NOT NULL DEFAULT '' COMMENT '当前操作节点',
  `geoip` varchar(15) NOT NULL DEFAULT '' COMMENT '操作者IP地址',
  `action` varchar(200) NOT NULL DEFAULT '' COMMENT '操作行为名称',
  `content` varchar(1024) NOT NULL DEFAULT '' COMMENT '操作内容描述',
  `username` varchar(50) NOT NULL DEFAULT '' COMMENT '操作人用户名',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户系统-系统-日志';

-- --------------------------------------------------------

--
-- 表的结构 `merchant_system_queue`
--

CREATE TABLE `merchant_system_queue` (
  `id` bigint(20) NOT NULL,
  `code` varchar(20) NOT NULL DEFAULT '' COMMENT '任务编号',
  `title` varchar(50) NOT NULL DEFAULT '' COMMENT '任务名称',
  `command` varchar(500) DEFAULT '' COMMENT '执行指令',
  `exec_pid` bigint(20) DEFAULT '0' COMMENT '执行进程',
  `exec_data` longtext COMMENT '执行参数',
  `exec_time` bigint(20) DEFAULT '0' COMMENT '执行时间',
  `exec_desc` varchar(500) DEFAULT '' COMMENT '执行描述',
  `enter_time` decimal(20,4) DEFAULT '0.0000' COMMENT '开始时间',
  `outer_time` decimal(20,4) DEFAULT '0.0000' COMMENT '结束时间',
  `loops_time` bigint(20) DEFAULT '0' COMMENT '循环时间',
  `attempts` bigint(20) DEFAULT '0' COMMENT '执行次数',
  `rscript` tinyint(1) DEFAULT '1' COMMENT '任务类型(0单例,1多例)',
  `status` tinyint(1) DEFAULT '1' COMMENT '任务状态(1新任务,2处理中,3成功,4失败)',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统-任务';

--
-- 转存表中的数据 `merchant_system_queue`
--

INSERT INTO `merchant_system_queue` (`id`, `code`, `title`, `command`, `exec_pid`, `exec_data`, `exec_time`, `exec_desc`, `enter_time`, `outer_time`, `loops_time`, `attempts`, `rscript`, `status`, `create_at`) VALUES
(1, 'Q202009197459087', '优化数据库所有数据表', 'xadmin:database optimize', 11176, '[]', 1600513019, '', '1600665627.0476', '1600665629.1329', 0, 1, 0, 3, '2020-09-19 10:57:00'),
(2, 'Q202009213610144', '定时清理系统任务数据', 'xadmin:queue clean', 0, '[]', 1600773848, '清理 0 条历史任务，关闭 0 条超时任务，重置 0 条循环任务', '1600770247.7679', '1600770248.1229', 3600, 30, 0, 1, '2020-09-21 05:23:11');

-- --------------------------------------------------------

--
-- 表的结构 `merchant_system_user`
--

CREATE TABLE `merchant_system_user` (
  `id` bigint(20) NOT NULL,
  `username` varchar(50) DEFAULT '' COMMENT '用户账号',
  `password` varchar(32) DEFAULT '' COMMENT '用户密码',
  `nickname` varchar(50) DEFAULT '' COMMENT '用户昵称',
  `headimg` varchar(255) DEFAULT '' COMMENT '头像地址',
  `authorize` varchar(255) DEFAULT '' COMMENT '权限授权',
  `contact_qq` varchar(20) DEFAULT '' COMMENT '联系QQ',
  `contact_mail` varchar(20) DEFAULT '' COMMENT '联系邮箱',
  `contact_phone` varchar(20) DEFAULT '' COMMENT '联系手机',
  `login_ip` varchar(255) DEFAULT '' COMMENT '登录地址',
  `login_at` varchar(20) DEFAULT '' COMMENT '登录时间',
  `login_num` bigint(20) DEFAULT '0' COMMENT '登录次数',
  `describe` varchar(255) DEFAULT '' COMMENT '备注说明',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态(0禁用,1启用)',
  `sort` bigint(20) DEFAULT '0' COMMENT '排序权重',
  `is_deleted` tinyint(1) DEFAULT '0' COMMENT '删除(1删除,0未删)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统-用户';

--
-- 转存表中的数据 `merchant_system_user`
--

INSERT INTO `merchant_system_user` (`id`, `username`, `password`, `nickname`, `headimg`, `authorize`, `contact_qq`, `contact_mail`, `contact_phone`, `login_ip`, `login_at`, `login_num`, `describe`, `status`, `sort`, `is_deleted`, `create_at`) VALUES
(10000, 'admin', 'a66abb5684c45962d887564f08346e8d', '系统管理员', '', '', '', '', '', '192.168.33.1', '2020-12-29 14:53:44', 1128, '', 1, 0, 0, '2015-11-13 07:14:22'),
(10001, 'shanghu', '8017d9d7686dca2ccfb61820b627c460', 'shanghu', '', '2', '', '', '', '', '', 0, 'shanghu', 1, 0, 0, '2020-10-12 10:43:32');

-- --------------------------------------------------------

--
-- 表的结构 `service_info`
--

CREATE TABLE `service_info` (
  `id` int(11) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `key` varchar(100) NOT NULL COMMENT '关键字',
  `type` int(11) NOT NULL DEFAULT '1' COMMENT '1加油卡2话费',
  `option` varchar(500) DEFAULT NULL COMMENT '可选项，影响折扣',
  `col_required_value` varchar(1000) DEFAULT NULL COMMENT '必填字段',
  `col_option_value` varchar(1000) DEFAULT NULL COMMENT '选填字段',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='业务表';

--
-- 转存表中的数据 `service_info`
--

INSERT INTO `service_info` (`id`, `name`, `key`, `type`, `option`, `col_required_value`, `col_option_value`, `status`, `create_at`) VALUES
(1, '通用中石化油卡充值', 'zshcz', 1, NULL, NULL, NULL, 1, '2021-05-22 02:59:46'),
(2, '通用中石油油卡充值', 'zsycz', 1, NULL, NULL, NULL, 1, '2021-05-25 07:51:58'),
(3, '通用话费充值', 'dhcz', 2, NULL, NULL, NULL, 1, '2021-05-29 12:33:25'),
(4, '通用中石化油卡充值_透传', 'zshcz_tc', 1, NULL, NULL, NULL, 1, '2021-06-24 04:30:34'),
(5, '抖音币', 'dy', 3, NULL, NULL, NULL, 1, '2021-09-25 06:28:54'),
(6, '加油券充值', 'jyqcz', 1, NULL, NULL, NULL, 1, '2021-10-18 04:26:43'),
(7, '电费充值', 'dfcz', 3, NULL, NULL, NULL, 1, '2021-12-27 07:22:40'),
(8, '全国移动充值', 'ydcz', 2, NULL, NULL, NULL, 1, '2021-12-27 07:27:15'),
(9, '全国联通充值', 'ltcz', 2, NULL, NULL, NULL, 1, '2021-12-27 07:27:26'),
(10, '全国电信充值', 'dxcz', 2, NULL, NULL, NULL, 1, '2021-12-27 07:27:36');

-- --------------------------------------------------------

--
-- 表的结构 `service_product`
--

CREATE TABLE `service_product` (
  `id` int(11) UNSIGNED NOT NULL,
  `service_id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `value` varchar(100) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '1' COMMENT '排序，正序',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1启用2禁用',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='业务产品表';

--
-- 转存表中的数据 `service_product`
--

INSERT INTO `service_product` (`id`, `service_id`, `name`, `value`, `sort`, `status`, `create_at`) VALUES
(10000, 1, '50', '50', 1, 1, '2021-05-29 15:08:00'),
(10001, 1, '100', '100', 2, 1, '2021-05-29 15:08:05'),
(10002, 1, '200', '200', 3, 1, '2021-05-29 15:08:11'),
(10003, 1, '500', '500', 4, 1, '2021-05-29 15:08:17'),
(10004, 1, '1000', '1000', 5, 1, '2021-05-29 15:08:24'),
(10005, 1, '2000', '2000', 6, 1, '2021-05-29 15:08:33'),
(10006, 2, '50', '50', 1, 1, '2021-05-29 15:08:42'),
(10007, 2, '100', '100', 2, 1, '2021-05-29 15:08:47'),
(10008, 2, '200', '200', 3, 1, '2021-05-29 15:08:51'),
(10009, 2, '500', '500', 4, 1, '2021-05-29 15:08:57'),
(10010, 2, '1000', '1000', 5, 1, '2021-05-29 15:09:04'),
(10011, 2, '2000', '2000', 6, 1, '2021-05-29 15:09:09'),
(10012, 3, '移动', '移动', 1, 1, '2021-05-29 15:09:22'),
(10013, 3, '联通', '联通', 2, 1, '2021-05-29 15:09:28'),
(10014, 3, '电信', '电信', 3, 1, '2021-05-29 15:09:34'),
(10015, 4, '50', '50', 1, 1, '2021-05-29 15:08:00'),
(10016, 4, '100', '100', 2, 1, '2021-05-29 15:08:05'),
(10017, 4, '200', '200', 3, 1, '2021-05-29 15:08:11'),
(10018, 4, '500', '500', 4, 1, '2021-05-29 15:08:17'),
(10019, 4, '1000', '1000', 5, 1, '2021-05-29 15:08:24'),
(10020, 4, '2000', '2000', 6, 1, '2021-05-29 15:08:33'),
(10021, 5, '20', '20', 1, 1, '2021-09-25 06:29:13'),
(10022, 5, '30', '30', 2, 1, '2021-09-25 06:29:18'),
(10023, 5, '50', '50', 3, 1, '2021-09-25 06:29:26'),
(10024, 5, '100', '100', 4, 1, '2021-09-25 06:29:38'),
(10025, 5, '200', '200', 5, 1, '2021-09-25 06:29:43'),
(10026, 5, '500', '500', 7, 1, '2021-09-25 06:30:17'),
(10027, 5, '1000', '1000', 8, 1, '2021-09-25 06:30:23'),
(10028, 5, '2000', '2000', 9, 1, '2021-09-25 06:30:29'),
(10029, 5, '300', '300', 6, 1, '2021-10-14 09:44:38'),
(10030, 6, '1', '1', 1, 1, '2021-10-18 04:26:53'),
(10031, 6, '30', '30', 1, 1, '2021-10-18 04:26:59'),
(10032, 6, '50', '50', 1, 1, '2021-10-18 04:27:03'),
(10033, 6, '100', '100', 1, 1, '2021-10-18 04:27:08'),
(10034, 6, '200', '200', 1, 1, '2021-10-18 04:27:12'),
(10035, 6, '300', '300', 1, 1, '2021-10-18 04:27:16'),
(10036, 7, '100', '100', 1, 1, '2021-12-27 07:24:11'),
(10037, 7, '200', '200', 2, 1, '2021-12-27 07:24:16'),
(10038, 7, '300', '300', 3, 1, '2021-12-27 07:24:20'),
(10039, 7, '400', '400', 4, 1, '2021-12-27 07:24:25'),
(10040, 7, '500', '500', 5, 1, '2021-12-27 07:24:30'),
(10041, 7, '600', '600', 6, 1, '2021-12-27 07:25:31'),
(10042, 7, '700', '700', 7, 1, '2021-12-27 07:25:35'),
(10043, 7, '800', '800', 8, 1, '2021-12-27 07:25:39'),
(10044, 7, '900', '900', 9, 1, '2021-12-27 07:25:43'),
(10045, 7, '1000', '1000', 10, 1, '2021-12-27 07:25:47'),
(10046, 7, '2000', '2000', 11, 1, '2021-12-27 07:25:51'),
(10047, 8, '10', '10', 1, 1, '2021-12-27 07:27:58'),
(10048, 8, '20', '20', 2, 1, '2021-12-27 07:28:02'),
(10049, 8, '30', '30', 3, 1, '2021-12-27 07:28:07'),
(10050, 8, '50', '50', 4, 1, '2021-12-27 07:28:16'),
(10051, 8, '100', '100', 5, 1, '2021-12-27 07:28:22'),
(10052, 8, '200', '200', 6, 1, '2021-12-27 07:28:30'),
(10053, 8, '300', '300', 7, 1, '2021-12-27 07:28:34'),
(10054, 8, '500', '500', 8, 1, '2021-12-27 07:28:38'),
(10055, 8, '1000', '1000', 9, 1, '2021-12-27 07:28:43'),
(10056, 9, '10', '10', 1, 1, '2021-12-27 07:28:56'),
(10057, 9, '20', '20', 2, 1, '2021-12-27 07:29:00'),
(10058, 9, '30', '30', 3, 1, '2021-12-27 07:29:05'),
(10059, 9, '50', '50', 4, 1, '2021-12-27 07:29:10'),
(10060, 9, '100', '100', 5, 1, '2021-12-27 07:29:15'),
(10061, 9, '200', '200', 6, 1, '2021-12-27 07:29:20'),
(10062, 9, '300', '300', 7, 1, '2021-12-27 07:29:24'),
(10063, 9, '500', '500', 8, 1, '2021-12-27 07:29:29'),
(10064, 9, '1000', '1000', 9, 1, '2021-12-27 07:29:33'),
(10065, 10, '10', '10', 1, 1, '2021-12-27 07:29:39'),
(10066, 10, '20', '20', 2, 1, '2021-12-27 07:29:43'),
(10067, 10, '30', '30', 3, 1, '2021-12-27 07:29:47'),
(10068, 10, '50', '50', 4, 1, '2021-12-27 07:29:51'),
(10069, 10, '100', '100', 5, 1, '2021-12-27 07:30:02'),
(10070, 10, '200', '200', 6, 1, '2021-12-27 07:30:14'),
(10071, 10, '300', '300', 7, 1, '2021-12-27 07:30:18'),
(10072, 10, '500', '500', 8, 1, '2021-12-27 07:30:22'),
(10073, 10, '1000', '1000', 9, 1, '2021-12-27 07:30:28');

-- --------------------------------------------------------

--
-- 表的结构 `service_system`
--

CREATE TABLE `service_system` (
  `id` int(11) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `sign` tinyint(1) NOT NULL DEFAULT '1' COMMENT '加密算法方式',
  `sign_convert` tinyint(1) NOT NULL DEFAULT '1',
  `sign_type` tinyint(1) NOT NULL DEFAULT '1',
  `sign_sort` tinyint(1) NOT NULL DEFAULT '1',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1可用2禁用',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统管理';

-- --------------------------------------------------------

--
-- 表的结构 `service_system_api`
--

CREATE TABLE `service_system_api` (
  `id` int(11) UNSIGNED NOT NULL,
  `system_id` int(11) NOT NULL,
  `service_id` varchar(100) NOT NULL DEFAULT '0' COMMENT '支持的业务id，多个用逗号隔开',
  `service_key` varchar(100) DEFAULT NULL,
  `type` tinyint(1) NOT NULL DEFAULT '1',
  `api` varchar(100) NOT NULL COMMENT '接口地址',
  `request_method` tinyint(1) NOT NULL DEFAULT '1' COMMENT '请求方式',
  `header` varchar(1000) DEFAULT NULL COMMENT 'header参数',
  `success_key` varchar(100) DEFAULT NULL COMMENT '响应成功字段名',
  `success_value` varchar(100) DEFAULT NULL COMMENT '响应成功字段值',
  `msg_key` varchar(100) DEFAULT NULL COMMENT '响应消息字段名',
  `channel_order_id` varchar(100) DEFAULT NULL COMMENT '上游订单号字段名',
  `notify_status_col` varchar(100) DEFAULT NULL COMMENT '回调状态字段名',
  `notify_status_value` varchar(100) DEFAULT NULL COMMENT '回调状态字段值',
  `notify_number` varchar(100) DEFAULT NULL COMMENT '回调流水号的字段值',
  `notify_msg` varchar(100) DEFAULT 'success' COMMENT '回调成功字符串的值',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `service_system_col`
--

CREATE TABLE `service_system_col` (
  `id` int(11) UNSIGNED NOT NULL,
  `system_id` int(11) NOT NULL,
  `api_id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `type` int(11) NOT NULL DEFAULT '1',
  `value` varchar(1000) DEFAULT NULL,
  `option` int(1) NOT NULL DEFAULT '1' COMMENT '1必填2选填',
  `sign` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1参与加密2不参与加密',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `stat`
--

CREATE TABLE `stat` (
  `id` int(11) UNSIGNED NOT NULL,
  `day` varchar(50) NOT NULL,
  `total` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '总金额',
  `success` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '成功金额',
  `fail` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '失败金额',
  `product_cash` decimal(10,2) NOT NULL DEFAULT '0.00',
  `actual_cash` decimal(10,2) NOT NULL DEFAULT '0.00',
  `profit` decimal(10,3) NOT NULL COMMENT '利润',
  `data` text NOT NULL COMMENT '记录的数据',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `stat_account`
--

CREATE TABLE `stat_account` (
  `id` int(11) UNSIGNED NOT NULL,
  `day` varchar(50) DEFAULT NULL,
  `merchant_shouru` varchar(100) DEFAULT NULL COMMENT '收入',
  `merchant_zhichu` varchar(100) DEFAULT NULL COMMENT '商户支出',
  `merchant_total` varchar(100) DEFAULT NULL COMMENT '商户总计数据',
  `channel_shouru` varchar(100) DEFAULT NULL COMMENT '渠道收入',
  `channel_zhichu` varchar(100) DEFAULT NULL COMMENT '渠道支出',
  `channel_total` varchar(100) DEFAULT NULL COMMENT '渠道总计',
  `account_shouru` varchar(100) DEFAULT NULL COMMENT '银行收入',
  `account_zhichu` varchar(100) DEFAULT NULL COMMENT '银行支出',
  `account_total` varchar(100) DEFAULT NULL COMMENT '银行总计',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='账户对账表';

-- --------------------------------------------------------

--
-- 表的结构 `stat_account_log`
--

CREATE TABLE `stat_account_log` (
  `id` int(11) UNSIGNED NOT NULL,
  `name` varchar(100) DEFAULT NULL COMMENT '标题',
  `day` varchar(50) DEFAULT NULL COMMENT '天',
  `type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '类型：1是渠道2是商户3是公户',
  `type_id` int(11) NOT NULL DEFAULT '0' COMMENT '根据type不同而不同，如type是1，则type_id就是渠道id，银行账户暂时固定为1',
  `type_name` varchar(100) DEFAULT NULL COMMENT '类型名称',
  `oper` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1增加2减少0是不加不减',
  `num` varchar(100) NOT NULL DEFAULT '0' COMMENT '数额',
  `desc` varchar(500) DEFAULT NULL COMMENT '备注',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='账户账目记录表';

-- --------------------------------------------------------

--
-- 表的结构 `stat_chnanel_account`
--

CREATE TABLE `stat_chnanel_account` (
  `id` int(11) UNSIGNED NOT NULL,
  `cid` int(11) NOT NULL DEFAULT '0' COMMENT '渠道id',
  `pid` int(11) NOT NULL DEFAULT '0' COMMENT '产品id',
  `day` varchar(50) DEFAULT NULL,
  `percent` varchar(100) NOT NULL DEFAULT '0' COMMENT '分成',
  `order_total` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单总金额',
  `order_success` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单成功金额',
  `order_fail` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单失败金额',
  `order_channel_cash` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '渠道计算完的成功金额',
  `account_total` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '账单总金额',
  `account_success` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '账单总成功金额',
  `account_fail` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '账单总失败金额',
  `account_product_success` decimal(10,3) NOT NULL DEFAULT '0.000' COMMENT '账单计算完的值',
  `account_profit` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '账单利润',
  `yue` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '今天增加的余额',
  `channel_yue` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '当天渠道余额',
  `yesterday_channel_yue` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '昨日的余额',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `system_auth`
--

CREATE TABLE `system_auth` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(100) DEFAULT '' COMMENT '权限名称',
  `desc` varchar(500) DEFAULT '' COMMENT '备注说明',
  `sort` bigint(20) UNSIGNED DEFAULT '0' COMMENT '排序权重',
  `status` tinyint(1) UNSIGNED DEFAULT '1' COMMENT '权限状态(1使用,0禁用)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统-权限';

--
-- 转存表中的数据 `system_auth`
--

INSERT INTO `system_auth` (`id`, `title`, `desc`, `sort`, `status`, `create_at`) VALUES
(2, '商户权限', '商户权限', 0, 1, '2020-10-12 10:41:54'),
(4, '超级管理员', '最高权限', 0, 1, '2021-04-28 14:42:47'),
(5, '普通管理员', '普通管理员', 0, 1, '2021-05-15 01:23:44'),
(6, '财务管理员', '', 0, 1, '2021-05-31 02:50:48');

-- --------------------------------------------------------

--
-- 表的结构 `system_auth_node`
--

CREATE TABLE `system_auth_node` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `auth` bigint(20) UNSIGNED DEFAULT '0' COMMENT '角色',
  `node` varchar(200) DEFAULT '' COMMENT '节点'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统-授权';

--
-- 转存表中的数据 `system_auth_node`
--

INSERT INTO `system_auth_node` (`id`, `auth`, `node`) VALUES
(18, 2, 'merchant'),
(19, 2, 'merchant/account'),
(20, 2, 'merchant/account/index'),
(1555, 6, 'setting'),
(1556, 6, 'setting/account'),
(1557, 6, 'setting/account/index'),
(1558, 6, 'setting/account/reset'),
(1559, 6, 'setting/account_log'),
(1560, 6, 'setting/account_log/index'),
(1561, 6, 'setting/account_log/add'),
(1562, 6, 'setting/account_log/edit'),
(1563, 6, 'setting/account_log/remove'),
(1564, 6, 'setting/channel_account'),
(1565, 6, 'setting/channel_account/index'),
(1566, 6, 'setting/merchant_account'),
(1567, 6, 'setting/merchant_account/index'),
(1568, 6, 'setting/merchant_account/add'),
(1569, 6, 'setting/merchant_account/edit'),
(1570, 6, 'setting/stat'),
(1571, 6, 'setting/stat/index'),
(1572, 6, 'setting/stat/info'),
(1808, 5, 'channel'),
(1809, 5, 'channel/account'),
(1810, 5, 'channel/account/index'),
(1811, 5, 'channel/account/add'),
(1812, 5, 'channel/account/edit'),
(1813, 5, 'channel/channel'),
(1814, 5, 'channel/channel/index'),
(1815, 5, 'channel/channel/add'),
(1816, 5, 'channel/channel/edit'),
(1817, 5, 'channel/channel/state'),
(1818, 5, 'channel/channel/remove'),
(1819, 5, 'channel/channel/setting'),
(1820, 5, 'channel/channel_product'),
(1821, 5, 'channel/channel_product/index'),
(1822, 5, 'channel/channel_product/add'),
(1823, 5, 'channel/channel_product/edit'),
(1824, 5, 'channel/channel_product/state'),
(1825, 5, 'channel/channel_product/remove'),
(1826, 5, 'channel/channel_product/percent'),
(1827, 5, 'channel/channel_shop'),
(1828, 5, 'channel/channel_shop/index'),
(1829, 5, 'channel/channel_shop/add'),
(1830, 5, 'channel/channel_shop/edit'),
(1831, 5, 'channel/channel_shop/state'),
(1832, 5, 'channel/channel_shop/remove'),
(1833, 5, 'merchant'),
(1834, 5, 'merchant/account'),
(1835, 5, 'merchant/account/index'),
(1836, 5, 'merchant/merchant'),
(1837, 5, 'merchant/merchant/index'),
(1838, 5, 'merchant/merchant/add'),
(1839, 5, 'merchant/merchant/edit'),
(1840, 5, 'merchant/merchant/recharge'),
(1841, 5, 'merchant/merchant/resetapi'),
(1842, 5, 'merchant/merchant/pass'),
(1843, 5, 'merchant/merchant/info'),
(1844, 5, 'merchant/merchant/state'),
(1845, 5, 'merchant/merchant/remove'),
(1846, 5, 'merchant/merchant_relation'),
(1847, 5, 'merchant/merchant_relation/index'),
(1848, 5, 'merchant/merchant_relation/add'),
(1849, 5, 'merchant/merchant_relation/relation'),
(1850, 5, 'merchant/merchant_relation/state'),
(1851, 5, 'merchant/merchant_relation/remove'),
(1852, 5, 'merchant/order'),
(1853, 5, 'merchant/order/index'),
(1854, 5, 'merchant/order/info'),
(1855, 5, 'merchant/percent'),
(1856, 5, 'merchant/percent/index'),
(1857, 5, 'merchant/percent/edit'),
(1858, 5, 'merchant/percent/remove'),
(1859, 5, 'merchant/product'),
(1860, 5, 'merchant/product/setting'),
(1861, 5, 'merchant/project'),
(1862, 5, 'merchant/project/index'),
(1863, 5, 'merchant/project/add'),
(1864, 5, 'merchant/project/edit'),
(1865, 5, 'merchant/project/state'),
(1866, 5, 'merchant/project/remove'),
(1867, 5, 'merchant/project_percent'),
(1868, 5, 'merchant/project_percent/index'),
(1869, 5, 'merchant/project_percent/edit'),
(1870, 5, 'merchant/project_percent/remove'),
(1871, 5, 'merchant/project_product'),
(1872, 5, 'merchant/project_product/setting'),
(1873, 5, 'merchant/rebate'),
(1874, 5, 'merchant/rebate/index'),
(1875, 5, 'merchant/rebate/add'),
(1876, 5, 'merchant/rebate/edit'),
(1877, 5, 'merchant/rebate/remove'),
(1878, 5, 'order'),
(1879, 5, 'order/order'),
(1880, 5, 'order/order/index'),
(1881, 5, 'order/order/info'),
(1882, 5, 'order/order/pay'),
(1883, 5, 'setting'),
(1884, 5, 'setting/account_log'),
(1885, 5, 'setting/account_log/index'),
(1886, 5, 'setting/account_log/add'),
(1887, 5, 'setting/account_log/edit'),
(1888, 5, 'setting/account_log/remove'),
(1889, 5, 'setting/black_card'),
(1890, 5, 'setting/black_card/index'),
(1891, 5, 'setting/black_card/add'),
(1892, 5, 'setting/black_card/edit'),
(1893, 5, 'setting/black_card/state'),
(1894, 5, 'setting/black_card/remove'),
(1895, 5, 'setting/channel_account'),
(1896, 5, 'setting/channel_account/index'),
(1897, 5, 'setting/merchant_account'),
(1898, 5, 'setting/merchant_account/index'),
(1899, 5, 'setting/merchant_account/add'),
(1900, 5, 'setting/merchant_account/edit'),
(1901, 4, 'admin'),
(1902, 4, 'admin/auth'),
(1903, 4, 'admin/auth/index'),
(1904, 4, 'admin/auth/add'),
(1905, 4, 'admin/auth/edit'),
(1906, 4, 'admin/auth/state'),
(1907, 4, 'admin/auth/apply'),
(1908, 4, 'admin/auth/remove'),
(1909, 4, 'admin/config'),
(1910, 4, 'admin/config/index'),
(1911, 4, 'admin/config/system'),
(1912, 4, 'admin/config/storage'),
(1913, 4, 'admin/menu'),
(1914, 4, 'admin/menu/index'),
(1915, 4, 'admin/menu/add'),
(1916, 4, 'admin/menu/edit'),
(1917, 4, 'admin/menu/state'),
(1918, 4, 'admin/menu/remove'),
(1919, 4, 'admin/module'),
(1920, 4, 'admin/module/index'),
(1921, 4, 'admin/module/install'),
(1922, 4, 'admin/module/change'),
(1923, 4, 'admin/oplog'),
(1924, 4, 'admin/oplog/index'),
(1925, 4, 'admin/oplog/clear'),
(1926, 4, 'admin/oplog/remove'),
(1927, 4, 'admin/queue'),
(1928, 4, 'admin/queue/index'),
(1929, 4, 'admin/queue/redo'),
(1930, 4, 'admin/queue/start'),
(1931, 4, 'admin/queue/stop'),
(1932, 4, 'admin/queue/clear'),
(1933, 4, 'admin/queue/remove'),
(1934, 4, 'admin/user'),
(1935, 4, 'admin/user/index'),
(1936, 4, 'admin/user/add'),
(1937, 4, 'admin/user/edit'),
(1938, 4, 'admin/user/pass'),
(1939, 4, 'admin/user/state'),
(1940, 4, 'admin/user/remove'),
(1941, 4, 'channel'),
(1942, 4, 'channel/account'),
(1943, 4, 'channel/account/index'),
(1944, 4, 'channel/account/add'),
(1945, 4, 'channel/account/edit'),
(1946, 4, 'channel/card'),
(1947, 4, 'channel/card/index'),
(1948, 4, 'channel/card/add'),
(1949, 4, 'channel/card/edit'),
(1950, 4, 'channel/card/state'),
(1951, 4, 'channel/card/setuse'),
(1952, 4, 'channel/card/remove'),
(1953, 4, 'channel/card/set'),
(1954, 4, 'channel/card/out'),
(1955, 4, 'channel/channel'),
(1956, 4, 'channel/channel/index'),
(1957, 4, 'channel/channel/add'),
(1958, 4, 'channel/channel/edit'),
(1959, 4, 'channel/channel/state'),
(1960, 4, 'channel/channel/remove'),
(1961, 4, 'channel/channel/setting'),
(1962, 4, 'channel/channel_product'),
(1963, 4, 'channel/channel_product/index'),
(1964, 4, 'channel/channel_product/add'),
(1965, 4, 'channel/channel_product/edit'),
(1966, 4, 'channel/channel_product/state'),
(1967, 4, 'channel/channel_product/remove'),
(1968, 4, 'channel/channel_product/percent'),
(1969, 4, 'channel/channel_shop'),
(1970, 4, 'channel/channel_shop/index'),
(1971, 4, 'channel/channel_shop/add'),
(1972, 4, 'channel/channel_shop/edit'),
(1973, 4, 'channel/channel_shop/state'),
(1974, 4, 'channel/channel_shop/remove'),
(1975, 4, 'channel/service'),
(1976, 4, 'channel/service/index'),
(1977, 4, 'channel/service/add'),
(1978, 4, 'channel/service/edit'),
(1979, 4, 'channel/service/state'),
(1980, 4, 'channel/service/remove'),
(1981, 4, 'channel/service_product'),
(1982, 4, 'channel/service_product/index'),
(1983, 4, 'channel/service_product/add'),
(1984, 4, 'channel/service_product/edit'),
(1985, 4, 'channel/service_product/state'),
(1986, 4, 'channel/service_product/remove'),
(1987, 4, 'channel/system'),
(1988, 4, 'channel/system/index'),
(1989, 4, 'channel/system/add'),
(1990, 4, 'channel/system/edit'),
(1991, 4, 'channel/system/state'),
(1992, 4, 'channel/system/remove'),
(1993, 4, 'channel/system_api'),
(1994, 4, 'channel/system_api/index'),
(1995, 4, 'channel/system_api/add'),
(1996, 4, 'channel/system_api/edit'),
(1997, 4, 'channel/system_api/state'),
(1998, 4, 'channel/system_api/remove'),
(1999, 4, 'channel/system_col'),
(2000, 4, 'channel/system_col/index'),
(2001, 4, 'channel/system_col/add'),
(2002, 4, 'channel/system_col/edit'),
(2003, 4, 'channel/system_col/state'),
(2004, 4, 'channel/system_col/remove'),
(2005, 4, 'data'),
(2006, 4, 'data/config'),
(2007, 4, 'data/config/slider'),
(2008, 4, 'data/member'),
(2009, 4, 'data/member/index'),
(2010, 4, 'data/member/state'),
(2011, 4, 'data/news_item'),
(2012, 4, 'data/news_item/index'),
(2013, 4, 'data/news_item/add'),
(2014, 4, 'data/news_item/edit'),
(2015, 4, 'data/news_item/state'),
(2016, 4, 'data/news_item/remove'),
(2017, 4, 'data/news_mark'),
(2018, 4, 'data/news_mark/index'),
(2019, 4, 'data/news_mark/add'),
(2020, 4, 'data/news_mark/edit'),
(2021, 4, 'data/news_mark/state'),
(2022, 4, 'data/news_mark/remove'),
(2023, 4, 'data/shop_goods'),
(2024, 4, 'data/shop_goods/index'),
(2025, 4, 'data/shop_goods/add'),
(2026, 4, 'data/shop_goods/edit'),
(2027, 4, 'data/shop_goods/copy'),
(2028, 4, 'data/shop_goods/stock'),
(2029, 4, 'data/shop_goods/state'),
(2030, 4, 'data/shop_goods/remove'),
(2031, 4, 'data/shop_goods_cate'),
(2032, 4, 'data/shop_goods_cate/index'),
(2033, 4, 'data/shop_goods_cate/add'),
(2034, 4, 'data/shop_goods_cate/edit'),
(2035, 4, 'data/shop_goods_cate/state'),
(2036, 4, 'data/shop_goods_cate/remove'),
(2037, 4, 'data/shop_goods_mark'),
(2038, 4, 'data/shop_goods_mark/index'),
(2039, 4, 'data/shop_goods_mark/add'),
(2040, 4, 'data/shop_goods_mark/edit'),
(2041, 4, 'data/shop_goods_mark/state'),
(2042, 4, 'data/shop_goods_mark/remove'),
(2043, 4, 'data/shop_order'),
(2044, 4, 'data/shop_order/index'),
(2045, 4, 'data/shop_order/truck'),
(2046, 4, 'data/shop_order/truckquery'),
(2047, 4, 'data/shop_order/cancel'),
(2048, 4, 'data/shop_order_send'),
(2049, 4, 'data/shop_order_send/index'),
(2050, 4, 'data/shop_order_service'),
(2051, 4, 'data/shop_order_service/index'),
(2052, 4, 'data/shop_truck_company'),
(2053, 4, 'data/shop_truck_company/index'),
(2054, 4, 'data/shop_truck_company/add'),
(2055, 4, 'data/shop_truck_company/edit'),
(2056, 4, 'data/shop_truck_company/state'),
(2057, 4, 'data/shop_truck_company/remove'),
(2058, 4, 'data/shop_truck_company/synchronize'),
(2059, 4, 'data/shop_truck_template'),
(2060, 4, 'data/shop_truck_template/index'),
(2061, 4, 'data/shop_truck_template/region'),
(2062, 4, 'data/shop_truck_template/add'),
(2063, 4, 'data/shop_truck_template/edit'),
(2064, 4, 'data/shop_truck_template/state'),
(2065, 4, 'data/shop_truck_template/remove'),
(2066, 4, 'merchant'),
(2067, 4, 'merchant/account'),
(2068, 4, 'merchant/account/index'),
(2069, 4, 'merchant/merchant'),
(2070, 4, 'merchant/merchant/index'),
(2071, 4, 'merchant/merchant/add'),
(2072, 4, 'merchant/merchant/edit'),
(2073, 4, 'merchant/merchant/recharge'),
(2074, 4, 'merchant/merchant/resetapi'),
(2075, 4, 'merchant/merchant/pass'),
(2076, 4, 'merchant/merchant/info'),
(2077, 4, 'merchant/merchant/state'),
(2078, 4, 'merchant/merchant/remove'),
(2079, 4, 'merchant/merchant_relation'),
(2080, 4, 'merchant/merchant_relation/index'),
(2081, 4, 'merchant/merchant_relation/add'),
(2082, 4, 'merchant/merchant_relation/relation'),
(2083, 4, 'merchant/merchant_relation/state'),
(2084, 4, 'merchant/merchant_relation/remove'),
(2085, 4, 'merchant/order'),
(2086, 4, 'merchant/order/index'),
(2087, 4, 'merchant/order/info'),
(2088, 4, 'merchant/percent'),
(2089, 4, 'merchant/percent/index'),
(2090, 4, 'merchant/percent/edit'),
(2091, 4, 'merchant/percent/remove'),
(2092, 4, 'merchant/product'),
(2093, 4, 'merchant/product/setting'),
(2094, 4, 'merchant/project'),
(2095, 4, 'merchant/project/index'),
(2096, 4, 'merchant/project/add'),
(2097, 4, 'merchant/project/edit'),
(2098, 4, 'merchant/project/state'),
(2099, 4, 'merchant/project/remove'),
(2100, 4, 'merchant/project_percent'),
(2101, 4, 'merchant/project_percent/index'),
(2102, 4, 'merchant/project_percent/edit'),
(2103, 4, 'merchant/project_percent/remove'),
(2104, 4, 'merchant/project_product'),
(2105, 4, 'merchant/project_product/setting'),
(2106, 4, 'merchant/rebate'),
(2107, 4, 'merchant/rebate/index'),
(2108, 4, 'merchant/rebate/add'),
(2109, 4, 'merchant/rebate/edit'),
(2110, 4, 'merchant/rebate/remove'),
(2111, 4, 'order'),
(2112, 4, 'order/order'),
(2113, 4, 'order/order/index'),
(2114, 4, 'order/order/stat'),
(2115, 4, 'order/order/info'),
(2116, 4, 'order/order/pay'),
(2117, 4, 'setting'),
(2118, 4, 'setting/account'),
(2119, 4, 'setting/account/index'),
(2120, 4, 'setting/account/reset'),
(2121, 4, 'setting/account_log'),
(2122, 4, 'setting/account_log/index'),
(2123, 4, 'setting/account_log/add'),
(2124, 4, 'setting/account_log/edit'),
(2125, 4, 'setting/account_log/remove'),
(2126, 4, 'setting/black_card'),
(2127, 4, 'setting/black_card/index'),
(2128, 4, 'setting/black_card/add'),
(2129, 4, 'setting/black_card/edit'),
(2130, 4, 'setting/black_card/state'),
(2131, 4, 'setting/black_card/remove'),
(2132, 4, 'setting/channel_account'),
(2133, 4, 'setting/channel_account/index'),
(2134, 4, 'setting/config'),
(2135, 4, 'setting/config/index'),
(2136, 4, 'setting/config/save'),
(2137, 4, 'setting/merchant_account'),
(2138, 4, 'setting/merchant_account/index'),
(2139, 4, 'setting/merchant_account/add'),
(2140, 4, 'setting/merchant_account/edit'),
(2141, 4, 'setting/stat'),
(2142, 4, 'setting/stat/index'),
(2143, 4, 'setting/stat/info');

-- --------------------------------------------------------

--
-- 表的结构 `system_config`
--

CREATE TABLE `system_config` (
  `type` varchar(20) DEFAULT '' COMMENT '分类',
  `name` varchar(100) DEFAULT '' COMMENT '配置名',
  `value` varchar(2048) DEFAULT '' COMMENT '配置值'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统-配置';

--
-- 转存表中的数据 `system_config`
--

INSERT INTO `system_config` (`type`, `name`, `value`) VALUES
('base', 'site_name', '亿畅通'),
('base', 'site_icon', 'https://v6.thinkadmin.top/upload/f47b8fe06e38ae99/08e8398da45583b9.png'),
('base', 'site_copy', '©版权所有 2020-2021 亿畅通'),
('base', 'app_name', '亿畅通'),
('base', 'app_version', '2.0'),
('base', 'miitbeian', '粤ICP备16006642号-2'),
('storage', 'qiniu_http_protocol', 'http'),
('storage', 'type', 'local'),
('storage', 'allow_exts', 'doc,gif,icon,jpg,mp3,mp4,p12,pem,png,rar,xls,xlsx'),
('storage', 'qiniu_region', '华东'),
('storage', 'qiniu_bucket', ''),
('storage', 'qiniu_http_domain', ''),
('storage', 'qiniu_access_key', ''),
('storage', 'qiniu_secret_key', ''),
('wechat', 'type', 'api'),
('wechat', 'token', ''),
('wechat', 'appid', ''),
('wechat', 'appsecret', ''),
('wechat', 'encodingaeskey', ''),
('wechat', 'thr_appid', ''),
('wechat', 'thr_appkey', ''),
('wechat', 'mch_id', ''),
('wechat', 'mch_key', ''),
('wechat', 'mch_ssl_type', 'pem'),
('wechat', 'mch_ssl_p12', ''),
('wechat', 'mch_ssl_key', ''),
('wechat', 'mch_ssl_cer', ''),
('storage', 'alioss_http_protocol', 'http'),
('storage', 'alioss_point', 'oss-cn-hangzhou.aliyuncs.com'),
('storage', 'alioss_bucket', ''),
('storage', 'alioss_http_domain', ''),
('storage', 'alioss_access_key', ''),
('storage', 'alioss_secret_key', ''),
('base', 'xpath', 'admin'),
('base', 'beian', ''),
('base', 'settingStatus', '2'),
('base', 'settingUpdate', '2'),
('base', 'settingIp', ''),
('base', 'queue', '1'),
('base', 'settingOpenTime', ''),
('base', 'system_host', 'http://api.yhfka.com'),
('base', 'redis_host', '127.0.0.1'),
('base', 'redis_port', '6379'),
('base', 'redis_password', ''),
('base', 'order_name', 'num'),
('base', 'system_order_perfix', 'Y'),
('base', 'sign_type', '1'),
('base', 'system_shanghu_host', 'http://sh.yhfka.com/'),
('base', 'system_api_host', 'http://www.docway.net/project/1YhaM18Dx2X/1Ypl8gKl9mq'),
('base', 'no_account_merchant', '1'),
('base', 'no_profit_merchant', '1');

-- --------------------------------------------------------

--
-- 表的结构 `system_data`
--

CREATE TABLE `system_data` (
  `id` bigint(11) UNSIGNED NOT NULL,
  `name` varchar(100) DEFAULT '' COMMENT '配置名',
  `value` longtext COMMENT '配置值'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统-数据';

-- --------------------------------------------------------

--
-- 表的结构 `system_menu`
--

CREATE TABLE `system_menu` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `pid` bigint(20) UNSIGNED DEFAULT '0' COMMENT '上级ID',
  `title` varchar(100) DEFAULT '' COMMENT '菜单名称',
  `icon` varchar(100) DEFAULT '' COMMENT '菜单图标',
  `node` varchar(100) DEFAULT '' COMMENT '节点代码',
  `url` varchar(400) DEFAULT '' COMMENT '链接节点',
  `params` varchar(500) DEFAULT '' COMMENT '链接参数',
  `target` varchar(20) DEFAULT '_self' COMMENT '打开方式',
  `sort` int(11) UNSIGNED DEFAULT '0' COMMENT '排序权重',
  `status` tinyint(1) UNSIGNED DEFAULT '1' COMMENT '状态(0:禁用,1:启用)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统-菜单';

--
-- 转存表中的数据 `system_menu`
--

INSERT INTO `system_menu` (`id`, `pid`, `title`, `icon`, `node`, `url`, `params`, `target`, `sort`, `status`, `create_at`) VALUES
(2, 0, '系统', '', '', '#', '', '_self', 100, 1, '2018-09-05 10:04:52'),
(3, 4, '系统菜单', 'layui-icon layui-icon-layouts', '', 'admin/menu/index', '', '_self', 1, 1, '2018-09-05 10:05:26'),
(4, 2, '系统配置', '', '', '#', '', '_self', 20, 1, '2018-09-05 10:07:17'),
(5, 12, '系统用户', 'layui-icon layui-icon-username', '', 'admin/user/index', '', '_self', 1, 1, '2018-09-06 03:10:42'),
(7, 12, '访问权限', 'layui-icon layui-icon-vercode', '', 'admin/auth/index', '', '_self', 2, 1, '2018-09-06 07:17:14'),
(11, 4, '系统参数', 'layui-icon layui-icon-set', '', 'admin/config/index', '', '_self', 4, 1, '2018-09-06 08:43:47'),
(12, 2, '权限管理', '', '', '#', '', '_self', 10, 1, '2018-09-06 10:01:31'),
(27, 4, '系统任务', 'layui-icon layui-icon-log', '', 'admin/queue/index', '', '_self', 3, 1, '2018-11-29 03:13:34'),
(49, 4, '系统日志', 'layui-icon layui-icon-form', '', 'admin/oplog/index', '', '_self', 2, 1, '2019-02-18 04:56:56'),
(67, 0, '渠道', '', '', '#', '', '_self', 0, 1, '2020-09-19 08:31:33'),
(68, 0, '商户', '', '', '#', '', '_self', 0, 1, '2020-09-19 08:31:48'),
(69, 0, '订单', '', '', '#', '', '_self', 0, 1, '2020-09-19 08:31:57'),
(70, 67, '渠道管理', '', '', '#', '', '_self', 0, 1, '2020-09-19 08:32:06'),
(71, 68, '商户管理', '', '', '#', '', '_self', 0, 1, '2020-09-19 08:32:13'),
(72, 69, '订单管理', '', '', '#', '', '_self', 0, 1, '2020-09-19 08:32:20'),
(73, 70, '渠道列表', 'layui-icon layui-icon-transfer', 'channel/channel/index', 'channel/channel/index', '', '_self', 0, 1, '2020-09-19 08:32:26'),
(74, 71, '商户列表', 'layui-icon layui-icon-service', 'merchant/merchant/index', 'merchant/merchant/index', '', '_self', 0, 1, '2020-09-19 08:32:33'),
(75, 72, '订单列表', 'layui-icon layui-icon-print', 'order/order/index', 'order/order/index', '', '_self', 0, 1, '2020-09-19 08:32:40'),
(76, 67, '业务管理', '', '', '#', '', '_self', 0, 1, '2020-09-24 11:29:39'),
(77, 76, '业务列表', 'layui-icon layui-icon-component', 'channel/service/index', 'channel/service/index', '', '_self', 0, 1, '2020-09-24 11:30:04'),
(78, 71, '渠道关联', 'layui-icon layui-icon-transfer', 'merchant/merchant_relation/index', 'merchant/merchant_relation/index', '', '_self', 0, 0, '2020-09-25 05:35:21'),
(82, 70, '店铺列表', 'layui-icon layui-icon-logout', 'channel/channel_shop/index', 'channel/channel_shop/index', '', '_self', 0, 0, '2020-10-20 03:03:39'),
(83, 4, '系统设置', 'layui-icon layui-icon-logout', 'setting/config/index', 'setting/config/index', '', '_self', 0, 0, '2020-11-06 06:02:59'),
(84, 92, '统计管理', '', '', '#', '', '_self', 0, 1, '2020-11-24 06:54:04'),
(85, 84, '订单统计', 'layui-icon layui-icon-windows', 'setting/stat/index', 'setting/stat/index', '', '_self', 0, 1, '2020-11-24 06:54:30'),
(86, 84, '渠道对账', 'layui-icon layui-icon-transfer', 'setting/channel_account/index', 'setting/channel_account/index', '', '_self', 0, 0, '2020-12-14 06:30:51'),
(87, 67, '卡密管理', '', '', '#', '', '_self', 0, 1, '2021-03-24 03:49:14'),
(88, 87, '卡密管理', 'layui-icon layui-icon-android', 'channel/card/index', 'channel/card/index', '', '_self', 0, 1, '2021-03-24 03:49:31'),
(89, 71, '卡号黑名单', 'layui-icon layui-icon-logout', 'setting/black_card/index', 'setting/black_card/index', '', '_self', 0, 1, '2021-03-29 15:26:19'),
(90, 93, '渠道账单', 'layui-icon layui-icon-service', 'channel/account/index', 'channel/account/index', '', '_self', 0, 1, '2021-04-11 14:38:23'),
(91, 93, '商户账单', 'layui-icon layui-icon-slider', 'setting/merchant_account/index', 'setting/merchant_account/index', '', '_self', 0, 1, '2021-04-14 02:19:25'),
(92, 0, '财务', '', '', '#', '', '_self', 0, 1, '2021-05-31 02:40:45'),
(93, 92, '账单管理', '', '', '#', '', '_self', 10, 1, '2021-05-31 02:41:29'),
(94, 93, '公户账单', 'layui-icon layui-icon-service', 'setting/account_log/index', 'setting/account_log/index', '', '_self', 0, 1, '2021-05-31 02:42:21'),
(95, 84, '账单统计', 'layui-icon layui-icon-gift', 'setting/account/index', 'setting/account/index', '', '_self', 0, 1, '2021-05-31 02:42:51');

-- --------------------------------------------------------

--
-- 表的结构 `system_oplog`
--

CREATE TABLE `system_oplog` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `node` varchar(200) NOT NULL DEFAULT '' COMMENT '当前操作节点',
  `geoip` varchar(15) NOT NULL DEFAULT '' COMMENT '操作者IP地址',
  `action` varchar(200) NOT NULL DEFAULT '' COMMENT '操作行为名称',
  `content` varchar(1024) NOT NULL DEFAULT '' COMMENT '操作内容描述',
  `username` varchar(50) NOT NULL DEFAULT '' COMMENT '操作人用户名',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统-日志';

--
-- 转存表中的数据 `system_oplog`
--

INSERT INTO `system_oplog` (`id`, `node`, `geoip`, `action`, `content`, `username`, `create_at`) VALUES
(1, 'admin/login/index', '49.7.233.18', '用户登录', '登录系统后台成功', 'admin', '2021-12-27 07:01:07');

-- --------------------------------------------------------

--
-- 表的结构 `system_queue`
--

CREATE TABLE `system_queue` (
  `id` bigint(20) NOT NULL,
  `code` varchar(20) NOT NULL DEFAULT '' COMMENT '任务编号',
  `title` varchar(50) NOT NULL DEFAULT '' COMMENT '任务名称',
  `command` varchar(500) DEFAULT '' COMMENT '执行指令',
  `exec_pid` bigint(20) DEFAULT '0' COMMENT '执行进程',
  `exec_data` longtext COMMENT '执行参数',
  `exec_time` bigint(20) DEFAULT '0' COMMENT '执行时间',
  `exec_desc` varchar(500) DEFAULT '' COMMENT '执行描述',
  `enter_time` decimal(20,4) DEFAULT '0.0000' COMMENT '开始时间',
  `outer_time` decimal(20,4) DEFAULT '0.0000' COMMENT '结束时间',
  `loops_time` bigint(20) DEFAULT '0' COMMENT '循环时间',
  `attempts` bigint(20) DEFAULT '0' COMMENT '执行次数',
  `rscript` tinyint(1) DEFAULT '1' COMMENT '任务类型(0单例,1多例)',
  `status` tinyint(1) DEFAULT '1' COMMENT '任务状态(1新任务,2处理中,3成功,4失败)',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统-任务';

--
-- 转存表中的数据 `system_queue`
--

INSERT INTO `system_queue` (`id`, `code`, `title`, `command`, `exec_pid`, `exec_data`, `exec_time`, `exec_desc`, `enter_time`, `outer_time`, `loops_time`, `attempts`, `rscript`, `status`, `create_at`) VALUES
(1, 'Q202009197459087', '优化数据库所有数据表', 'xadmin:database optimize', 11176, '[]', 1600513019, '', '1600665627.0476', '1600665629.1329', 0, 1, 0, 3, '2020-09-19 10:57:00'),
(2, 'Q202009213610144', '定时清理系统任务数据', 'xadmin:queue clean', 0, '[]', 1600773848, '清理 0 条历史任务，关闭 0 条超时任务，重置 0 条循环任务', '1600770247.7679', '1600770248.1229', 3600, 30, 0, 1, '2020-09-21 05:23:11');

-- --------------------------------------------------------

--
-- 表的结构 `system_user`
--

CREATE TABLE `system_user` (
  `id` bigint(20) NOT NULL,
  `username` varchar(50) DEFAULT '' COMMENT '用户账号',
  `password` varchar(32) DEFAULT '' COMMENT '用户密码',
  `nickname` varchar(50) DEFAULT '' COMMENT '用户昵称',
  `headimg` varchar(255) DEFAULT '' COMMENT '头像地址',
  `authorize` varchar(255) DEFAULT '' COMMENT '权限授权',
  `contact_qq` varchar(20) DEFAULT '' COMMENT '联系QQ',
  `contact_mail` varchar(20) DEFAULT '' COMMENT '联系邮箱',
  `contact_phone` varchar(20) DEFAULT '' COMMENT '联系手机',
  `login_ip` varchar(255) DEFAULT '' COMMENT '登录地址',
  `login_at` varchar(20) DEFAULT '' COMMENT '登录时间',
  `login_num` bigint(20) DEFAULT '0' COMMENT '登录次数',
  `describe` varchar(255) DEFAULT '' COMMENT '备注说明',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态(0禁用,1启用)',
  `sort` bigint(20) DEFAULT '0' COMMENT '排序权重',
  `is_deleted` tinyint(1) DEFAULT '0' COMMENT '删除(1删除,0未删)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统-用户';

--
-- 转存表中的数据 `system_user`
--

INSERT INTO `system_user` (`id`, `username`, `password`, `nickname`, `headimg`, `authorize`, `contact_qq`, `contact_mail`, `contact_phone`, `login_ip`, `login_at`, `login_num`, `describe`, `status`, `sort`, `is_deleted`, `create_at`) VALUES
(10000, 'admin', 'a66abb5684c45962d887564f08346e8d', '系统管理员', '', '', '', '', '', '49.7.233.18', '2021-12-27 15:01:07', 5220, '', 1, 0, 0, '2015-11-13 07:14:22'),
(10001, 'shanghu', '4b9b98e9ec869619db700431a8986bff', 'shanghu', '', '2', '', '', '', '', '', 0, 'shanghu', 1, 0, 0, '2020-10-12 10:43:32');

--
-- 转储表的索引
--

--
-- 表的索引 `black_card`
--
ALTER TABLE `black_card`
  ADD PRIMARY KEY (`id`);

--
-- 表的索引 `channel_account`
--
ALTER TABLE `channel_account`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `day` (`day`,`cid`);

--
-- 表的索引 `channel_card`
--
ALTER TABLE `channel_card`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index` (`cnum`,`cpwd`);

--
-- 表的索引 `channel_list`
--
ALTER TABLE `channel_list`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_system_user_name` (`name`) USING BTREE,
  ADD KEY `idx_system_user_deleted` (`is_deleted`) USING BTREE,
  ADD KEY `idx_system_user_status` (`status`) USING BTREE;

--
-- 表的索引 `channel_percent`
--
ALTER TABLE `channel_percent`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `mid` (`pid`) USING BTREE;

--
-- 表的索引 `channel_product`
--
ALTER TABLE `channel_product`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_channel_product_sort` (`sort`) USING BTREE,
  ADD KEY `idx_channel_product_status` (`status`) USING BTREE,
  ADD KEY `idx_channel_product_deleted` (`is_deleted`) USING BTREE;

--
-- 表的索引 `channel_shop`
--
ALTER TABLE `channel_shop`
  ADD PRIMARY KEY (`id`);

--
-- 表的索引 `merchant_account`
--
ALTER TABLE `merchant_account`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `day` (`day`,`mid`);

--
-- 表的索引 `merchant_account_log`
--
ALTER TABLE `merchant_account_log`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `pid` (`pid`),
  ADD KEY `order_id` (`order_id`(191)) USING BTREE,
  ADD KEY `mid` (`mid`,`account_type`,`oper`,`is_yue`) USING BTREE,
  ADD KEY `type` (`type`,`mid`);

--
-- 表的索引 `merchant_account_log_history`
--
ALTER TABLE `merchant_account_log_history`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `log_id` (`log_id`);

--
-- 表的索引 `merchant_card`
--
ALTER TABLE `merchant_card`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index` (`card_id`,`mid`,`order_id`(255));

--
-- 表的索引 `merchant_card_mobile`
--
ALTER TABLE `merchant_card_mobile`
  ADD PRIMARY KEY (`id`),
  ADD KEY `card` (`card`);

--
-- 表的索引 `merchant_day`
--
ALTER TABLE `merchant_day`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index` (`mid`,`day`);

--
-- 表的索引 `merchant_dong_log`
--
ALTER TABLE `merchant_dong_log`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `day` (`day`,`mid`);

--
-- 表的索引 `merchant_list`
--
ALTER TABLE `merchant_list`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD UNIQUE KEY `appid` (`appid`),
  ADD KEY `idx_system_user_name` (`username`) USING BTREE,
  ADD KEY `idx_system_user_deleted` (`is_deleted`) USING BTREE,
  ADD KEY `idx_system_user_status` (`status`) USING BTREE;

--
-- 表的索引 `merchant_order`
--
ALTER TABLE `merchant_order`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_id` (`order_id`(255)),
  ADD KEY `merchant_order_id` (`merchant_order_id`(255)),
  ADD KEY `error` (`merchant_callback_error`),
  ADD KEY `account` (`cash`,`account`) USING BTREE,
  ADD KEY `product_key` (`product_key`),
  ADD KEY `pid` (`pid`,`status`);

--
-- 表的索引 `merchant_order_auto_error`
--
ALTER TABLE `merchant_order_auto_error`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_id` (`order_id`(255)),
  ADD KEY `merchant_order_id` (`merchant_order_id`(255)),
  ADD KEY `error` (`merchant_callback_error`),
  ADD KEY `account` (`cash`,`account`) USING BTREE;

--
-- 表的索引 `merchant_order_history`
--
ALTER TABLE `merchant_order_history`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_id` (`order_id`(255)),
  ADD KEY `merchant_order_id` (`merchant_order_id`(255)),
  ADD KEY `error` (`merchant_callback_error`),
  ADD KEY `product_key` (`product_key`);

--
-- 表的索引 `merchant_percent`
--
ALTER TABLE `merchant_percent`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `mid` (`mid`,`product_key`) USING BTREE;

--
-- 表的索引 `merchant_product`
--
ALTER TABLE `merchant_product`
  ADD PRIMARY KEY (`id`),
  ADD KEY `pid` (`mid`,`cid`,`pid`),
  ADD KEY `product_key` (`mid`,`product_key`,`sort`) USING BTREE;

--
-- 表的索引 `merchant_project`
--
ALTER TABLE `merchant_project`
  ADD PRIMARY KEY (`id`);

--
-- 表的索引 `merchant_project_percent`
--
ALTER TABLE `merchant_project_percent`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `mid` (`mid`,`project_id`,`product_key`) USING BTREE;

--
-- 表的索引 `merchant_project_product`
--
ALTER TABLE `merchant_project_product`
  ADD PRIMARY KEY (`id`),
  ADD KEY `pid` (`mid`,`project_id`,`cid`,`pid`) USING BTREE,
  ADD KEY `product_key` (`mid`,`project_id`,`product_key`,`sort`) USING BTREE;

--
-- 表的索引 `merchant_qianmi_apply`
--
ALTER TABLE `merchant_qianmi_apply`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_id` (`reqid`(255));

--
-- 表的索引 `merchant_qianmi_order`
--
ALTER TABLE `merchant_qianmi_order`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_id` (`reqid`(255)) USING BTREE;

--
-- 表的索引 `merchant_rebate`
--
ALTER TABLE `merchant_rebate`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `merchant_relation`
--
ALTER TABLE `merchant_relation`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `mid` (`mid`,`product_key`);

--
-- 表的索引 `merchant_system_auth`
--
ALTER TABLE `merchant_system_auth`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_system_auth_title` (`title`) USING BTREE,
  ADD KEY `idx_system_auth_status` (`status`) USING BTREE;

--
-- 表的索引 `merchant_system_auth_node`
--
ALTER TABLE `merchant_system_auth_node`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_system_auth_auth` (`auth`) USING BTREE,
  ADD KEY `idx_system_auth_node` (`node`(191)) USING BTREE;

--
-- 表的索引 `merchant_system_config`
--
ALTER TABLE `merchant_system_config`
  ADD KEY `idx_system_config_type` (`type`) USING BTREE,
  ADD KEY `idx_system_config_name` (`name`) USING BTREE;

--
-- 表的索引 `merchant_system_data`
--
ALTER TABLE `merchant_system_data`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_system_data_name` (`name`) USING BTREE;

--
-- 表的索引 `merchant_system_menu`
--
ALTER TABLE `merchant_system_menu`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_system_menu_node` (`node`) USING BTREE,
  ADD KEY `idx_system_menu_status` (`status`) USING BTREE;

--
-- 表的索引 `merchant_system_oplog`
--
ALTER TABLE `merchant_system_oplog`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `merchant_system_queue`
--
ALTER TABLE `merchant_system_queue`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_system_queue_code` (`code`) USING BTREE,
  ADD KEY `idx_system_queue_title` (`title`) USING BTREE,
  ADD KEY `idx_system_queue_status` (`status`) USING BTREE,
  ADD KEY `idx_system_queue_rscript` (`rscript`) USING BTREE,
  ADD KEY `idx_system_queue_create_at` (`create_at`) USING BTREE,
  ADD KEY `idx_system_queue_exec_time` (`exec_time`) USING BTREE;

--
-- 表的索引 `merchant_system_user`
--
ALTER TABLE `merchant_system_user`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_system_user_username` (`username`) USING BTREE,
  ADD KEY `idx_system_user_deleted` (`is_deleted`) USING BTREE,
  ADD KEY `idx_system_user_status` (`status`) USING BTREE;

--
-- 表的索引 `service_info`
--
ALTER TABLE `service_info`
  ADD PRIMARY KEY (`id`);

--
-- 表的索引 `service_product`
--
ALTER TABLE `service_product`
  ADD PRIMARY KEY (`id`);

--
-- 表的索引 `service_system`
--
ALTER TABLE `service_system`
  ADD PRIMARY KEY (`id`);

--
-- 表的索引 `service_system_api`
--
ALTER TABLE `service_system_api`
  ADD PRIMARY KEY (`id`);

--
-- 表的索引 `service_system_col`
--
ALTER TABLE `service_system_col`
  ADD PRIMARY KEY (`id`);

--
-- 表的索引 `stat`
--
ALTER TABLE `stat`
  ADD PRIMARY KEY (`id`),
  ADD KEY `day` (`day`);

--
-- 表的索引 `stat_account`
--
ALTER TABLE `stat_account`
  ADD PRIMARY KEY (`id`),
  ADD KEY `day` (`day`);

--
-- 表的索引 `stat_account_log`
--
ALTER TABLE `stat_account_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `day` (`day`,`type`,`type_id`);

--
-- 表的索引 `stat_chnanel_account`
--
ALTER TABLE `stat_chnanel_account`
  ADD PRIMARY KEY (`id`);

--
-- 表的索引 `system_auth`
--
ALTER TABLE `system_auth`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_system_auth_title` (`title`) USING BTREE,
  ADD KEY `idx_system_auth_status` (`status`) USING BTREE;

--
-- 表的索引 `system_auth_node`
--
ALTER TABLE `system_auth_node`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_system_auth_auth` (`auth`) USING BTREE,
  ADD KEY `idx_system_auth_node` (`node`(191)) USING BTREE;

--
-- 表的索引 `system_config`
--
ALTER TABLE `system_config`
  ADD KEY `idx_system_config_type` (`type`) USING BTREE,
  ADD KEY `idx_system_config_name` (`name`) USING BTREE;

--
-- 表的索引 `system_data`
--
ALTER TABLE `system_data`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_system_data_name` (`name`) USING BTREE;

--
-- 表的索引 `system_menu`
--
ALTER TABLE `system_menu`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_system_menu_node` (`node`) USING BTREE,
  ADD KEY `idx_system_menu_status` (`status`) USING BTREE;

--
-- 表的索引 `system_oplog`
--
ALTER TABLE `system_oplog`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `system_queue`
--
ALTER TABLE `system_queue`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_system_queue_code` (`code`) USING BTREE,
  ADD KEY `idx_system_queue_title` (`title`) USING BTREE,
  ADD KEY `idx_system_queue_status` (`status`) USING BTREE,
  ADD KEY `idx_system_queue_rscript` (`rscript`) USING BTREE,
  ADD KEY `idx_system_queue_create_at` (`create_at`) USING BTREE,
  ADD KEY `idx_system_queue_exec_time` (`exec_time`) USING BTREE;

--
-- 表的索引 `system_user`
--
ALTER TABLE `system_user`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `idx_system_user_username` (`username`) USING BTREE,
  ADD KEY `idx_system_user_deleted` (`is_deleted`) USING BTREE,
  ADD KEY `idx_system_user_status` (`status`) USING BTREE;

--
-- 在导出的表使用AUTO_INCREMENT
--

--
-- 使用表AUTO_INCREMENT `black_card`
--
ALTER TABLE `black_card`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `channel_account`
--
ALTER TABLE `channel_account`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `channel_card`
--
ALTER TABLE `channel_card`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `channel_list`
--
ALTER TABLE `channel_list`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- 使用表AUTO_INCREMENT `channel_percent`
--
ALTER TABLE `channel_percent`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `channel_product`
--
ALTER TABLE `channel_product`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- 使用表AUTO_INCREMENT `channel_shop`
--
ALTER TABLE `channel_shop`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_account`
--
ALTER TABLE `merchant_account`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_account_log`
--
ALTER TABLE `merchant_account_log`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_account_log_history`
--
ALTER TABLE `merchant_account_log_history`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_card`
--
ALTER TABLE `merchant_card`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_card_mobile`
--
ALTER TABLE `merchant_card_mobile`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_day`
--
ALTER TABLE `merchant_day`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_dong_log`
--
ALTER TABLE `merchant_dong_log`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_list`
--
ALTER TABLE `merchant_list`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- 使用表AUTO_INCREMENT `merchant_order`
--
ALTER TABLE `merchant_order`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_order_auto_error`
--
ALTER TABLE `merchant_order_auto_error`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_order_history`
--
ALTER TABLE `merchant_order_history`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_percent`
--
ALTER TABLE `merchant_percent`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_product`
--
ALTER TABLE `merchant_product`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- 使用表AUTO_INCREMENT `merchant_project`
--
ALTER TABLE `merchant_project`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_project_percent`
--
ALTER TABLE `merchant_project_percent`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_project_product`
--
ALTER TABLE `merchant_project_product`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_qianmi_apply`
--
ALTER TABLE `merchant_qianmi_apply`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_qianmi_order`
--
ALTER TABLE `merchant_qianmi_order`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_rebate`
--
ALTER TABLE `merchant_rebate`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_relation`
--
ALTER TABLE `merchant_relation`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_system_auth`
--
ALTER TABLE `merchant_system_auth`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- 使用表AUTO_INCREMENT `merchant_system_auth_node`
--
ALTER TABLE `merchant_system_auth_node`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=73;

--
-- 使用表AUTO_INCREMENT `merchant_system_data`
--
ALTER TABLE `merchant_system_data`
  MODIFY `id` bigint(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_system_menu`
--
ALTER TABLE `merchant_system_menu`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=89;

--
-- 使用表AUTO_INCREMENT `merchant_system_oplog`
--
ALTER TABLE `merchant_system_oplog`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `merchant_system_queue`
--
ALTER TABLE `merchant_system_queue`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- 使用表AUTO_INCREMENT `merchant_system_user`
--
ALTER TABLE `merchant_system_user`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10002;

--
-- 使用表AUTO_INCREMENT `service_info`
--
ALTER TABLE `service_info`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- 使用表AUTO_INCREMENT `service_product`
--
ALTER TABLE `service_product`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10074;

--
-- 使用表AUTO_INCREMENT `service_system`
--
ALTER TABLE `service_system`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `service_system_api`
--
ALTER TABLE `service_system_api`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `service_system_col`
--
ALTER TABLE `service_system_col`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `stat`
--
ALTER TABLE `stat`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `stat_account`
--
ALTER TABLE `stat_account`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `stat_account_log`
--
ALTER TABLE `stat_account_log`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `stat_chnanel_account`
--
ALTER TABLE `stat_chnanel_account`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `system_auth`
--
ALTER TABLE `system_auth`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- 使用表AUTO_INCREMENT `system_auth_node`
--
ALTER TABLE `system_auth_node`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2144;

--
-- 使用表AUTO_INCREMENT `system_data`
--
ALTER TABLE `system_data`
  MODIFY `id` bigint(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `system_menu`
--
ALTER TABLE `system_menu`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=96;

--
-- 使用表AUTO_INCREMENT `system_oplog`
--
ALTER TABLE `system_oplog`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- 使用表AUTO_INCREMENT `system_queue`
--
ALTER TABLE `system_queue`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- 使用表AUTO_INCREMENT `system_user`
--
ALTER TABLE `system_user`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10002;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
