You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2287 lines
154 KiB
MySQL

-- 推广员后台首页快捷菜单 ZCL
DROP TABLE IF EXISTS `tab_quick_menu`;
CREATE TABLE `tab_quick_menu` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '文档ID',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '菜单名称',
`url` varchar(255) NOT NULL DEFAULT '' COMMENT '链接地址',
`icon` varchar(50) DEFAULT '0' COMMENT '菜单ICON',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态',
PRIMARY KEY (`id`),
KEY `status` (`status`)
) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tab_quick_menu
-- ----------------------------
INSERT INTO `tab_quick_menu` VALUES ('1', '账户信息', '/index.php?s=/Home/Promote/base_info.html', '11', '0');
INSERT INTO `tab_quick_menu` VALUES ('2', '组长管理', '/index.php?s=/Home/Promote/mychlid.html', '12', '0');
INSERT INTO `tab_quick_menu` VALUES ('3', '推广员管理', '/index.php?s=/Home/Promote/mygrand.html', '0', '0');
INSERT INTO `tab_quick_menu` VALUES ('4', '数据汇总', '/index.php?s=/Home/Query/summary.html', '0', '0');
INSERT INTO `tab_quick_menu` VALUES ('5', '充值明细', '/index.php?s=/Home/Query/recharge.html', '0', '0');
INSERT INTO `tab_quick_menu` VALUES ('6', '注册明细', '/index.php?s=/Home/Query/register.html', '0', '0');
INSERT INTO `tab_quick_menu` VALUES ('7', 'ARPU统计', '/index.php?s=/Home/Query/arpu_analysis.html', '0', '0');
INSERT INTO `tab_quick_menu` VALUES ('8', '留存统计', '/index.php?s=/Home/Query/retention_analysis.html', '0', '0');
INSERT INTO `tab_quick_menu` VALUES ('9', '角色查询', '/index.php?s=/Home/Query/userPlayers.html', '0', '0');
INSERT INTO `tab_quick_menu` VALUES ('10', '专服管理', '/index.php?s=/Home/Apply/index.html', '0', '0');
INSERT INTO `tab_quick_menu` VALUES ('11', '扶持申请', '/index.php?s=/Home/Support/index.html', '0', '0');
INSERT INTO `tab_quick_menu` VALUES ('12', '扶持记录', '/index.php?s=/Home/Support/lists.html', '0', '0');
INSERT INTO `tab_quick_menu` VALUES ('13', '扶持额度', '/index.php?s=/Home/Support/quota.html', '0', '0');
INSERT INTO `tab_quick_menu` VALUES ('14', '我的平台币', '/index.php?s=/Home/PromoteCoin/myCoin.html', '0', '0');
INSERT INTO `tab_quick_menu` VALUES ('15', '平台币转移', '/index.php?s=/Home/PromoteCoin/record.html', '0', '0');
INSERT INTO `tab_quick_menu` VALUES ('16', '平台币充值', '/index.php?s=/Home/CoinOrder/order_list.html', '0', '0');
-- 推广员后台首页快捷菜单关联表 ZCL
DROP TABLE IF EXISTS `tab_promote_quick_menu`;
CREATE TABLE `tab_promote_quick_menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`promote_id` int(11) DEFAULT NULL COMMENT '推广员ID',
`quick_menu_id` int(11) DEFAULT NULL COMMENT '快捷菜单ID',
`create_time` int(11) DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of tab_promote_quick_menu
-- ----------------------------
INSERT INTO `tab_promote_quick_menu` VALUES ('4', '1', '3', '1569719823');
INSERT INTO `tab_promote_quick_menu` VALUES ('6', '1', '5', '1569719828');
INSERT INTO `tab_promote_quick_menu` VALUES ('7', '1', '6', '1569719830');
INSERT INTO `tab_promote_quick_menu` VALUES ('8', '1', '7', '1569719832');
INSERT INTO `tab_promote_quick_menu` VALUES ('9', '1', '14', '1569719835');
INSERT INTO `tab_promote_quick_menu` VALUES ('10', '1', '15', '1569719839');
INSERT INTO `tab_promote_quick_menu` VALUES ('11', '1', '12', '1569719849');
INSERT INTO `tab_promote_quick_menu` VALUES ('12', '1', '13', '1569719852');
INSERT INTO `tab_promote_quick_menu` VALUES ('14', '1', '8', '1569719866');
INSERT INTO `tab_promote_quick_menu` VALUES ('15', '1', '9', '1569719870');
INSERT INTO `tab_promote_quick_menu` VALUES ('16', '1', '10', '1569719877');
INSERT INTO `tab_promote_quick_menu` VALUES ('18', '1', '1', '1569720739');
5 years ago
5 years ago
-- 2019-10-01 by elf
5 years ago
alter table tab_game_source add column `original_url` varchar(255) NOT NULL default '' COMMENT '原包路径';
alter table tab_game_source add column `org_plist_url` varchar(255) NOT NULL default '' COMMENT '原包Plist路径';
-- ----------------------------
-- 2019-10-08 cxj
-- ----------------------------
5 years ago
ALTER TABLE `tab_game` ADD COLUMN `server_type` tinyint(2) NOT NULL DEFAULT 1 COMMENT '1-专服 2-混服' AFTER `support_ratio`;
ALTER TABLE `tab_game` ADD COLUMN `detail_content` MEDIUMTEXT NULL DEFAULT NULL COMMENT '游戏资料介绍' AFTER `features`;
-- ----------------------------
-- 2019-10-10 cxj
-- ----------------------------
ALTER TABLE `tab_promote` ADD COLUMN `child_game_permission` tinyint(2) NOT NULL DEFAULT 0 COMMENT '下级游戏添加权限 0-本账号已添加游戏 1-所有游戏' AFTER `idcard`;
-- 2019-10-11 cxj
ALTER TABLE `tab_apply` ADD COLUMN `bale_sort` int(5) NOT NULL DEFAULT 0 COMMENT '打包顺序' AFTER `offline_status`;
-- ----------------------------
-- 2019-10-11 zyx
-- ----------------------------
5 years ago
ALTER TABLE `tab_user` ADD COLUMN `last_device_number` varchar(50) DEFAULT '' COMMENT '上一次登录设备号' AFTER `device_tab_protect_log_readnumber`;
ALTER TABLE `tab_user` ADD COLUMN `last_login_ip` varchar(16) DEFAULT '' COMMENT '上一次登录id' AFTER `login_ip`;
CREATE TABLE `tab_protect_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`game_id` int(11) NOT NULL DEFAULT '0' COMMENT '游戏id',
`game_name` varchar(30) NOT NULL DEFAULT '' COMMENT '游戏名称',
`server_id` int(11) NOT NULL DEFAULT '0' COMMENT '服务器id',
`server_name` varchar(30) NOT NULL DEFAULT '' COMMENT '游戏服务区',
`user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
`user_account` varchar(30) NOT NULL DEFAULT '' COMMENT '测试账号',
`nickname` varchar(30) NOT NULL DEFAULT '' COMMENT '角色名称',
`promote_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广员id',
`promote_account` varchar(30) NOT NULL DEFAULT '' COMMENT '推广员',
`type` tinyint(2) DEFAULT '1' COMMENT '异常类型',
`detail` varchar(200) DEFAULT '' COMMENT '异常内容',
`create_time` int(11) DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`)
5 years ago
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-----------------
----
-----------------
CREATE TABLE `tab_test_resource` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
`user_id` int(11) DEFAULT '0' COMMENT '对应角色的id',
`user_account` varchar(50) DEFAULT NULL COMMENT '用户帐号',
`user_password` varchar(248) DEFAULT NULL COMMENT '用户密码',
`phone` varchar(15) DEFAULT '' COMMENT '手机号码',
`role_name` varchar(50) DEFAULT NULL COMMENT '角色名',
`game_id` int(11) NOT NULL COMMENT '游戏id',
`game_name` varchar(30) NOT NULL COMMENT '游戏名称',
`server_name` varchar(30) NOT NULL COMMENT '区服名称',
`server_id` int(11) DEFAULT NULL COMMENT '对接区服id',
`promote_id` int(11) DEFAULT '0' COMMENT '所属推广员id',
`promote_account` varchar(30) DEFAULT '' COMMENT '所属推广员账号',
`apply_name` varchar(30) DEFAULT '' COMMENT '申请人名称',
`apply_id` int(11) DEFAULT '0' COMMENT '申请人id',
`apply_remark` varchar(200) DEFAULT '' COMMENT '申请备注',
`apply_resource` int(11) DEFAULT '0' COMMENT '申请资源数量',
`apply_status` tinyint(2) DEFAULT '0' COMMENT '审核状态 0未审核 1未通过 2通过/发放',
`apply_type` int(2) DEFAULT '0' COMMENT '扶持类型 0新增 1后续',
`verify_resource` int(11) DEFAULT '0' COMMENT '实际发放',
`verify_remark` varchar(200) DEFAULT '' COMMENT '审核意见',
`create_time` int(11) DEFAULT '0' COMMENT '申请时间',
`verify_time` int(11) DEFAULT '0' COMMENT '审核时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `user_id` (`user_id`) USING BTREE,
KEY `game_id` (`game_id`) USING BTREE,
KEY `promote_id` (`promote_id`) USING BTREE,
KEY `create_time` (`create_time`) USING BTREE
5 years ago
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='测试资源申请';
5 years ago
-- 2019-10-09 by elf
5 years ago
alter table tab_user_play_info add column `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '角色创建时间';
alter table tab_user_play_info add column `create_ip` varchar(16) NOT NULL DEFAULT '' COMMENT '角色创建IP';
5 years ago
alter table tab_user_play_info add column `create_device_number` varchar(50) NOT NULL DEFAULT '' COMMENT '角色创建设备号';
5 years ago
alter table tab_server add column `server_id` varchar(50) not NULL default '' COMMENT '对接区服id';
-- ----------------------------
-- 2019-10-11 zyx
-- ----------------------------
CREATE TABLE `sys_document_read` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`document_id` int(11) NOT NULL DEFAULT '0' COMMENT '文档模型基础表id',
`category_id` int(10) NOT NULL DEFAULT '0' COMMENT '所属分类',
`promote_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广员id',
`create_time` int(11) DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `tab_protect_log_read` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`log_id` int(11) NOT NULL DEFAULT '0' COMMENT '日志id',
`promote_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广员id',
`create_time` int(11) DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`)
5 years ago
) ENGINE=MyISAM AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
5 years ago
-- 增加用户Token 验证用户
ALTER TABLE `tab_user`
ADD COLUMN `user_token` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户token 登入时下发' AFTER `token`;
-- ----------------------------
-- 2019-10-17 zyx
-- ----------------------------
alter table `tab_giftbag` modify COLUMN `giftbag_version` tinyint(2) COMMENT '运营平台 0双平台 1and 2ios 3超级签'
-- 2019-10-22 cxj
UPDATE `sys_model` SET list_grid = "id:编号\r\nsort:排序\r\ngame_name:游戏名称\r\ngame_type_name:游戏类型\r\ngame_type_id:游戏类型\r\ngame_appid:游戏appid\r\ngame_status|get_info_status:显示状态\r\npay_status|get_info_status:支付状态\r\nicon:图片id\r\napply_status:审核状态\r\ncategory:开放类型\r\nrecommend_status|get_info_status*1:推荐状态\r\nrelation_game_id:关联游戏id\r\nrelation_game_name:关联游戏名称\r\nsdk_version:运营平台\r\ndevelopers:开发商\r\ndow_num:下载\r\nonline_status:上线状态\r\ncreate_time:创建时间\r\nserver_type:混服管理\r\npartner_id:合作方\r\nid:操作:[EDIT]&id=[id]|编辑,Game/del?ids=[id]|删除" where id = 15;
-- 2019-10-23 zcl
ALTER TABLE `tab_coin_pay_order` CHANGE COLUMN `currency_num` `coin_num` int(11) NULL DEFAULT 0 COMMENT '代币数量' AFTER `auditor_time`;
-- 2019-10-23 zcl
update tab_quick_menu set name='订单查询' where name='充值明细'
-- 2019-10-28 cxj
CREATE TABLE `tab_partner` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`partner` varchar(30) NOT NULL COMMENT '合作方名称',
`uid` int(11) NOT NULL DEFAULT '0' COMMENT '添加人ID',
`status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态 0-禁用 1-启用',
`create_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间',
`last_up_time` int(10) NOT NULL DEFAULT '0' COMMENT '最后更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `tab_game` ADD COLUMN `partner_id` int(11) NOT NULL DEFAULT 0 COMMENT '合作方ID' AFTER `supersign_url`;
5 years ago
ALTER TABLE `tab_partner` MODIFY COLUMN `partner` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '合作方名称' AFTER `id`;
-- 2019-10-28 chenzhi
CREATE TABLE `tab_spend_count` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`promote_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广员id',
`promote_account` varchar(30) DEFAULT '' COMMENT '推广员账号',
`parent_id` int(11) DEFAULT '0' COMMENT '父类ID',
`parent_name` varchar(30) DEFAULT NULL COMMENT '父类名称',
5 years ago
`root_id` int(11) DEFAULT 0 COMMENT '根ID',
`root_name` varchar(30) DEFAULT NULL COMMENT '根名称',
5 years ago
`game_id` int(11) NOT NULL DEFAULT '0' COMMENT '游戏id',
`game_name` varchar(30) DEFAULT '' COMMENT '游戏名称',
`partner_id` int(11) DEFAULT '0' COMMENT '合作方id',
`partner_name` varchar(50) DEFAULT NULL COMMENT '合作方名称',
`cash_count` decimal(10,2) DEFAULT '0.00' COMMENT '现金流水',
`balance_coin_count` decimal(10,2) DEFAULT '0.00' COMMENT '平台币流水',
5 years ago
`inside_cash_count` decimal(10,2) DEFAULT '0.00' COMMENT '内充流水/绑定币流水',
5 years ago
`count_date` varchar(30) DEFAULT '' COMMENT '统计月份',
`create_time` int(11) DEFAULT NULL COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `game_id` (`game_id`) USING BTREE,
KEY `promote_id` (`promote_id`) USING BTREE,
KEY `partner_id` (`partner_id`) USING BTREE,
KEY `count_date` (`count_date`) USING BTREE
5 years ago
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='游戏流水聚合表';
CREATE TABLE `tab_spend_user_count` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`promote_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广员id',
`promote_account` varchar(30) DEFAULT '' COMMENT '推广员账号',
`parent_id` int(11) DEFAULT '0' COMMENT '父类ID',
`parent_name` varchar(30) DEFAULT NULL COMMENT '父类名称',
`root_id` int(11) DEFAULT 0 COMMENT '根ID',
`root_name` varchar(30) DEFAULT NULL COMMENT '根名称',
`cash_count` decimal(10,2) DEFAULT '0.00' COMMENT '现金流水',
`balance_coin_count` decimal(10,2) DEFAULT '0.00' COMMENT '平台币流水',
`inside_cash_count` decimal(10,2) DEFAULT '0.00' COMMENT '内充流水',
5 years ago
`all_count` decimal(10,2) DEFAULT '0.00' COMMENT '流水和',
5 years ago
`count_date` varchar(30) DEFAULT '' COMMENT '统计月份',
`create_time` int(11) DEFAULT NULL COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `promote_id` (`promote_id`) USING BTREE,
KEY `parent_id` (`parent_id`) USING BTREE,
KEY `count_date` (`count_date`) USING BTREE
5 years ago
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='流水角色聚合表';
CREATE TABLE `tab_spend_month_count` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`cash_count` decimal(10,2) DEFAULT '0.00' COMMENT '现金流水',
`balance_coin_count` decimal(10,2) DEFAULT '0.00' COMMENT '平台币流水',
`inside_cash_count` decimal(10,2) DEFAULT '0.00' COMMENT '内充流水',
`all_count` decimal(10,2) DEFAULT '0.00' COMMENT '流水和',
`count_date` varchar(30) DEFAULT '' COMMENT '统计月份',
`create_time` int(11) DEFAULT NULL COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `count_date` (`count_date`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='流水月份聚合表';
--------
ALTER TABLE `sys_file`
MODIFY COLUMN `name` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '原始文件名' AFTER `id`;
5 years ago
--downloadlog
DROP TABLE IF EXISTS `tab_downloadlog`;
CREATE TABLE IF NOT EXISTS `tab_downloadlog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`logid` varchar(254) NOT NULL DEFAULT '0' COMMENT '日志id',
`admin_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广者|管理员id',
`type` varchar(254) NOT NULL DEFAULT '0' COMMENT '下载控制器地址',
`dataname` varchar(254) NOT NULL DEFAULT '0' COMMENT '导出数据名称',
`status` int(11) NOT NULL DEFAULT '0' COMMENT '下载状态 0未下载 1已下载',
`addtime` int(11) NOT NULL DEFAULT '0' COMMENT '添加下载时间戳',
`begintime` int(11) NOT NULL DEFAULT '0' COMMENT '开始下载时间戳',
`content` mediumtext COMMENT '备注内容',
`conditions` varchar(1024) DEFAULT '[]' COMMENT '下载筛选条件',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=220 DEFAULT CHARSET=utf8 COMMENT='下载管理日志';
ALTER TABLE `tab_promote`
ADD COLUMN `ver_status` TINYINT(2) NULL DEFAULT NULL COMMENT '资质认证审核状态(1是审核成功2审核失败3未审核)' AFTER `child_game_permission`,
ADD COLUMN `idcarpic` CHAR(253) NULL DEFAULT NULL COMMENT '身份证证件照' AFTER `ver_status`,
ADD COLUMN `businesspic` CHAR(253) NULL DEFAULT NULL COMMENT '营业执照' AFTER `idcarpic`,
ADD COLUMN `agreementpic` CHAR(253) NULL DEFAULT NULL COMMENT '合同' AFTER `businesspic`,
ADD COLUMN `address` VARCHAR(520) NULL DEFAULT NULL COMMENT '住址' AFTER `agreementpic`,
ADD COLUMN `account_type` INT(11) NULL DEFAULT NULL COMMENT '(1为公司2为个人)' AFTER `address`;
5 years ago
5 years ago
-- 2019-11-06 chenzhi
5 years ago
DROP TABLE IF EXISTS `tab_spend_count`;
CREATE TABLE `tab_spend_count` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`promote_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广员id',
`promote_account` varchar(30) DEFAULT '' COMMENT '推广员账号',
`chain` varchar(255) NOT NULL DEFAULT '' COMMENT '推广员链路',
`level` tinyint(1) NOT NULL DEFAULT '0' COMMENT '推广员级别',
`game_id` int(11) NOT NULL DEFAULT '0' COMMENT '游戏id',
`game_name` varchar(30) DEFAULT '' COMMENT '游戏名称',
`partner_id` int(11) DEFAULT '0' COMMENT '合作方id',
`partner_name` varchar(50) DEFAULT NULL COMMENT '合作方名称',
`cash_count` decimal(10,2) DEFAULT '0.00' COMMENT '现金流水',
`balance_coin_count` decimal(10,2) DEFAULT '0.00' COMMENT '平台币流水',
`inside_cash_count` decimal(10,2) DEFAULT '0.00' COMMENT '内充流水/绑定币流水',
`count_date` varchar(30) DEFAULT '' COMMENT '统计月份',
`create_time` int(11) DEFAULT NULL COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `game_id` (`game_id`) USING BTREE,
KEY `promote_id` (`promote_id`) USING BTREE,
KEY `partner_id` (`partner_id`) USING BTREE,
KEY `chain` (`chain`) USING BTREE,
KEY `level` (`level`) USING BTREE,
KEY `count_date` (`count_date`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='游戏流水聚合表';
5 years ago
DROP TABLE IF EXISTS `tab_spend_month_count`;
CREATE TABLE `tab_spend_month_count` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`cash_count` decimal(10,2) DEFAULT '0.00' COMMENT '现金流水',
`balance_coin_count` decimal(10,2) DEFAULT '0.00' COMMENT '平台币游戏支付流水',
`balance_coin_deposit` decimal(10,2) DEFAULT '0.00' COMMENT '平台币充值流水',
`bind_coin_count` decimal(10,2) DEFAULT '0.00' COMMENT '绑币消耗',
`inside_cash_count` decimal(10,2) DEFAULT '0.00' COMMENT '内充流水',
`all_count` decimal(10,2) DEFAULT '0.00' COMMENT '流水和',
`count_date` varchar(30) DEFAULT '' COMMENT '统计月份',
`create_time` int(11) DEFAULT NULL COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `count_date` (`count_date`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='流水月份聚合表';
5 years ago
DROP TABLE IF EXISTS `tab_spend_user_count`;
CREATE TABLE `tab_spend_user_count` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`promote_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广员id',
`promote_account` varchar(30) DEFAULT '' COMMENT '推广员账号',
`chain` varchar(255) NOT NULL DEFAULT '' COMMENT '推广员链路',
`level` tinyint(1) NOT NULL DEFAULT '0' COMMENT '推广员级别',
`cash_count` decimal(10,2) DEFAULT '0.00' COMMENT '现金流水',
`balance_coin_count` decimal(10,2) DEFAULT '0.00' COMMENT '平台币流水',
5 years ago
`bind_coin_count` decimal(10,2) DEFAULT '0.00' COMMENT '绑定币消耗',
5 years ago
`inside_cash_count` decimal(10,2) DEFAULT '0.00' COMMENT '内充流水',
`all_count` decimal(10,2) DEFAULT '0.00' COMMENT '流水和',
`count_date` varchar(30) DEFAULT '' COMMENT '统计月份',
`create_time` int(11) DEFAULT NULL COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `promote_id` (`promote_id`) USING BTREE,
KEY `chain` (`chain`) USING BTREE,
KEY `level` (`level`) USING BTREE,
KEY `count_date` (`count_date`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='流水角色聚合表';
-- 2019-11-6 cxj
ALTER TABLE `tab_spend` ADD COLUMN `withdraw_id` int(11) NOT NULL DEFAULT 0 COMMENT '提现ID' AFTER `pay_url`;
ALTER TABLE `tab_withdraw` ADD COLUMN `settlement_end_time` int(10) NOT NULL DEFAULT 0 COMMENT '结算截止时间' AFTER `old_promote_account`;
5 years ago
-- 2019-11-07 chenzhi
INSERT INTO `sys_menu` (`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) VALUES ('补链详情', '192', '0', 'Mend/shiftInfo', '0', '', '推广补链', '0', '1');
ALTER TABLE `tab_spend_user_count`
5 years ago
ADD COLUMN `bind_coin_count` decimal(10,2) NULL DEFAULT 0.00 COMMENT '绑定币消耗' AFTER `balance_coin_count`;
5 years ago
-- 2019-11-6 ylw 设备禁用信息表
CREATE TABLE `tab_device_bans` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '风控表ID',
`tag` varchar(255) NOT NULL COMMENT '风控标识',
`type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '类型 0未知 1设备号 2IP',
`operator_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作者ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`)
5 years ago
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
5 years ago
-- 2019-11-07 elf 推广员三级变四级
ALTER TABLE `tab_promote` ADD COLUMN `level` tinyint(1) NOT NULL DEFAULT 0 COMMENT '推广员级别' after parent_name;
ALTER TABLE `tab_promote` ADD COLUMN `chain` varchar(30) NOT NULL DEFAULT '' COMMENT '推广员链路' after level;
5 years ago
-- 2019-11-07 elf 迁移任务
5 years ago
ALTER TABLE `sys_shift_task` ADD COLUMN `shift_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '迁移ID';
ALTER TABLE `sys_shift_task` ADD COLUMN `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注';
-- 2019-11-07 cxj
ALTER TABLE `tab_withdraw` ADD COLUMN `transfer_proof` int(11) NOT NULL DEFAULT 0 COMMENT '汇款证明' AFTER `settlement_end_time`;
-- 2019-11-08 cxj
ALTER TABLE `sys_document_download` MODIFY COLUMN `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '文档ID' FIRST;
ALTER TABLE `tab_promote`
5 years ago
CHANGE COLUMN `ver_status` `ver_status` TINYINT(2) NULL DEFAULT '3' COMMENT '资质认证审核状态(1是审核成功2审核失败3未审核)' AFTER `child_game_permission`;
-- 2019-11-11 elf
ALTER TABLE `tab_promote_coin_record` ADD COLUMN `promote_id` int(11) NOT NULL DEFAULT 0 COMMENT '推广员ID' AFTER `ref_id`;
ALTER TABLE `tab_promote_coin_record` ADD COLUMN `target_level` tinyint(1) NOT NULL DEFAULT 0 COMMENT '目标对象等级' AFTER `target_type`;
ALTER TABLE `tab_promote_coin_record` ADD COLUMN `game_id` int(11) NOT NULL DEFAULT 0 COMMENT '游戏ID' AFTER `target_level`;
CREATE TABLE `tab_promote_coin_transfer_log` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`sn` varchar(30) NOT NULL DEFAULT '' COMMENT '订单号',
`promote_id` int(11) NOT NULL COMMENT '推广员ID',
`target_id` int(11) NOT NULL COMMENT '目标对象ID',
`target_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '类型 1 推广员 2 玩家',
`target_level` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '目标对象等级',
`num` int(11) NOT NULL DEFAULT '0' COMMENT '转账数量',
`game_id` int(1) NOT NULL DEFAULT '0' COMMENT '游戏ID',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0 未处理 1 成功',
`remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
`description` varchar(255) NOT NULL DEFAULT '' COMMENT '描述说明',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `tab_downloadlog`
CHANGE COLUMN `conditions` `conditions` VARCHAR(20480) NULL DEFAULT '[]' COMMENT '下载筛选条件' AFTER `content`;
-- 2019-11-17 zhengyongxing
UPDATE `platform_new`.`tab_quick_menu` SET `url` = '/index.php?s=/Home/PromoteCoin/transferLogs.html' WHERE `id` = 15
UPDATE `platform_new`.`tab_quick_menu` SET `url` = 'index.php?s=/Home/Promote/children/promote_type/1.html' WHERE `id` = 2
UPDATE `platform_new`.`tab_quick_menu` SET `url` = '/index.php?s=/Home/Promote/children/promote_type/2.html' WHERE `id` = 3
-- 增加tab_spend extend 字段长度到255
ALTER TABLE `tab_spend`
MODIFY COLUMN `extend` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '通知游戏方扩展(一般是游戏方透传)' AFTER `pay_game_status`;
ALTER TABLE `tab_spend`
ADD COLUMN `exists` int(11) NOT NULL DEFAULT 0 COMMENT '0 不存在 1存在' AFTER `withdraw_id`,
ADD COLUMN `pay_url` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER `exists`;
ALTER TABLE `tab_deposit`
ADD COLUMN `pay_url` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '支付信息' AFTER `check_sign`;
--
CREATE TABLE `tab_notice_read` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`notice_id` int(11) NOT NULL COMMENT '广告id',
`game_id` int(11) DEFAULT NULL,
`user_id` int(11) NOT NULL COMMENT '用户id',
`is_read` tinyint(2) DEFAULT '0' COMMENT '0未读1已读',
`create_time` int(11) DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
5 years ago
-- 2019-11-19 cxj
-- 添加索引
ALTER TABLE `tab_user_play_info` ADD INDEX `search`(`promote_id`, `game_id`, `server_id`, `create_time`);
ALTER TABLE `tab_user_login_record` ADD INDEX `search`(`promote_id`, `game_id`, `server_id`, `login_time`);
5 years ago
ALTER TABLE `tab_spend` ADD INDEX `search`(`promote_id`, `game_id`, `server_id`, `pay_way`, `pay_status`, `pay_time`);
5 years ago
5 years ago
-- 添加登录日统计表
CREATE TABLE `tab_login_daily_record` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`game_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`promote_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推广员id',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `search` (`promote_id`,`game_id`,`create_time`) USING BTREE,
KEY `user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=284597 DEFAULT CHARSET=utf8;
5 years ago
--sdk
ALTER TABLE `tab_pay_info`
MODIFY COLUMN `order_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '平台订单ID' AFTER `game_id`,
ADD COLUMN `extend` varchar(255) NOT NULL DEFAULT '' COMMENT 'cp订单ID' AFTER `game_id`;
--广
ALTER TABLE `tab_promote`
CHANGE COLUMN `ver_status` `ver_status` INT(11) NULL DEFAULT '0' COMMENT '资质认证审核状态(1是审核成功2审核失败3未审核,4修改认证)' AFTER `child_game_permission`,
5 years ago
ADD COLUMN `anothpic` CHAR(254) NULL DEFAULT NULL AFTER `account_type`;
--2019-11-19 chenzhi
CREATE TABLE `tab_index_chart` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
`date` int(11) NOT NULL DEFAULT '0' COMMENT '日期时间戳',
`new_user_hours` varchar(500) NOT NULL DEFAULT '' COMMENT '新增用户聚合',
`new_user_count` int(11) NOT NULL DEFAULT '0' COMMENT '单日新增总计',
`active_user_hours` varchar(500) NOT NULL DEFAULT '' COMMENT '活跃用户聚合',
`active_user_count` int(11) NOT NULL DEFAULT '0' COMMENT '单日活跃总计',
5 years ago
`active_user_list` longtext COMMENT '单日活跃用户的id序列',
`pay_user_hours` varchar(500) NOT NULL DEFAULT '' COMMENT '付费用户聚合',
`pay_user_count` int(11) NOT NULL DEFAULT '0' COMMENT '单日付费用户总计',
5 years ago
`pay_user_list` longtext COMMENT '单日付费用户的id序列',
`pay_money_hours` varchar(500) NOT NULL DEFAULT '' COMMENT '付费金额聚合',
`pay_money_count` decimal(10,2) DEFAULT '0.00' COMMENT '单日付费金额总计',
`promote_new_hours` varchar(500) NOT NULL DEFAULT '' COMMENT '小时新增渠道',
`promote_new_count` int(11) NOT NULL DEFAULT '0' COMMENT '新增合作渠道总计',
`all_count` varchar(500) NOT NULL DEFAULT '' COMMENT '累计的统计数据',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '统计日期',
PRIMARY KEY (`id`),
KEY `date` (`date`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='首页折线图静态数据';
5 years ago
-- 2019-11-20 zyx
DROP TABLE IF EXISTS `tab_device_statistics`;
CREATE TABLE `tab_device_statistics` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`time` int(11) NOT NULL DEFAULT 0 COMMENT '日期时间戳',
`new_device` int(11) NOT NULL DEFAULT 0 COMMENT '当日新增设备',
`active_device` int(11) NOT NULL DEFAULT 0 COMMENT '当日活跃设备',
`today_new_device` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '当日新增设备按小时划分的json字符串',
`today_active_device` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '当日活跃设备按小时划分的json字符串',
`today_model_device` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '当日启动机型(机型,系统,数量)',
`model` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '当日启动设备',
`version` int(11) NOT NULL DEFAULT 1 COMMENT '机型',
`duration7` int(255) NOT NULL DEFAULT 0 COMMENT '七天的平均使用时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `time`(`time`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 163 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
5 years ago
5 years ago
ALTER TABLE `platform`.`tab_device_record`
ADD INDEX `create_time`(`create_time`) USING BTREE,
ADD INDEX `unique_code`(`unique_code`) USING BTREE,
ADD INDEX `idx_unique_version`(`version`, `unique_code`) USING BTREE,
ADD INDEX `version`(`version`) USING BTREE;
UPDATE `platform_new`.`tab_quick_menu` SET `url` = '/index.php?s=/Home/TestResource/index.html' WHERE `id` = 11
UPDATE `platform_new`.`tab_quick_menu` SET `url` = '/index.php?s=/Home/TestResource/lists.html' WHERE `id` = 12
--
ALTER TABLE `tab_withdraw`
ADD INDEX `widthdraw_number`(`widthdraw_number`);
--
CREATE TABLE `tab_user_play_data_count` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL DEFAULT 0 COMMENT '玩家ID',
`promote_id` int(11) NOT NULL DEFAULT 0 COMMENT '推广员ID',
`game_id` int(11) NOT NULL DEFAULT 0 COMMENT '游戏id',
`server_id` varchar(255) NOT NULL COMMENT '区服id',
`role_id` varchar(255) NOT NULL COMMENT '角色id',
`recharge_cost` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '充值总额',
`recharge_count` int(10) NOT NULL DEFAULT 0 COMMENT '充值次数',
`create_time` int(10) NOT NULL DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `recharge_cost` (`recharge_cost`) USING BTREE,
KEY `recharge_count` (`recharge_count`) USING BTREE,
KEY `create_time` (`create_time`) USING BTREE,
KEY `search` (`user_id`,`promote_id`,`game_id`,`server_id`,`role_id`,`create_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
5 years ago
-- 身份证认证信息
CREATE TABLE `tab_idcard_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(80) NOT NULL COMMENT '姓名',
`id_card` varchar(20) NOT NULL COMMENT '身份证号码',
`user_id` int(11) NOT NULL COMMENT '用户id',
`ip` varchar(40) DEFAULT '0' COMMENT 'ip地址',
`num` int(11) DEFAULT '1' COMMENT '认证次数',
`status` tinyint(2) DEFAULT '0' COMMENT '0 认证失败 1 认证成功',
`create_time` int(11) DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='身份证认证信息';
5 years ago
-- 公告已读表
CREATE TABLE `tab_notice_read` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`notice_id` int(11) NOT NULL COMMENT '广告id',
`game_id` int(11) DEFAULT NULL,
`user_id` int(11) NOT NULL COMMENT '用户id',
`is_read` tinyint(2) DEFAULT '0' COMMENT '0未读1已读',
`create_time` int(11) DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
-- 短信日志
CREATE TABLE `tab_sms_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` int(11) DEFAULT NULL COMMENT '验证码',
`phone` varchar(20) NOT NULL COMMENT '手机号',
`content` text NOT NULL COMMENT '发送内容',
`status` tinyint(2) NOT NULL COMMENT '发送状态',
`msg` varchar(80) DEFAULT NULL COMMENT '发送返回的信息',
`ip` varchar(20) DEFAULT NULL COMMENT 'ip地址',
`create_time` int(11) DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='短信日志';
--
ALTER TABLE `tab_withdraw`
ADD COLUMN `last_up_update_time` int(10) NOT NULL DEFAULT 0 COMMENT '最后更新时间',
ADD COLUMN `spend_ids` longtext NOT NULL COMMENT '充值订单id';
5 years ago
-- 推广员添加oa关联
ALTER TABLE `tab_promote`
ADD COLUMN`oa_associated` tinyint(1) DEFAULT '0' COMMENT 'oa是否关联',
----
ALTER TABLE `tab_user_play_info`
ADD INDEX `game_id`(`game_id`, `server_id`, `role_id`);
-- SDK菜单配置
INSERT INTO `tab_tool` (`name`, `title`, `config`, `template`, `type`, `status`, `create_time` )
VALUES
('personal_menu', '个人中心列表', '[{\"name\":\"gift\",\"title\":\"\\u793c\\u5305\",\"menu_version\":\"0\",\"url\":\"\\/sdk.php\\/GameGiftPage\\/gift_list\",\"type\":\"0\",\"act\":\"gift\",\"ios_url\":\"?action=gift\",\"sort\":\"1\",\"id\":1,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd526395e339.png\",\"cover\":\"1986\"},{\"name\":\"balance\",\"title\":\"\\u4f59\\u989d\",\"menu_version\":\"0\",\"url\":\"\\/sdk.php\\/UserH\\/get_user_money\",\"type\":\"0\",\"act\":\"\\/sdk.php\\/UserH\\/get_user_money\",\"ios_url\":\"\\/sdk.php\\/UserH\\/get_user_money\",\"sort\":\"2\",\"id\":\"2\",\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd5264d1e202.png\",\"cover\":\"1987\"},{\"name\":\"message\",\"title\":\"\\u6d88\\u606f\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"msg\",\"ios_url\":\"\",\"sort\":\"3\",\"id\":3,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd5265fb396d.png\",\"cover\":\"1988\"},{\"name\":\"support\",\"title\":\"\\u5ba2\\u670d\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"support\",\"ios_url\":\"\",\"sort\":\"4\",\"id\":4,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd52674492b7.png\",\"cover\":\"1989\"}]', '', 5, 1, 1571723212 );
INSERT INTO `tab_tool` (`name`, `title`, `config`, `template`, `type`, `status`, `create_time` )
VALUES
('contact_cs', '联系客服', '[{\"name\":\"support\",\"title\":\"\\u8054\\u7cfb\\u5ba2\\u670d\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"2\",\"act\":\"3007567814\",\"ios_url\":\"3007567814\",\"sort\":\"1\",\"id\":1,\"icon\":\"\",\"cover\":\"\"}]', '', 5, 1, 1571723212 );
INSERT INTO `tab_tool` (`name`, `title`, `config`, `template`, `type`, `status`, `create_time` )
VALUES
5 years ago
('sdk_menu', 'SDK用户菜单', '[{\"name\":\"mine\",\"title\":\"\\u6211\\u7684\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"my\",\"ios_url\":\"\",\"sort\":\"1\",\"id\":\"1\",\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd524dfd76fa.png\",\"cover\":\"1980\"},{\"name\":\"gift\",\"title\":\"\\u793c\\u5305\",\"menu_version\":\"0\",\"url\":\"\\/sdk.php\\/GameGiftPage\\/gift_list\",\"type\":\"0\",\"act\":\"gift\",\"ios_url\":\"?action=gift\",\"sort\":\"2\",\"id\":2,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd52509f3767.png\",\"cover\":\"1981\"},{\"name\":\"support\",\"title\":\"\\u5ba2\\u670d\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"support\",\"ios_url\":\"\",\"sort\":\"3\",\"id\":3,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd5251e0aee3.png\",\"cover\":\"1982\"},{\"name\":\"message\",\"title\":\"\\u6d88\\u606f\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"msg\",\"ios_url\":\"\",\"sort\":\"4\",\"id\":4,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525606ff53.png\",\"cover\":\"1983\"},{\"name\":\"logout\",\"title\":\"\\u9000\\u51fa\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"logout\",\"ios_url\":\"\",\"sort\":\"5\",\"id\":5,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525d99ed99.png\",\"cover\":\"1984\"},{\"name\":\"suppersign\",\"title\":\"\\u8d85\\u7ea7\\u7b7e\",\"menu_version\":\"2\",\"url\":\"\\/mobile.php\\/ssg\\/home\",\"type\":\"2\",\"act\":\"suppersign\",\"ios_url\":\"http:\\/\\/m.wmtxkj.cn\\/mobile.php\\/ssg\\/home\",\"sort\":\"6\",\"id\":6,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525f388843.png\",\"cover\":\"1985\"}]', '', 5, 1, 1571723212 );
-- 修改迁移
5 years ago
ALTER TABLE `tab_mend`
ADD COLUMN `order_time` int(11) NOT NULL DEFAULT 0 COMMENT '订单时间' AFTER `remark`;
5 years ago
ALTER TABLE `sys_shift_task`
CHANGE COLUMN `create_promote_id` `creator_id` int(11) NOT NULL DEFAULT 0 COMMENT '创建渠道ID' AFTER `status`;
ALTER TABLE `sys_shift_task`
ADD COLUMN `creator_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '创建者类型 0 后台管理员 1 推广员' AFTER `creator_id`;
5 years ago
ALTER TABLE `tab_mend`
ADD COLUMN `op_type` tinyint(0) NOT NULL DEFAULT 0 COMMENT '0 管理员 1 推广员' AFTER `op_account`;
-- chenzhi
UPDATE `sys_model` SET `list_grid` = 'id:编号
user_account:
user_nickname:
promote_id:广
promote_account:广
promote_id_to:
promote_account_to:
remark:
create_time:
op_account:
order_time:' WHERE `id` = 29;
--
ALTER TABLE `tab_device_bans`
MODIFY COLUMN `type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '类型 0未知 1设备号 2IP 3落地页链接 4下载链接' AFTER `tag`;
-- user表注册类型添加7虚拟
ALTER TABLE `tab_user` MODIFY COLUMN `register_type` tinyint(2) DEFAULT '1' COMMENT '注册方式 0游客1账号 2 手机 3微信 4QQ 5百度 6微博 7虚拟';
5 years ago
--1 2019-12-03 ---
ALTER TABLE tab_game MODIFY COLUMN `game_score` double(3,1) DEFAULT '0' COMMENT '游戏评分';
-- chenzhi 2019-12-04
CREATE TABLE `tab_server_notice` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
`game_id` int(11) NOT NULL COMMENT '游戏id',
`game_name` varchar(30) NOT NULL COMMENT '游戏名称',
`server_name` varchar(30) NOT NULL COMMENT '区服名称',
`server_num` int(11) DEFAULT NULL COMMENT '对接区服id',
`recommend_status` tinyint(2) DEFAULT '1' COMMENT '推荐状态(0:否,1:是)',
`show_status` tinyint(2) DEFAULT '1' COMMENT '显示状态(0:否,1:是)',
`stop_status` tinyint(2) DEFAULT '0' COMMENT '是否停服(0:否,1:是)',
`server_status` tinyint(2) DEFAULT '0' COMMENT '区服状态(0:正常,1拥挤,2爆满)',
`icon` int(11) DEFAULT NULL COMMENT '区服图标',
`start_time` int(11) DEFAULT NULL COMMENT '开始时间',
`desride` varchar(300) DEFAULT NULL COMMENT '描述',
`prompt` varchar(300) DEFAULT NULL COMMENT '停服提示',
`parent_id` int(11) DEFAULT NULL COMMENT '父类id',
`create_time` int(11) DEFAULT NULL COMMENT '创建时间',
`server_version` tinyint(2) DEFAULT NULL COMMENT '运营平台 1and 2ios 0双平台',
`developers` int(11) DEFAULT '0' COMMENT '开发商',
`server_id` varchar(50) NOT NULL DEFAULT '' COMMENT '对接区服id',
PRIMARY KEY (`id`),
KEY `game_id` (`game_id`),
KEY `show_status` (`show_status`),
KEY `start_time` (`start_time`),
KEY `create_time` (`create_time`)
5 years ago
) ENGINE=InnoDB AUTO_INCREMENT=488 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='游戏区服预告表';
INSERT INTO `sys_model` ( `name`, `title`, `extend`, `relation`, `need_pk`, `field_sort`, `field_group`, `attribute_list`, `attribute_alias`, `template_list`, `template_add`, `template_edit`, `list_grid`, `list_row`, `search_key`, `search_list`, `create_time`, `update_time`, `status`, `engine_type`)
VALUES ('ServerNotice', '游戏区服预告', '0', '', '1', '{\"1\":[\"289\",\"288\",\"290\",\"291\",\"293\",\"292\",\"287\",\"286\",\"282\",\"281\",\"283\",\"284\",\"285\",\"280\"]}', '1:基础', '', '', '', '', '', 'id:编号\r\ngame_name:游戏名称\r\nserver_name:区服名称\r\nshow_status|get_info_status:区服状态\r\nstart_time|set_show_time:开服时间\r\nserver_version:运营平台\r\ndevelopers:开发商\r\nid:操作:[EDIT]&id=[id]|编辑,ServerNotice/del?ids=[id]|删除', '10', '', '', '1480318911', '1493879217', '1', 'MyISAM');
5 years ago
--- liuweiwen 2019-12-09
ALTER TABLE tab_game ADD `flooring_page_video` varchar(150) NOT NULL DEFAULT '' COMMENT '落地页视频';
ALTER TABLE tab_game ADD `supersign_status` tinyint(1) DEFAULT '1' COMMENT '超级签开关1-开启0-关闭';
ALTER TABLE tab_game ADD `ios_video_top` tinyint(1) DEFAULT '1' COMMENT 'ios落地页视频是否置顶1-置顶0-不置顶';
5 years ago
5 years ago
-- 新旧IOS打包标识
ALTER TABLE `tab_game_source` add COLUMN `is_new_sdk` tinyint(2) DEFAULT '0' COMMENT '是否新SDK(IOS)';
ALTER TABLE `tab_mend` ADD COLUMN `pay_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '换绑时归属前推广员的充值金额' AFTER `promote_account_to`;
-- 合服游戏区服表 tping
CREATE TABLE `tab_server_union` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
`game_id` int(11) NOT NULL COMMENT '游戏id',
`game_name` varchar(30) NOT NULL COMMENT '游戏名称',
`server_name` varchar(30) NOT NULL COMMENT '区服名称',
`server_num` int(11) DEFAULT NULL COMMENT '对接区服id',
`recommend_status` tinyint(2) DEFAULT '1' COMMENT '推荐状态(0:否,1:是)',
`show_status` tinyint(2) DEFAULT '1' COMMENT '显示状态(0:否,1:是)',
`stop_status` tinyint(2) DEFAULT '0' COMMENT '是否停服(0:否,1:是)',
`server_status` tinyint(2) DEFAULT '0' COMMENT '区服状态(0:正常,1拥挤,2爆满)',
`icon` int(11) DEFAULT NULL COMMENT '区服图标',
`start_time` int(11) DEFAULT NULL COMMENT '开始时间',
`desride` varchar(300) DEFAULT NULL COMMENT '描述',
`prompt` varchar(300) DEFAULT NULL COMMENT '停服提示',
`parent_id` int(11) DEFAULT NULL COMMENT '父类id',
`create_time` int(11) DEFAULT NULL COMMENT '创建时间',
`server_version` tinyint(2) DEFAULT NULL COMMENT '运营平台 1and 2ios 0双平台',
`developers` int(11) DEFAULT '0' COMMENT '开发商',
`server_id` varchar(50) NOT NULL DEFAULT '' COMMENT '对接区服id',
PRIMARY KEY (`id`),
KEY `game_id` (`game_id`),
KEY `show_status` (`show_status`),
KEY `start_time` (`start_time`),
KEY `create_time` (`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='合服游戏区服表';
5 years ago
-- 用户行为 tping
ALTER TABLE `tab_pay_info` ADD COLUMN `user_account` varchar(30) DEFAULT NULL COMMENT '用户账号';
ALTER TABLE `tab_pay_info` ADD COLUMN `game_player_name` varchar(30) DEFAULT '' COMMENT '游戏玩家昵称';
ALTER TABLE `tab_pay_info` ADD COLUMN `game_name` varchar(30) DEFAULT '' COMMENT '游戏名称';
ALTER TABLE `tab_pay_info` ADD COLUMN `server_id` int(11) DEFAULT '0' COMMENT '区服id';
ALTER TABLE `tab_pay_info` ADD COLUMN `server_name` varchar(30) DEFAULT '' COMMENT '区服名称';
ALTER TABLE `tab_pay_info` ADD COLUMN `promote_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广员id';
ALTER TABLE `tab_pay_info` ADD COLUMN `game_player_id` varchar(30) DEFAULT '0' COMMENT '玩家游戏内id';
ALTER TABLE `tab_pay_info` ADD COLUMN `sdk_version` tinyint(2) DEFAULT '1' COMMENT '区别sdk版本1安卓 2苹果 ';
5 years ago
ALTER TABLE `tab_pay_info` ADD COLUMN `promote_account` varchar(30) DEFAULT '' COMMENT '推广员账号';
5 years ago
ALTER TABLE `tab_pay_info`
MODIFY COLUMN `game_player_id` varchar(255) NULL DEFAULT '0' COMMENT '玩家游戏内id' AFTER `promote_id`;
ALTER TABLE `tab_pay_info`
ADD COLUMN `ip` varchar(255) NOT NULL DEFAULT '0' AFTER `promote_account`,
ADD COLUMN `pay_way` int NOT NULL DEFAULT 0 AFTER `ip`;
5 years ago
-- 默认值处理 tping
ALTER TABLE `tab_pay_info`
MODIFY COLUMN `user_account` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户账号' AFTER `txn_time`,
MODIFY COLUMN `game_player_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '游戏玩家昵称' AFTER `user_account`,
MODIFY COLUMN `game_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '游戏名称' AFTER `game_player_name`,
MODIFY COLUMN `server_id` int(11) NOT NULL DEFAULT 0 COMMENT '区服id' AFTER `game_name`,
MODIFY COLUMN `server_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '区服名称' AFTER `server_id`,
MODIFY COLUMN `game_player_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '玩家游戏内id' AFTER `promote_id`,
MODIFY COLUMN `sdk_version` tinyint(2) NOT NULL DEFAULT 1 COMMENT '区别sdk版本1安卓 2苹果 ' AFTER `game_player_id`,
MODIFY COLUMN `promote_account` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '推广员账号' AFTER `sdk_version`;
5 years ago
5 years ago
-- 苹果内购 tping
ALTER TABLE `tab_spend_distinction`
MODIFY COLUMN `extend` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '通知游戏方扩展(一般是游戏方透传)' AFTER `game_name`;
-- 菜单(游戏充值预下单)
INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) VALUES ('游戏充值预下单', 16, 0, 'BehaviorLog/game', 0, '', '行为日志', 0, 1);
--model zyx 2019-12-11
UPDATE `sys_model` SET `list_grid` = 'id:编号\r\npay_order_number:订单号\r\nuser_account:用户账号\r\npromote_account:所属推广员\r\npay_amount:支付金额\r\npay_way:充值方式\r\ncreate_time|set_show_time:支付时间\r\npay_status|get_info_status*12:支付状态\r\npay_ip:支付IP\r\nsdk_status:游戏SDK状态\r\n' WHERE `id` = 9
CREATE TABLE `tab_test_white_list` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT '用户id',
`account` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '白名单账号',
`show_status` tinyint(2) NULL DEFAULT 1 COMMENT '显示状态',
`add_user` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '后台添加账号',
`create_ime` int(11) NULL DEFAULT NULL COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
--2019-12-13
--
ALTER TABLE `tab_game`
ADD COLUMN `flooring_page_video_cover` int(11) NOT NULL DEFAULT 0 COMMENT '落地页视频封面';
5 years ago
--2019-12-11 chenzhi
5 years ago
ALTER TABLE `tab_game_supersign` ADD COLUMN `pay_way` tinyint(2) DEFAULT '0' COMMENT '充值方式(0:未知,1:支付宝,2:微信)' AFTER `pay_time`;
-- 2019-12-16 chenzhi
CREATE TABLE `tab_game_count` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
`date` int(11) NOT NULL DEFAULT '0' COMMENT '日期时间戳',
`game_id` int(11) NOT NULL DEFAULT '0' COMMENT '游戏id',
`game_name` varchar(50) NOT NULL DEFAULT '' COMMENT '游戏名称',
`new_user_count` int(11) NOT NULL DEFAULT '0' COMMENT '新增总计',
`active_user_count` int(11) NOT NULL DEFAULT '0' COMMENT '活跃总计',
`active_user_list` longtext COMMENT '活跃用户的id序列',
`pay_money_count` decimal(10,2) DEFAULT '0.00' COMMENT '付费金额总计',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '统计日期',
PRIMARY KEY (`id`),
KEY `date` (`date`) USING BTREE,
KEY `new_user_count` (`new_user_count`) USING BTREE,
KEY `active_user_count` (`active_user_count`) USING BTREE,
KEY `pay_money_count` (`pay_money_count`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='总览游戏统计聚合';
CREATE TABLE `tab_promote_count` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
`date` int(11) NOT NULL DEFAULT '0' COMMENT '日期时间戳',
`promote_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广账号',
`promote_account` varchar(30) NOT NULL DEFAULT '' COMMENT '账号',
`new_user_count` int(11) NOT NULL DEFAULT '0' COMMENT '新增总计',
`active_user_count` int(11) NOT NULL DEFAULT '0' COMMENT '活跃总计',
`active_user_list` longtext COMMENT '活跃用户的id序列',
`pay_money_count` decimal(10,2) DEFAULT '0.00' COMMENT '付费金额总计',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '统计日期',
PRIMARY KEY (`id`),
KEY `date` (`date`) USING BTREE,
KEY `new_user_count` (`new_user_count`) USING BTREE,
KEY `active_user_count` (`active_user_count`) USING BTREE,
KEY `pay_money_count` (`pay_money_count`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='总览推广员统计聚合';
--2019-12-16
--
CREATE TABLE `tab_promote_game_ratio` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`promote_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广员id',
`game_id` int(11) NOT NULL DEFAULT '0' COMMENT '游戏id',
`ratio` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '分成比例',
`last_ratio` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '上次的分成比例',
`last_ratio_status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '上次的分成比例状态0-未设置 1-已设置',
`begin_time` int(10) NOT NULL DEFAULT '0' COMMENT '开始时间',
`end_time` int(10) NOT NULL DEFAULT '0' COMMENT '过期时间',
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '备注',
`status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '审核状态:-1-未通过 0-待审核 1-通过',
`review_time` int(10) NOT NULL DEFAULT '0' COMMENT '审核时间',
`applicant_id` int(11) NOT NULL DEFAULT '0' COMMENT '申请人',
`reviewer_id` int(11) NOT NULL DEFAULT '0' COMMENT '审核人',
`create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `promote_id` (`promote_id`,`game_id`,`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
5 years ago
-- 超级签统计菜单
5 years ago
INSERT INTO `sys_menu`( `title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) VALUES ('游戏统计', 137, 0, 'SuperStatistical/index', 0, '', '财务管理', 0, 1);
-- pay_info 增加索引 tping
ALTER TABLE `tab_pay_info`
ADD INDEX `idx_game_id_server_id` (`game_id`, `server_id`) ,
ADD INDEX `idx_user_account` (`user_account`) ,
ADD INDEX `idx_promote_id` (`promote_id`) ,
ADD INDEX `idx_game_player_id` (`game_player_id`) ,
ADD INDEX `idx_game_player_name` (`game_player_name`) ,
ADD INDEX `idx_extend` (`extend`) ;
-- 2019-12-19 zyx
ALTER TABLE `sys_auth_group`
ADD COLUMN `data_empower_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '数据权限 1 全部 2 部分数据 3 自己底下的会长' AFTER `rules`;
ALTER TABLE `platform`.`sys_auth_group`
5 years ago
ADD COLUMN `data_president` longtext NULL COMMENT '会长数据' AFTER `data_empower_type`;
-- user_play 增加create_time
ALTER TABLE `platform_pre1218`.`tab_user_play`
5 years ago
ADD COLUMN `create_time` int(11) NOT NULL COMMENT '创建时间' AFTER `check_money`;
5 years ago
-- 推广员表加入推广公司字段 liuweiwen 20191216
ALTER TABLE tab_promote ADD `company_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广公司ID';
-- 新增推广公司表 liuweiwen 20191216
CREATE TABLE `tab_promote_company` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`company_name` varchar(60) NOT NULL COMMENT '推广公司名称',
`uid` int(11) NOT NULL DEFAULT '0' COMMENT '添加人ID',
`status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态 0-禁用 1-启用',
`create_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间',
`last_up_time` int(10) NOT NULL DEFAULT '0' COMMENT '最后更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='推广公司';
5 years ago
-- 推广员表新增推广公司id liuweiwen 2019-12-23
ALTER TABLE tab_promote ADD `company_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广公司ID';
-- 新增推广公司表 liuweiwen 2019-12-23
CREATE TABLE `tab_promote_company` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`company_name` varchar(60) NOT NULL COMMENT '推广公司名称',
`uid` int(11) NOT NULL DEFAULT '0' COMMENT '添加人ID',
`status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态 0-禁用 1-启用',
`create_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间',
`last_up_time` int(10) NOT NULL DEFAULT '0' COMMENT '最后更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='推广公司';
5 years ago
-- 菜单(推广公司录入)有个变量,所以后面几句要一起执行 liuweiwen
INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`)
VALUES ('推广公司录入', 185, 56, 'PromoteCompany/lists', 0, '该功能用于录入工会所属的推广公司名称', '推广员管理', 0, 1);
set @company_id = (SELECT id FROM sys_menu WHERE title = '推广公司录入');
INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`)
VALUES ('新增', @company_id, 0, 'PromoteCompany/add', 0, '', '推广员管理', 0, 1);
INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`)
VALUES ('编辑', @company_id, 0, 'PromoteCompany/edit', 0, '', '推广员管理', 0, 1);
INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`)
VALUES ('删除', @company_id, 0, 'PromoteCompany/del', 0, '', '推广员管理', 0, 1);
-- 增加修改b_spend表索引 liuweiwen 2019-12-23
DROP INDEX o ON tab_spend;
ALTER TABLE tab_spend ADD INDEX o(pay_status, is_check, settle_check, promote_id);
ALTER TABLE tab_user_login_record ADD INDEX user_id_promote_idx(user_id, promote_id);
5 years ago
CREATE TABLE `tab_player_retention` (
5 years ago
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) not null COMMENT '用户ID',
`game_id` int(11) NOT NULL COMMENT '游戏ID',
5 years ago
`player_id` int(11) NOT NULL COMMENT '玩家ID',
5 years ago
`day1` tinyint(1) NOT NULL default 0 COMMENT '是否1日留存',
`day2` tinyint(1) NOT NULL default 0 COMMENT '是否2日留存',
`day3` tinyint(1) NOT NULL default 0 COMMENT '是否3日留存',
`day4` tinyint(1) NOT NULL default 0 COMMENT '是否4日留存',
`day5` tinyint(1) NOT NULL default 0 COMMENT '是否5日留存',
`day6` tinyint(1) NOT NULL default 0 COMMENT '是否6日留存',
`day7` tinyint(1) NOT NULL default 0 COMMENT '是否7日留存',
`day15` tinyint(1) NOT NULL default 0 COMMENT '是否15日留存',
`day30` tinyint(1) NOT NULL default 0 COMMENT '是否30日留存',
PRIMARY KEY (`id`),
5 years ago
KEY `index_game_id` (`game_id`),
KEY `index_user_id` (`user_id`),
KEY `index_player_id` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户留存率';
-- 玩家注册时间
ALTER TABLE `tab_user_play`
ADD COLUMN `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '玩家注册时间';
5 years ago
update tab_user_play a left join tab_user b on a.user_id= b.id set a.create_time = b.register_time where a.user_id=b.id;
ALTER TABLE `tab_spend`
5 years ago
ADD COLUMN `event_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '事件是否通知';
5 years ago
-- 菜单添加补单记录
INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) VALUES ('补单记录管理', 137, 0, 'BehaviorLog/singleSupplement', 0, '', '游戏订单', 0, 1);
5 years ago
-- 增加通知到账 tping
CREATE TABLE `tab_repair_pay` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`admin_id` int(11) NOT NULL DEFAULT '0',
`admin_name` varchar(255) NOT NULL DEFAULT '',
`pay_order_number` varchar(255) NOT NULL DEFAULT '',
`ip` varchar(255) NOT NULL DEFAULT '',
`tab` varchar(255) NOT NULL DEFAULT '' COMMENT '订单表spend,deposit',
`create_time` int(11) NOT NULL DEFAULT '0',
`type` int(11) DEFAULT '0' COMMENT '0通知到账 1补单记录',
PRIMARY KEY (`id`)
5 years ago
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='通知到账补单';
ALTER TABLE `tab_game`
5 years ago
ADD COLUMN `beta_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Beta版状态';
5 years ago
ALTER TABLE `tab_game`
ADD COLUMN `beta_url` varchar(150) NOT NULL DEFAULT '' COMMENT 'Beta链接';
-- 游戏支付方式渠道配置
ALTER TABLE `tab_game`
ADD COLUMN `pay_config` varchar(255) NOT NULL COMMENT '支付渠道 wx 微信 zfb 支付宝 quick 快捷 (gf 官方 sq 双乾';
ALTER TABLE tab_promote add `company_belong` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会归属0-内团1-外团';
5 years ago
ALTER TABLE tab_promote add `company_relation` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会关系0-自主开发及维护1-只维护';
5 years ago
-- 游戏的合作方新增联系人,联系电话,邮寄地址,公司税号,收款方名称,银行账号,开户行 liuweiwen 2020-01-03
ALTER TABLE tab_partner ADD `link_man` varchar(64) DEFAULT '' COMMENT '联系人' AFTER `status`;
ALTER TABLE tab_partner ADD `link_phone` varchar(24) DEFAULT NULL COMMENT '联系电话' AFTER `link_man`;
ALTER TABLE tab_partner ADD `address` varchar(255) DEFAULT NULL COMMENT '邮寄地址' AFTER `link_phone`;
ALTER TABLE tab_partner ADD `company_tax_no` varchar(64) DEFAULT NULL COMMENT '公司税号' AFTER `address`;
ALTER TABLE tab_partner ADD `payee_name` varchar(24) DEFAULT NULL COMMENT '收款方名称' AFTER `company_tax_no`;
ALTER TABLE tab_partner ADD `bank_account` varchar(32) DEFAULT NULL COMMENT '银行账号' AFTER `payee_name`;
ALTER TABLE tab_partner ADD `opening_bank` varchar(128) DEFAULT NULL COMMENT '开户行' AFTER `bank_account`;
5 years ago
5 years ago
-- 推广公会归属管理 2020-1-1 刘伟文
CREATE TABLE `tab_promote_belong` (
5 years ago
`id` int(11) NOT NULL AUTO_INCREMENT,
5 years ago
`promote_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广员id',
`verify_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '审核状态:0-待审核1-审核通过2-审核拒绝',
`company_belong` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会归属0-内团1-外团',
`company_relation` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会关系0-自主开发及维护1-只维护',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`applicant_id` int(11) NOT NULL DEFAULT '0' COMMENT '申请人(后台管理员)id',
`applicant_name` varchar(32) DEFAULT NULL,
5 years ago
`approver_id` int(11) NOT NULL DEFAULT '0' COMMENT '确认人(后台管理员)id',
`approver_name` varchar(30) DEFAULT NULL,
5 years ago
`applicant_time` int(11) DEFAULT '0' COMMENT '申请时间',
`update_time` int(11) DEFAULT '0' COMMENT '修改时间',
5 years ago
`verify_time` int(11) DEFAULT '0' COMMENT '审批时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='推广公会归属管理';
-- 公司信息 2020-1-8 刘伟文
INSERT INTO `tab_tool` (`name`, `title`, `config`, `template`, `type`, `status`, `create_time`) VALUES ('company_info', '公司信息', NULL, NULL, '1', '1', NULL);
-- cp/公会对账单 2020-1-7 陈志
CREATE TABLE `tab_statement` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`statement_type` tinyint(2) DEFAULT '0' COMMENT '对账类型(0-上游对账单;1-下游对账单)',
`company_id` int(11) DEFAULT '0' COMMENT '对账公司id',
`company_name` varchar(60) NOT NULL COMMENT '对账公司名称',
`link_phone` varchar(24) DEFAULT NULL COMMENT '对账公司联系人电话',
`statement_begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账开始时间',
`statement_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建对账单时间',
`statement_money` decimal(10,2) DEFAULT '0.00' COMMENT '对账金额',
`pay_amount` decimal(10,2) DEFAULT '0.00' COMMENT '平台金额合计(已减罚款)',
`is_confirm` tinyint(2) DEFAULT '0' COMMENT '是否确认(0-未确认;1-确认)',
`pay_type` tinyint(2) DEFAULT '0' COMMENT '收款方(0-甲方付给乙方,乙方收款;1-乙方付给甲方,甲方收款)',
`ext_field` varchar(50) DEFAULT '' COMMENT '扩展字段,如果是下游为提现单号',
`first_party_info` longtext NOT NULL COMMENT '甲方相关信息json',
`second_party_info` longtext NOT NULL COMMENT '乙方相关信息json',
`statement_info` longtext NOT NULL COMMENT '订单相关信息json',
PRIMARY KEY (`id`),
KEY `statement_type` (`statement_type`),
KEY `company_id` (`company_id`),
KEY `link_phone` (`link_phone`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='cp/公会对账单';
5 years ago
-- 2020-01-02
-- 提现结算类型 cxj
ALTER TABLE `tab_withdraw`
ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 3 COMMENT '结算类型1-周结 2-月结 3-管理员提现 4-推广员提现 5-其他';
-- 2020 01-03 cxj
ALTER TABLE `sys_file`
MODIFY COLUMN `mime` char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '文件mime类型';
ALTER TABLE `tab_spend`
MODIFY COLUMN `selle_status` int(11) NOT NULL DEFAULT 0 COMMENT '渠道结算 0未结算1 结算',
MODIFY COLUMN `selle_ratio` double(5, 2) DEFAULT 0.00 COMMENT '渠道分成比例';
-- 2020 01-06 cxj
ALTER TABLE `tab_promote_game_ratio`
ADD COLUMN `turnover_ratio` varchar(2000) NOT NULL COMMENT '流水分成比例' AFTER `last_ratio_status`;
ALTER TABLE `tab_promote_game_ratio`
ADD COLUMN `last_turnover_ratio` varchar(2000) NOT NULL COMMENT '上次流水分成比例' AFTER `turnover_ratio`;
5 years ago
-- 2020 01-07 cxj
ALTER TABLE `tab_withdraw`
ADD COLUMN `game_ratio` varchar(5000) NOT NULL COMMENT '游戏提现实际分成比例';
5 years ago
ALTER TABLE `tab_withdraw`
MODIFY COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '结算类型1-周结 2-月结 9-其他';
5 years ago
5 years ago
-- 新增CP游戏分成比例表 2020-01-09 郑昌隆
CREATE TABLE `tab_cp_game_ratio` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`game_id` int(11) DEFAULT '0' COMMENT '游戏ID',
`ratio` decimal(5,2) DEFAULT '0.00' COMMENT '分成比率',
`begin_total_amount` decimal(11,2) DEFAULT '0.00' COMMENT '分成开始档位总流水',
`add_time` int(11) DEFAULT '0' COMMENT '添加时间',
`update_time` int(11) DEFAULT '0' COMMENT '更新时间',
`is_del` tinyint(2) DEFAULT '0' COMMENT '1-已删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- 玩家列表账户锁定添加备注 2020-01-09 郑昌隆
ALTER TABLE `tab_user` ADD COLUMN `lock_remark` varchar(512) NOT NULL DEFAULT '' COMMENT '账号锁定原因' after lock_status;
-- 2019-12-30
-- 会长管理后台提现 cxj
ALTER TABLE `tab_withdraw`
ADD COLUMN `settlement_begin_time` int(10) NOT NULL DEFAULT 0 COMMENT '结算开始时间' AFTER `old_promote_account`;
ALTER TABLE `tab_withdraw`
ADD COLUMN `op_id` int(11) NOT NULL DEFAULT 0 COMMENT '操作id';
ALTER TABLE `tab_withdraw`
ADD COLUMN `op_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '操作人1-推广员 2-管理员 3-自动';
ALTER TABLE `tab_withdraw`
ADD COLUMN `last_op_id` int(11) NOT NULL DEFAULT 0 COMMENT '最后操作人id',
ADD COLUMN `last_op_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '最后操作人1-推广员 2-管理员 3-自动';
-- 2019-12-31
-- 推广员结算类型 cxj
ALTER TABLE `tab_promote`
ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '结算类型1-周结 2-月结';
ALTER TABLE tab_promote add `company_belong` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会归属0-内团1-外团';
ALTER TABLE tab_promote add `company_relation` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会关系0-自主开发及维护1-只维护';
-- 2020-01-02
-- 提现结算类型 cxj
ALTER TABLE `tab_withdraw`
ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 3 COMMENT '结算类型1-周结 2-月结 3-管理员提现 4-推广员提现 5-其他';
-- 2020 01-03 cxj
ALTER TABLE `sys_file`
MODIFY COLUMN `mime` char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '文件mime类型';
5 years ago
ALTER TABLE `tab_spend`
MODIFY COLUMN `selle_status` int(11) NOT NULL DEFAULT 0 COMMENT '渠道结算 0未结算1 结算',
MODIFY COLUMN `selle_ratio` double(5, 2) DEFAULT 0.00 COMMENT '渠道分成比例';
-- 2020 01-06 cxj
ALTER TABLE `tab_promote_game_ratio`
ADD COLUMN `turnover_ratio` varchar(2000) NOT NULL COMMENT '流水分成比例' AFTER `last_ratio_status`;
ALTER TABLE `tab_promote_game_ratio`
ADD COLUMN `last_turnover_ratio` varchar(2000) NOT NULL COMMENT '上次流水分成比例' AFTER `turnover_ratio`;
-- 2020 01-07 cxj
ALTER TABLE `tab_withdraw`
ADD COLUMN `game_ratio` varchar(5000) NOT NULL COMMENT '游戏提现实际分成比例';
5 years ago
ALTER TABLE `tab_withdraw`
MODIFY COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '结算类型1-周结 2-月结 9-其他';
-- 2020 01-13
-- 公会分成比例申请记录
CREATE TABLE `tab_promote_game_ratio_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`promote_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广员id',
`game_id` int(11) NOT NULL DEFAULT '0' COMMENT '游戏id',
`ratio` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '分成比例',
`last_ratio` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '上次的分成比例',
`last_ratio_status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '上次的分成比例状态0-未设置 1-已设置',
`turnover_ratio` varchar(2000) COLLATE utf8mb4_bin NOT NULL COMMENT '流水分成比例',
`last_turnover_ratio` varchar(2000) COLLATE utf8mb4_bin NOT NULL COMMENT '上次流水分成比例',
`begin_time` int(10) NOT NULL DEFAULT '0' COMMENT '开始时间',
`end_time` int(10) NOT NULL DEFAULT '0' COMMENT '过期时间',
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '备注',
`status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '审核状态:-1-未通过 0-待审核 1-通过',
`review_time` int(10) NOT NULL DEFAULT '0' COMMENT '审核时间',
`applicant_id` int(11) NOT NULL DEFAULT '0' COMMENT '申请人',
`reviewer_id` int(11) NOT NULL DEFAULT '0' COMMENT '审核人',
`create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `promote_id` (`promote_id`,`game_id`,`status`) USING BTREE
5 years ago
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
5 years ago
5 years ago
-- 平台规则
CREATE TABLE `sys_document_pop_rules` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '平台规则表',
`title` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`desc` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '描述',
`content` text COLLATE utf8mb4_bin,
`sort` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '权重',
`type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '类型 0不弹窗 1弹出单次 2循环弹出',
`pop_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '弹窗时间',
`operate_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作时间',
`operater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作者ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
--广--
5 years ago
CREATE TABLE `tab_sociaty_games` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`promote_id` int(11) NOT NULL COMMENT '会长ID',
`game_id` int(11) NOT NULL COMMENT '游戏ID',
`status` tinyint(1) NOT null DEFAULT '0' COMMENT '状态 0 禁用 1 启用',
`create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT '工会授权游戏';
5 years ago
----
ALTER TABLE `tab_game`
5 years ago
ADD COLUMN `apply_auth` INT(11) NULL DEFAULT '1' COMMENT '申请权限(1为全部可申请2为部分会长可申请)' AFTER `game_detail_cover`;
-- 2020-01-14
-- cxj
ALTER TABLE `tab_promote_game_ratio`
MODIFY COLUMN `turnover_ratio` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '流水分成比例' AFTER `last_ratio_status`,
MODIFY COLUMN `last_turnover_ratio` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '上次流水分成比例';
UPDATE tab_spend SET selle_ratio = 0.00 where selle_ratio is null
ALTER TABLE `tab_promote_game_ratio`
ADD COLUMN `relation_game_id` int(11) NOT NULL DEFAULT 0 COMMENT '关联游戏id' AFTER `game_id`;
ALTER TABLE `tab_promote_game_ratio_log`
ADD COLUMN `relation_game_id` int(11) NOT NULL DEFAULT 0 COMMENT '关联游戏id' AFTER `game_id`;
ALTER TABLE `tab_spend`
MODIFY COLUMN `selle_status` int(11) NOT NULL DEFAULT 0 COMMENT '渠道结算 0未结算1 结算',
5 years ago
MODIFY COLUMN `selle_ratio` double(5, 2) DEFAULT 0.00 COMMENT '渠道分成比例';
ALTER TABLE `tab_game`
5 years ago
ADD COLUMN `download_ways` tinyint(3) NOT NULL DEFAULT 0 COMMENT '下载方式' AFTER `beta_url`;
-- 是否需要修复旧数据
ALTER TABLE `tab_promote`
ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显示充值数据 0否 1是';
ALTER TABLE `tab_promote_belong`
ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显示充值数据 0否 1是';
--CP 2020-02-04
ALTER TABLE `tab_cp_game_ratio`
ADD COLUMN `instanceof` tinyint(2) NOT NULL DEFAULT 1 COMMENT '运算符1:>= ; 2:>' AFTER `game_id`;
-- 2020-02-04
ALTER TABLE `tab_promote`
ADD COLUMN `auto_review_withdraw_status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '提现自动审核状态0-关闭 1-开启';
ALTER TABLE `tab_promote`
ADD COLUMN `auto_review_withdraw_updated_time` int(10) NOT NULL DEFAULT 0 COMMENT '提现自动审核状态更新时间';
ALTER TABLE `tab_promote`
ADD INDEX `auto_review_withdraw_status`(`auto_review_withdraw_status`) USING BTREE;
5 years ago
-- 2020-02-10 yulingwei 奖罚记录
5 years ago
CREATE TABLE `tab_reward_record` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`reward_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '奖罚类型 1奖励 2惩罚',
`company_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '公司类型 1上游公司 2下游公司',
`company_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '公司ID 当公司类型为上游CP公司时展示合作方管理下的公司反之展示推广公司管理下的公司',
`accounts` json NOT NULL,
`relation_game_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '游戏id',
`content` varchar(1000) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '事件内容',
5 years ago
`money` double(11,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '金额',
`reward_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '奖惩时间',
5 years ago
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`creater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建者ID',
PRIMARY KEY (`id`)
5 years ago
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- 2020-02-10 liuweiwen 内部公司信息
CREATE TABLE `tab_company_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`partner` varchar(60) NOT NULL COMMENT '合作方名称',
`uid` int(11) NOT NULL DEFAULT '0' COMMENT '添加人ID',
`status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态 0-禁用 1-启用',
`link_man` varchar(64) DEFAULT '' COMMENT '联系人',
`link_phone` varchar(24) DEFAULT NULL COMMENT '联系电话',
`address` varchar(255) DEFAULT NULL COMMENT '邮寄地址',
`company_tax_no` varchar(64) DEFAULT NULL COMMENT '公司税号',
`payee_name` varchar(24) DEFAULT NULL COMMENT '收款方名称',
`bank_account` varchar(32) DEFAULT NULL COMMENT '银行账号',
`opening_bank` varchar(128) DEFAULT NULL COMMENT '开户行',
`create_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间',
`last_up_time` int(10) NOT NULL DEFAULT '0' COMMENT '最后更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='内部公司信息';
5 years ago
5 years ago
-- 2020-02-10 liaojinling 会长押金
5 years ago
CREATE TABLE `tab_president_deposit` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`promote_id` varchar(60) NOT NULL COMMENT '会长ID',
`payer` varchar(50) NOT NULL DEFAULT '' COMMENT '付款人',
`amount` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '金额',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态',
`pay_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '押金付款方式',
`pay_way` tinyint(1) NOT NULL DEFAULT '0' COMMENT '付款方式',
`pay_account` varchar(60) NOT NULL DEFAULT '' COMMENT '付款账号',
`pay_confirm_time` int(10) NOT NULL DEFAULT '0' COMMENT '押金确认时间',
`refund_time` int(10) NOT NULL DEFAULT '0' COMMENT '退款时间',
`create_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间',
`update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='会长押金';
-- 2020-02-10 yulingwei 推广工会管理 新增属性类型
ALTER TABLE `tab_promote_belong`
MODIFY COLUMN `company_belong` tinyint(1) UNSIGNED NOT NULL DEFAULT 3 COMMENT '工会归属0-内团1-外团 2-分发联盟 3 无' AFTER `verify_status`,
MODIFY COLUMN `company_relation` tinyint(1) UNSIGNED NOT NULL DEFAULT 2 COMMENT '工会关系0-自主开发及维护1-只维护 2 无' AFTER `company_belong`;
ADD COLUMN `company_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '工会类型 1公司 2个人' AFTER `can_view_recharge`;
5 years ago
-- 2020-02-10 yulingwei 推广工会管理 新增属性类型
ALTER TABLE `tab_promote`
MODIFY COLUMN `company_belong` tinyint(1) NOT NULL DEFAULT 0 COMMENT '工会归属0-内团1-外团 2-分发联盟 3 无' AFTER `company_id`,
MODIFY COLUMN `company_relation` tinyint(1) NOT NULL DEFAULT 0 COMMENT '工会关系0-自主开发及维护1-只维护 2 无' AFTER `company_belong`;
-- 2020-02-10 cxj 推广提现--新增审核模式
ALTER TABLE `tab_withdraw`
ADD COLUMN `review_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '审核模式1-人工审核 2-自动审核';
--2020-02-10 sunke --
ALTER TABLE `tab_promote_company`
ADD COLUMN `settlement_contact` VARCHAR(60) NOT NULL DEFAULT '0' COMMENT '结算联系人' AFTER `last_up_time`,
ADD COLUMN `contact_phone` BIGINT(12) NOT NULL DEFAULT '0' COMMENT '联系电话' AFTER `settlement_contact`,
ADD COLUMN `address` VARCHAR(255) NOT NULL DEFAULT '0' COMMENT '所在地址' AFTER `contact_phone`,
ADD COLUMN `bank_card` VARCHAR(60) NOT NULL DEFAULT '0' COMMENT '银行卡号' AFTER `address`,
ADD COLUMN `bank_cardname` VARCHAR(60) NOT NULL DEFAULT '0' COMMENT '银行卡名' AFTER `bank_card`,
ADD COLUMN `bank_name` VARCHAR(60) NOT NULL DEFAULT '0' COMMENT '收款银行' AFTER `bank_cardname`,
ADD COLUMN `bank_address` VARCHAR(60) NOT NULL DEFAULT '0' COMMENT '开户网点' AFTER `bank_name`,
ADD COLUMN `content` VARCHAR(255) NULL DEFAULT '' COMMENT '备注' AFTER `bank_address`;
--2020-02-11 chenzhi 广--
ALTER TABLE `tab_promote_company`
ADD COLUMN `platform_name` VARCHAR(60) NOT NULL DEFAULT '' COMMENT '平台名称' AFTER `bank_address`,
ADD COLUMN `contact_begin` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '合同开始时间' AFTER `platform_name`,
ADD COLUMN `contact_end` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '合同结束时间' AFTER `contact_begin`,
ADD COLUMN `fax_ratio` VARCHAR(20) NOT NULL DEFAULT '0' COMMENT '开票税率' AFTER `contact_end`,
ADD COLUMN `company_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '公司性质1-公司 2-个人' AFTER `fax_ratio`,
ADD COLUMN `is_sign_contact` tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否签署合同:0-未签署 1-签署' AFTER `company_type`,
ADD COLUMN `company_belong` tinyint(1) UNSIGNED NOT NULL DEFAULT 3 COMMENT '工会归属0-内团1-外团 2-分发联盟 3 无' AFTER `is_sign_contact`,
ADD COLUMN `resources` VARCHAR(2000) NULL DEFAULT '' COMMENT '文档' AFTER `company_belong`;
-- 添加测试订单录入表 郑昌隆 2020-02-12
DROP TABLE IF EXISTS `tab_test_order`;
CREATE TABLE `tab_test_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order_type` tinyint(2) DEFAULT '0' COMMENT '0-未知1-sdk充值2-平台币充值3-超级签充值',
`server_type` tinyint(2) DEFAULT '1' COMMENT '1-测试内网 2-测试外网',
`order_no` varchar(256) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '平台充值订单号',
`cp_order_no` varchar(256) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'CP订单号',
`user_account` varchar(30) COLLATE utf8mb4_bin DEFAULT '' COMMENT '用户账号',
`game_id` int(11) DEFAULT '0' COMMENT '游戏ID',
`game_name` varchar(30) COLLATE utf8mb4_bin DEFAULT '' COMMENT '游戏名称',
`order_amount` decimal(10,2) DEFAULT NULL COMMENT '订单金额',
`pay_amount` decimal(10,2) DEFAULT NULL COMMENT '支付金额',
`pay_time` int(11) DEFAULT '0' COMMENT '交易时间',
`pay_way` int(11) DEFAULT NULL COMMENT '-1绑币,0平台币,1支付宝,2微信,7金猪,9双乾支付-支付宝,10双乾支付-银联,15双乾支付-快捷',
`add_time` int(11) DEFAULT '0' COMMENT '添加时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- 2020-02-12 zyx 推广提现--新增审核模式
ALTER TABLE `tab_statement`
MODIFY COLUMN `ext_field` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '扩展字段,如果是下游为提现单号' AFTER `pay_type`;
5 years ago
--2020-02-12 liuweiwen -
ALTER TABLE tab_game
ADD COLUMN `original_package_name` varchar(64) DEFAULT NULL COMMENT '游戏原包名称';
--2020-02-12 liuweiwen
ALTER TABLE sys_auth_group
ADD COLUMN `show_data` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否展示权限1-是0-否';
--2020-02-12 liuweiwen
ALTER TABLE tab_partner
ADD COLUMN `matche_platform` varchar(64) DEFAULT NULL COMMENT '对应平台(简称)';
ALTER TABLE tab_partner
ADD COLUMN `contract_start_time` int(11) NOT NULL DEFAULT '0' COMMENT '合同开始时间';
ALTER TABLE tab_partner
ADD COLUMN `contract_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '合同结束时间';
ALTER TABLE tab_partner
ADD COLUMN `channel_rate` decimal(2,0) NOT NULL DEFAULT '0' COMMENT '渠道费率';
ALTER TABLE tab_partner
ADD COLUMN `invoice_rate` decimal(2,0) NOT NULL DEFAULT '0' COMMENT '开票税点';
ALTER TABLE tab_partner
ADD COLUMN `is_sign_contract` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否签署合同0-未签1-已签';
ALTER TABLE tab_partner
ADD COLUMN `settlement_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '结算方式0-未知1-周结2-月结';
ALTER TABLE tab_partner
ADD COLUMN `has_game_evidence` tinyint(1) DEFAULT '0' COMMENT '是否有游戏资质0-没有1-有';
ALTER TABLE tab_partner
ADD COLUMN `remark` varchar(255) DEFAULT NULL COMMENT '备注';
ALTER TABLE tab_partner
ADD COLUMN `file_info` text COMMENT '文档信息json格式';
5 years ago
ALTER TABLE tab_partner
ADD COLUMN `company_type` TINYINT (3) NOT NULL DEFAULT '1' COMMENT '公司性质1-公司 2-个人';
5 years ago
-- 添加测试订单录入表 郑昌隆 2020-02-12
CREATE TABLE `tab_test_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order_type` tinyint(2) DEFAULT '0' COMMENT '0-未知1-sdk充值2-平台币充值3-超级签充值',
`server_type` tinyint(2) DEFAULT '1' COMMENT '1-测试内网 2-测试外网',
`order_no` varchar(256) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '平台充值订单号',
`cp_order_no` varchar(256) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'CP订单号',
`user_account` varchar(30) COLLATE utf8mb4_bin DEFAULT '' COMMENT '用户账号',
`game_id` int(11) DEFAULT '0' COMMENT '游戏ID',
`game_name` varchar(30) COLLATE utf8mb4_bin DEFAULT '' COMMENT '游戏名称',
`order_amount` decimal(10,2) DEFAULT NULL COMMENT '订单金额',
`pay_amount` decimal(10,2) DEFAULT NULL COMMENT '支付金额',
`pay_time` int(11) DEFAULT '0' COMMENT '交易时间',
`pay_way` int(11) DEFAULT NULL COMMENT '-1绑币,0平台币,1支付宝,2微信,7金猪,9双乾支付-支付宝,10双乾支付-银联,15双乾支付-快捷',
`add_time` int(11) DEFAULT '0' COMMENT '添加时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- 2020-02-10 yulingwei 预付款预警
5 years ago
CREATE TABLE `tab_partner_divide_warn` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '公司预警表',
`partner_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '公司ID',
`advance_amount` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预付款',
`warming_amount` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预警金额',
`phones` json DEFAULT NULL,
`warn_frequency` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预警金额频率',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态 1正常 2删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`upt_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
`operater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作者ID',
PRIMARY KEY (`id`)
5 years ago
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- 2020-02-17 yulingwei 汇总结算单管理
CREATE TABLE `tab_settlement_sheet` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`orderid` varchar(32) COLLATE utf8mb4_bin NOT NULL DEFAULT '0' COMMENT '订单ID (时间戳+adminid+4为随机数字)',
`settlement_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '结算类型 1 上游结算单 2 下游-内团结算单 3下游-外团结算单 4 下游-个人结算单',
`time_start` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '结算开始时间',
`time_end` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '结算结束时间',
`settlement_time_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '结算周期 1周结 2月结',
`settlement_sheet` json NOT NULL COMMENT '结算单',
`audit_users` json NOT NULL COMMENT '审核人员',
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
`audit_user` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '当前审核人',
`step` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '审核进度 123',
`status` tinyint(1) unsigned NOT NULL DEFAULT '3' COMMENT '订单审核状态 1审核通过 2审核未通过 3待审核通过',
`all_status` tinyint(1) unsigned NOT NULL DEFAULT '3' COMMENT '订单审核状态 1审核通过 2审核未通过 3待审核通过',
`creater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '申请人',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`)
5 years ago
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
5 years ago
--2020-02-17 sunke--
ALTER TABLE `tab_promote_company`
CHANGE COLUMN `settlement_contact` `settlement_contact` VARCHAR(60) NOT NULL DEFAULT '' COMMENT '结算联系人' AFTER `last_up_time`,
CHANGE COLUMN `contact_phone` `contact_phone` BIGINT(12) NOT NULL DEFAULT '' COMMENT '联系电话' AFTER `settlement_contact`,
CHANGE COLUMN `address` `address` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '所在地址' AFTER `contact_phone`,
CHANGE COLUMN `bank_card` `bank_card` VARCHAR(60) NOT NULL DEFAULT '' COMMENT '银行卡号' AFTER `address`,
CHANGE COLUMN `bank_cardname` `bank_cardname` VARCHAR(60) NOT NULL DEFAULT '' COMMENT '银行卡名' AFTER `bank_card`,
CHANGE COLUMN `bank_name` `bank_name` VARCHAR(60) NOT NULL DEFAULT '' COMMENT '收款银行' AFTER `bank_cardname`,
CHANGE COLUMN `bank_address` `bank_address` VARCHAR(60) NOT NULL DEFAULT '' COMMENT '开户网点' AFTER `bank_name`,
CHANGE COLUMN `platform_name` `platform_name` VARCHAR(60) NOT NULL DEFAULT '' COMMENT '平台名称' AFTER `bank_address`,
CHANGE COLUMN `contact_begin` `contact_begin` INT(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '合同开始时间' AFTER `platform_name`;
--- chenzhi----
CREATE TABLE `tab_financial_summary` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '汇总分类:1按收入类型,2按合作方不包含绑币,3按合作方包含绑币,4按支付渠道,5支付类型',
`key_name` varchar(50) DEFAULT '' COMMENT '类型名称',
`sort` int(11) DEFAULT '0' COMMENT '排序',
`sum_money` decimal(10,2) DEFAULT '0.00' COMMENT '流水',
`count_month` varchar(10) DEFAULT '' COMMENT '统计月份',
`count_year` varchar(10) DEFAULT '' COMMENT '统计年份',
`create_time` int(10) NOT NULL DEFAULT '0' COMMENT '最后更新时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `count_year` (`count_year`) USING BTREE,
KEY `key_name` (`key_name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='财务分类汇总统计';
-- 推广员部门/小组 liaojinling
ALTER TABLE tab_promote
ADD COLUMN `group_remark` varchar(50) NOT NULL DEFAULT '' COMMENT '部门/小组';
--2020-02-20 --
ALTER TABLE `tab_statement`
ADD COLUMN `verify_status` tinyint(2) NULL DEFAULT 0 COMMENT '审核状态 0:未审核 1:审核通过 2:审核拒绝' AFTER `statement_info`;
-- 支付类型添加易宝支付
INSERT INTO `platform`.`tab_tool`( `name`, `title`, `config`, `template`, `type`, `status`, `create_time`) VALUES ('yeepay', '易宝支付', '', '', 1, 1, 0);
-- 身份证记录添加info字段
ALTER TABLE `tab_idcard_log`
ADD COLUMN `info` varchar(255) DEFAULT '' COMMENT '第三方接口返回信息';
--2020-02-25 -- liuweiwen
CREATE TABLE `tab_resource_verify_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`game_id` int(11) NOT NULL COMMENT '游戏id',
`game_name` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '游戏名称',
`sdk_version` tinyint(2) DEFAULT NULL COMMENT '区别版本 1安卓 2苹果 0 双版本',
`new_apply_count` int(4) DEFAULT '0' COMMENT '新用户判断标准(申请次数不大于此值)',
`new_low_value` int(11) DEFAULT '0' COMMENT '新用户资源最低申请额度',
`new_high_value` int(11) DEFAULT '0' COMMENT '新用户资源最高申请额度',
5 years ago
`old_value_ratio` decimal(10,5) DEFAULT '0.00000' COMMENT '非新用户可申请额度占总充值量的比例',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态0-锁定1-正常',
`uid` int(11) DEFAULT '0' COMMENT '后台操作员id',
`add_time` int(11) DEFAULT '0' COMMENT '新增时间',
`update_time` int(11) DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`)
5 years ago
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='资源审核配置';
ALTER TABLE tab_test_resource ADD COLUMN `is_new` tinyint(1) DEFAULT '0' COMMENT '0-未知1-新用户;2-非新用户';
5 years ago
--2020-2-27 sunke--
CREATE TABLE `tab_promote_action_logs` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`action_type` CHAR(254) NOT NULL DEFAULT '' COMMENT '操作类型',
`module` CHAR(254) NOT NULL DEFAULT '' COMMENT '所属模块',
`promote` CHAR(254) NOT NULL DEFAULT '' COMMENT '操作人',
`promote_id` INT(11) NOT NULL DEFAULT '0',
`ip` VARCHAR(254) NOT NULL DEFAULT '0' COMMENT 'ip',
`create_time` CHAR(254) NOT NULL DEFAULT '' COMMENT '创建时间',
PRIMARY KEY (`id`)
) COMMENT='推广员操作日志' COLLATE='utf8mb4_bin';
-- 2020-02-25 chenzhi 后台操作日志
CREATE TABLE `tab_operation_log` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`op_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '操作类型 1 编辑 2 删除 3下载',
`op_name` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT '0' COMMENT '操作名词',
`url` varchar(1000) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '跳转URL',
`menu` varchar(300) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '菜单目录',
`key` varchar(300) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '关键字唯一表示',
`admin_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作员id',
`admin_account` varchar(30) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '管理员账号',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`op_ip` varchar(16) DEFAULT '0' COMMENT '登陆ip',
PRIMARY KEY (`id`),
KEY `admin_id` (`admin_id`) USING BTREE,
KEY `op_type` (`op_type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- 2020-02-25 chenzhi spend表索引优化
ALTER TABLE `tab_spend`
ADD INDEX `game_stayus` (`pay_status`, `pay_game_status`) USING BTREE ;
-- 2020-02-27 zyx 添加行为日志表
CREATE TABLE `tab_user_action_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT 0 COMMENT '玩家用户id',
`account` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '玩家用户名',
`game_id` int(11) NOT NULL DEFAULT 0 COMMENT '游戏id',
`game_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '游戏名称',
`action` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '行为详情',
`type` tinyint(2) NOT NULL DEFAULT 0 COMMENT '行为类型 0:修改密码 1:修改/绑定手机号 2:修改身份信息 3:登录 区服-角色-等级 4:退出 区服-角色-等级',
`ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'ip地址',
`create_time` int(11) NULL DEFAULT 0 COMMENT '创建时间',
`remarks` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE
5 years ago
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
-- 2020-03-04 zyx 添加可用余额统计表
CREATE TABLE `tab_promote_game_available_balance` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`promote_id` int(11) NOT NULL DEFAULT 0 COMMENT '推广员id',
`promote_account` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '推广员账号',
`game_id` int(11) NOT NULL DEFAULT 0 COMMENT '游戏id',
`game_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '游戏名称',
`server_id` int(11) NOT NULL DEFAULT 0 COMMENT '游戏区服',
`server_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '区服名称',
`available_balance` int(11) NOT NULL DEFAULT 0 COMMENT '可用余额',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
-- 2020-03-05 zyx spend添加索引
ALTER TABLE `tab_spend`
ADD INDEX `pay_channel`(`pay_way`, `pay_status`, `game_id`) USING BTREE,
ADD INDEX `pay_channel_type`(`pay_status`, `pay_way`) USING BTREE;
5 years ago
-- 2020-03-05 yulingwei 工单表
CREATE TABLE `tab_work_order_info` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`order_no` varchar(32) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '订单号',
`user_account` varchar(64) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '用户账号',
`type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '工单类型 1资源 2反馈',
`game_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '游戏ID',
`game_name` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`server_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '区服ID',
`server_name` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`role_name` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`score` tinyint(1) unsigned NOT NULL DEFAULT '5' COMMENT '评价分数',
5 years ago
`attachment_url` varchar(1000) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '附件ID',
`feedback` varchar(1000) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`status` tinyint(1) unsigned NOT NULL DEFAULT '3' COMMENT '单号状态 1完成 2失败 3等待',
`remark` varchar(1000) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`creator_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建者',
`handler_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '处理人ID',
`created_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`process_log` json DEFAULT NULL COMMENT '进度日志',
`resource_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '资源数',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- 为游戏统计新增spend索引 chenzhi 2020/03/11
ALTER TABLE `tab_spend`
ADD INDEX `game_time`(`game_id`,`pay_time`) USING BTREE;
-- 为公会统计新增spend索引 chenzhi 2020/03/11
ALTER TABLE `tab_spend`
ADD INDEX `promote_time`(`promote_id`,`pay_time`) USING BTREE;
-- liaojinling 用户重复标识
ALTER TABLE `tab_user`
ADD INDEX `index_device_ip` (`device_number`, `last_login_ip`) USING BTREE ;
ALTER TABLE `tab_user`
ADD COLUMN `is_repeat` tinyint(1) not null default 0 comment '是否重复用户[设备/IP]';
5 years ago
-- 2020-03-04 zyx 添加可用余额统计表
CREATE TABLE `tab_promote_game_available_balance` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`promote_id` int(11) NOT NULL DEFAULT 0 COMMENT '推广员id',
`promote_account` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '推广员账号',
`game_id` int(11) NOT NULL DEFAULT 0 COMMENT '游戏id',
`game_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '游戏名称',
`server_id` int(11) NOT NULL DEFAULT 0 COMMENT '游戏区服',
`server_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '区服名称',
`available_balance` int(11) NOT NULL DEFAULT 0 COMMENT '可用余额',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
-- 2020-03-05 zyx spend添加索引
ALTER TABLE `tab_spend`
ADD INDEX `pay_channel`(`pay_way`, `pay_status`, `game_id`) USING BTREE,
5 years ago
ADD INDEX `pay_channel_type`(`pay_status`, `pay_way`) USING BTREE;
-- 2020-03-06 liaojinling
5 years ago
CREATE TABLE `tab_user_data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) not null COMMENT '用户ID',
`pay_amount` decimal(12, 2) not null DEFAULT '0.00' COMMENT '累计支付金额',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户数据表';
CREATE TABLE `tab_game_data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`game_id` int(11) not null COMMENT '游戏ID',
`pay_amount` decimal(12, 2) not null DEFAULT '0.00' COMMENT '累计充值金额',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='游戏数据表';
CREATE TABLE `tab_base_game` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(150) not null COMMENT '游戏名称',
`android_game_id` int(11) not null default 0 COMMENT 'android版ID',
`ios_game_id` int(11) not null default 0 COMMENT 'ios版ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户数据表';
ALTER TABLE `tab_spend`
ADD INDEX `index_user_id`(`user_id`) USING BTREE;
CREATE TABLE `tab_package_download_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`promote_id` int(11) not null COMMENT '推广员ID',
`game_id` int(11) not null COMMENT '游戏ID',
`user_id` int(11) not null default 0 COMMENT '用户ID',
`type` tinyint(1) not null default 0 COMMENT '类型 1 企业签下载 2 TF下载 3 超级签下载',
`create_time` int(11) NULL DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='包下载记录表';
5 years ago
update tab_quick_menu set url='/index.php?s=/Home/Game/index.html' where url='/index.php?s=/Home/Apply/index.html';
-- 2020-03-16 zyx 添加ip限制白名单表内购tool表状态配置列
INSERT INTO `tab_tool`(`name`, `title`, `config`, `template`, `type`, `status`, `create_time`) VALUES ('apple_interior_buy', '苹果内购通知开启', NULL, NULL, 1, 0, 1584345308);
CREATE TABLE `tab_forbit_ip` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NULL DEFAULT 0 COMMENT '用户id',
`user_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '用户账号',
`area` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '区域',
`status` tinyint(2) NULL DEFAULT 1 COMMENT '状态 1:不限制 0:限制',
`admin_id` int(11) NULL DEFAULT 1 COMMENT '管理员账号id',
`admin_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '管理员账号',
`create_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '创建时间',
`remarks` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 30 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
-- 为游戏统计新增spend索引 chenzhi 2020/03/11
ALTER TABLE `tab_spend`
ADD INDEX `game_time`(`game_id`,`pay_time`) USING BTREE;
-- 为公会统计新增spend索引 chenzhi 2020/03/11
ALTER TABLE `tab_spend`
ADD INDEX `promote_time`(`promote_id`,`pay_time`) USING BTREE;
-- liaojinling 用户重复标识
ALTER TABLE `tab_user`
ADD INDEX `index_device_ip` (`device_number`, `last_login_ip`) USING BTREE ;
ALTER TABLE `tab_user`
5 years ago
ADD COLUMN `is_repeat` tinyint(1) not null default 0 comment '是否重复用户[设备/IP]';
-- 添加支付白名单表与支付渠道意向表 zyx 2020/03/23
CREATE TABLE `tab_user_pay_whitelist` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL DEFAULT 0 COMMENT '用户id',
`user_account` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户账号',
`status` tinyint(2) NULL DEFAULT 0 COMMENT '状态 0:7日有效 1:30日有效 2:永久有效',
`update_time` int(11) NULL DEFAULT 0 COMMENT '更新时间',
`create_time` int(11) NULL DEFAULT 0 COMMENT '创建时间',
`time` int(11) NULL DEFAULT 0 COMMENT '有效时间 单位秒 1表示永久有效',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
CREATE TABLE `tab_pay_channel_intention` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL DEFAULT 0 COMMENT '用户id',
`user_account` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户账号',
`pay_way` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '1' COMMENT '1:alipay:支付宝,2:wxpay:微信 3:sqshorcut:双乾支付 4:shorcut:易宝支付',
`pay_amount` int(11) NULL DEFAULT 0 COMMENT '支付金额',
`pay_order_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '支付订单号',
`create_time` int(11) NULL DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- 2020-03-23 zyx 市场结算统计表添加
CREATE TABLE `tab_market_balance` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`my_time` varchar(11) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '当前年份月份',
`pay_amount` decimal(11, 2) NULL DEFAULT 0.00 COMMENT '金额',
`game_id` int(11) NULL DEFAULT 0 COMMENT '游戏id',
`game_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '游戏名称',
`game_names` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '游戏名称排除设备',
`promote_id` int(11) NULL DEFAULT 0 COMMENT '推广员id',
`promote_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '推广员账号',
`company_relation` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '公司关联',
`company_belong` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '公司内外团',
`root_id` int(11) NULL DEFAULT 0 COMMENT '推广员根id',
`account` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '推广员根账号',
`ratio` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '0',
`turnover_ratio` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '0',
`game_ratio` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '0',
`upstream` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '0' COMMENT '上游流水',
`downstream` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '0' COMMENT '下游流水',
`highquality` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '0' COMMENT '绩优流水',
`sdk_version` int(11) NULL DEFAULT 1 COMMENT '游戏设备类型',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
ALTER TABLE `tab_pay_channel_intention`
ADD COLUMN `pay_status` tinyint(2) NULL DEFAULT 0 COMMENT '支付状态 0未支付 1已支付' AFTER `create_time`;
ALTER TABLE `tab_pay_channel_intention`
ADD COLUMN `pay_game_status` tinyint(2) NULL DEFAULT 0 COMMENT '支付状态 0未支付 1已支付' AFTER `create_time`;
CREATE TABLE `tab_pay_intention_num` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`num` int(11) NULL DEFAULT 0 COMMENT '支付意愿支付次数',
`pay_order_number` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '支付单号',
PRIMARY KEY (`id`) USING BTREE
5 years ago
) ENGINE = INNODB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
-- chenzhi 20200325
CREATE TABLE `tab_finance_compare` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`begin_time` int(11) NULL DEFAULT 0 COMMENT '验证开始时间',
`end_time` int(11) NULL DEFAULT 0 COMMENT '验证结束时间',
`pay_way` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '1:支付宝 2微信 3易宝',
`diff_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '异常数量',
`diff_money` decimal(10,2) unsigned NOT NULL DEFAULT '0' COMMENT '异常金额',
`check_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '对比数量',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`check_status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否验证结束',
PRIMARY KEY (`id`),
KEY `pay_way` (`pay_way`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='财务导入对账表';
-- chenzhi 20200325
CREATE TABLE `tab_finance_compare_info` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`pay_order_number` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '订单号',
`pay_way` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '1:支付宝 2微信 3易宝',
`pt_pay_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0' COMMENT '平台金额',
`sj_pay_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0' COMMENT '商家金额',
`diff_money` decimal(10,2) unsigned NOT NULL DEFAULT '0' COMMENT '异常金额',
`type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0:正常;1:金额不符;2:商家数据缺失;3:平台数据缺失;4:状态不符;5:渠道不符',
5 years ago
`order_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '1:游戏流水;2:平台币订单;0未知',
5 years ago
`compare_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父表id',
`is_read` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否已处理',
PRIMARY KEY (`id`),
KEY `is_read` (`is_read`) USING BTREE,
KEY `pay_order_number` (`pay_order_number`) USING BTREE,
KEY `compare_id` (`compare_id`) USING BTREE,
KEY `compare_type` (`compare_id`,`type`) USING BTREE,
5 years ago
KEY `compare_order_type` (`compare_id`,`order_type`,`pay_order_number`) USING BTREE,
5 years ago
KEY `pay_way` (`pay_way`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='财务导入对账详情表';
-- zyx 20200417
ALTER TABLE `tab_spend`
ADD COLUMN `old_change_promote_id` int(11) NULL DEFAULT 0 COMMENT '修改配置前渠道' AFTER `old_promote_account`,
ADD COLUMN `old_change_promote_account` varchar(30) NULL COMMENT '修改配置前渠道账号' AFTER `old_change_promote_id`;
5 years ago
5 years ago
--kv chenzhi 20200422
5 years ago
CREATE TABLE `sys_kv` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`key` varchar(50) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT 'key',
`value` varchar(1000) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT 'value',
`type` varchar(50) DEFAULT NULL COMMENT '类型说明',
`remark` varchar(1000) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`),
UNIQUE KEY `key_name` (`key`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='系统简单kv储存表';
5 years ago
INSERT INTO `sys_kv` (`key`, `value`, `type`, `remark`) VALUES ('aggregate_finance_api', 'http://admin.wmtxkj.com/index.php?g=api&m=FinanceWeekCount&a=returnFinanceAccountsDataList', 'string', '聚合下游结算Api地址');
5 years ago
5 years ago
-- chenzhi 20200422
5 years ago
CREATE TABLE `tab_aggregate_statement` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
5 years ago
`withdraw_type` tinyint(2) DEFAULT '0' COMMENT '对账类型(0-周结,1月结,2补点)',
`channel_id` int(11) DEFAULT '0' COMMENT '对账公司id',
`channel_name` varchar(60) NOT NULL COMMENT '对账公司名称',
5 years ago
`link_phone` varchar(24) DEFAULT NULL COMMENT '对账公司联系人电话',
5 years ago
`begintime` int(11) NOT NULL DEFAULT '0' COMMENT '对账开始时间',
`endtime` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间',
5 years ago
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建对账单时间',
5 years ago
`ratio_money` decimal(10,2) DEFAULT '0.00' COMMENT '对账金额',
`pay_money` decimal(10,2) DEFAULT '0.00' COMMENT '原始金额合计',
`pay_type` tinyint(2) DEFAULT '0' COMMENT '收款方(0-甲方付给乙方,乙方收款;1-乙方付给甲方,甲方收款)',
5 years ago
`ext_field` longtext COMMENT '凭证地址',
5 years ago
`first_party_info` longtext DEFAULT NULL COMMENT '甲方相关信息json',
`second_party_info` longtext DEFAULT NULL COMMENT '乙方相关信息json',
5 years ago
`statement_info` longtext NOT NULL COMMENT '订单相关信息json',
5 years ago
`admin_name` varchar(60) NOT NULL COMMENT '操作人名称',
`admin_id`int(11) DEFAULT '0' COMMENT '操作人id',
5 years ago
`verify_status` tinyint(2) DEFAULT '0' COMMENT '审核状态 -1审核拒绝 0:系统生成结算单 1:申请开票 2:审核同意 3:已开票 4:上传收款凭证 5已到账',
`remark` longtext DEFAULT NULL COMMENT '备注信息',
5 years ago
PRIMARY KEY (`id`),
5 years ago
KEY `withdraw_type` (`withdraw_type`) USING BTREE,
KEY `channel_id` (`channel_id`) USING BTREE,
5 years ago
KEY `link_phone` (`link_phone`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='聚合渠道结算单';
ALTER TABLE `tab_deposit`
ADD COLUMN `old_change_promote_id` int(11) NULL DEFAULT 0 COMMENT '修改配置前渠道' ,
ADD COLUMN `old_change_promote_account` varchar(30) NOT NULL default '' COMMENT '修改配置前渠道账号' ;
-- zyx 20200420
ALTER TABLE `platform`.`sys_auth_rule`
MODIFY COLUMN `title` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规则中文描述' AFTER `name`;
ALTER TABLE `sj_game_user`.`sj_user`
ADD COLUMN `platform_account` varchar(60) NULL COMMENT '游戏渠道玩家账号' AFTER `age_type`;
ALTER TABLE `tab_deposit`
ADD COLUMN `old_change_promote_id` int(11) NULL DEFAULT 0 COMMENT '修改配置前渠道' ,
ADD COLUMN `old_change_promote_account` varchar(30) NULL COMMENT '修改配置前渠道账号' ;
--20200518 chenzhi
5 years ago
--
INSERT INTO `sys_kv` (`key`, `value`, `type`, `remark`) VALUES ('aggregate_cp_settlement_api', 'http://admin.wmtxkj.com/index.php?g=api&m=FinanceWeekCount&a=returnCPSettlement', 'string', '聚合cp结算Api地址');
5 years ago
INSERT INTO `sys_kv` (`key`, `value`, `type`, `remark`) VALUES ('payment_check_mobile', '18959188422', 'string', '打款登陆验证手机');
5 years ago
--
CREATE TABLE `tab_game_ratio_mould` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`relation_game_id` int(11) DEFAULT '0' COMMENT '游戏id',
`company_belong` varchar(60) NOT NULL COMMENT '工会归属0-内团 1-外团 2-分发联盟 3-无 4-下游聚合',
`ratio` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '默认分成比例',
`turnover_ratio` varchar(2000) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '流水分成比例= turnover:流水,ratio:比例,instanceof:1>= || 2>',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间/修改时间',
`admin_id`int(11) DEFAULT '0' COMMENT '操作人id',
`admin_name` varchar(60) NOT NULL COMMENT '操作人名称',
PRIMARY KEY (`id`),
KEY `game_id` (`relation_game_id`) USING BTREE,
KEY `company_belong` (`company_belong`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='游戏默认分成比例';
--广
ALTER TABLE `tab_partner`
ADD COLUMN `ali_user` varchar(64) NOT NULL DEFAULT '' COMMENT '支付宝真实名称' AFTER `opening_bank`,
ADD COLUMN `ali_account` varchar(128) NOT NULL DEFAULT '' COMMENT '支付宝登陆账号' AFTER `ali_user`;
ALTER TABLE `tab_promote_company`
MODIFY COLUMN `bank_address` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '帐户名' AFTER `bank_name`,
ADD COLUMN `ali_user` varchar(64) NOT NULL DEFAULT '' COMMENT '支付宝真实名称' AFTER `bank_address`,
ADD COLUMN `ali_account` varchar(128) NOT NULL DEFAULT '' COMMENT '支付宝登陆账号' AFTER `ali_user`;
-- 公司分成比例
CREATE TABLE `tab_company_game_ratio` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`company_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广公司id',
`relation_game_id` int(11) NOT NULL DEFAULT '0' COMMENT '关联游戏id',
`ratio` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '默认分成比例',
`turnover_ratio` varchar(2000) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '流水分成比例',
`begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '开始时间',
`end_time` int(11) NOT NULL DEFAULT '0' COMMENT '过期时间',
PRIMARY KEY (`id`),
KEY `company_id` (`company_id`) USING BTREE,
KEY `relation_game_id` (`relation_game_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='推广游戏分成比例';
CREATE TABLE `tab_company_game_ratio_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`company_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广公司id',
`relation_game_id` int(11) NOT NULL DEFAULT '0' COMMENT '关联游戏id',
`ratio` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '分成比例',
5 years ago
`turnover_ratio` varchar(2000) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '流水分成比例',
`last_ratio` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '上次的分成比例',
5 years ago
`last_turnover_ratio` varchar(2000) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '上次流水分成比例',
`begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '开始时间',
`end_time` int(11) NOT NULL DEFAULT '0' COMMENT '过期时间',
5 years ago
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
`status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '审核状态:-2管理员拒绝 -1市场部拒绝 0-待审核 1-市场部通过 2管理员通过',
`verify_log` varchar(2000) COLLATE utf8mb4_bin NOT NULL COMMENT '审核详细信息',
PRIMARY KEY (`id`),
KEY `company_id` (`company_id`) USING BTREE,
KEY `status` (`status`) USING BTREE,
KEY `relation_game_id` (`relation_game_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='推广游戏分成比例申请记录';
CREATE TABLE `tab_company_relation` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`first_company_id` int(11) NOT NULL DEFAULT '0' COMMENT '甲方公司id',
`first_company_name` varchar(200) NOT NULL DEFAULT '' COMMENT '甲方公司名称',
`first_company_type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '0己方,1上游cp,2联运下游',
`second_company_id` int(11) NOT NULL DEFAULT '0' COMMENT '乙方公司id',
`second_company_name` varchar(200) NOT NULL DEFAULT '' COMMENT '乙方公司名称',
`second_company_type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '0己方,1上游cp,2联运下游',
`settlement_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '结算类型1-周结 2-月结',
`invoice_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '结算类型1-专票 2-普票',
`invoice_content` varchar(200) NOT NULL DEFAULT '' COMMENT '开票内容',
`is_payment` tinyint(3) NOT NULL DEFAULT '1' COMMENT '是否需要打款1-是 2-否(线下)',
`collection` tinyint(2) DEFAULT '1' COMMENT '1甲方收款 2乙方收款',
PRIMARY KEY (`id`),
KEY `first_company_id` (`first_company_id`) USING BTREE,
KEY `second_company_id` (`second_company_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='公司关系绑定';
CREATE TABLE `tab_company_relation_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`first_company_id` int(11) NOT NULL DEFAULT '0' COMMENT '甲方公司id',
`first_company_name` varchar(200) NOT NULL DEFAULT '' COMMENT '甲方公司名称',
`first_company_type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '0己方,1上游cp,2联运下游',
`second_company_id` int(11) NOT NULL DEFAULT '0' COMMENT '乙方公司id',
`second_company_name` varchar(200) NOT NULL DEFAULT '' COMMENT '乙方公司名称',
`second_company_type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '0己方,1上游cp,2联运下游',
`settlement_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '结算类型1-周结 2-月结',
`invoice_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '结算类型1-专票 2-普票',
`invoice_content` varchar(200) NOT NULL DEFAULT '' COMMENT '开票内容',
`is_payment` tinyint(3) NOT NULL DEFAULT '1' COMMENT '是否需要打款1-是 2-否(线下)',
`collection` tinyint(2) DEFAULT '1' COMMENT '1甲方收款 2乙方收款',
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '备注',
`status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '审核状态:-2管理员拒绝 -1市场部拒绝 0-待审核 1-市场部通过 2管理员通过',
`verify_log` varchar(2000) COLLATE utf8mb4_bin NOT NULL COMMENT '审核详细信息',
PRIMARY KEY (`id`),
KEY `first_company_id` (`first_company_id`) USING BTREE,
KEY `second_company_id` (`second_company_id`) USING BTREE,
KEY `settlement_type` (`settlement_type`) USING BTREE,
KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='公司关系绑定申请记录';
5 years ago
CREATE TABLE `tab_company_statement` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`withdraw_type` tinyint(2) DEFAULT '0' COMMENT '对账类型(0-周结 1月结 2补点)',
`company_id` int(11) DEFAULT '0' COMMENT '对账公司id',
`company_name` varchar(60) NOT NULL DEFAULT '' COMMENT '对账公司名称',
5 years ago
`company_belong` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会归属0-下游内团1-下游外团 2-下游分发联盟 3 下游无9:上游',
`company_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '公司性质1-公司 2-个人',
5 years ago
`is_payment` tinyint(3) NOT NULL DEFAULT '1' COMMENT '是否需要打款1-是 2-否(线下)',
5 years ago
`statement_begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账开始时间',
`statement_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间',
`statement_money` decimal(10,2) DEFAULT '0.00' COMMENT '对账金额',
5 years ago
`pay_amount` decimal(10,2) DEFAULT '0.00' COMMENT '总计',
`platform_amount` decimal(10,2) DEFAULT '0.00' COMMENT '平台流水金额',
5 years ago
`verify_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '审核状态 -2:汇总驳回 -1审批拒绝 0:系统生成 1:审核通过 2:对外发起 3:合作确认 4:汇总',
5 years ago
`verify_log` text NOT NULL COMMENT '审批相关信息json',
5 years ago
`pay_type` tinyint(2) DEFAULT '0' COMMENT '1甲方收款;2乙方收款',
5 years ago
`first_party_info` text NOT NULL COMMENT '甲方相关信息json',
`second_party_info` text NOT NULL COMMENT '乙方相关信息json',
`statement_info` text NOT NULL COMMENT '订单相关信息json',
5 years ago
`op_time` int(11) NOT NULL DEFAULT '0' COMMENT '操作时间',
5 years ago
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
5 years ago
PRIMARY KEY (`id`),
KEY `withdraw_type` (`withdraw_type`) USING BTREE,
KEY `company_id` (`company_id`) USING BTREE,
KEY `statement_begin_time` (`statement_begin_time`) USING BTREE,
KEY `statement_end_time` (`statement_end_time`) USING BTREE,
KEY `verify_status` (`verify_status`) USING BTREE,
KEY `op_time` (`op_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='聚合上游联运上下游对账单';
5 years ago
CREATE TABLE `tab_company_statement_pool` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
5 years ago
`statement_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '结算批量单号',
`statement_ids` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '涉及的结算单id',
5 years ago
`withdraw_type` tinyint(2) DEFAULT '3' COMMENT '对账类型(0-周结 1月结 2补点 3无)',
5 years ago
`create_lack_ids` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '生成的lackid',
`del_lack_ids` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '合并计算的lackid',
5 years ago
`statement_begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账开始时间',
`statement_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间',
`statement_money` decimal(10,2) DEFAULT '0.00' COMMENT '对账金额',
`lack_statement_money` decimal(10,2) DEFAULT '0.00' COMMENT '不结算金额',
5 years ago
`pay_amount` decimal(10,2) DEFAULT '0.00' COMMENT '总计',
`platform_amount` decimal(10,2) DEFAULT '0.00' COMMENT '平台流水金额',
`lack_platform_amount` decimal(10,2) DEFAULT '0.00' COMMENT '不结算平台流水金额',
5 years ago
`fine` decimal(10,2) DEFAULT '0.00' COMMENT '罚款',
`reward` decimal(10,2) DEFAULT '0.00' COMMENT '奖励',
5 years ago
`online_money` decimal(10,2) DEFAULT '0.00' COMMENT '成功支付金额',
`withdraw_money` decimal(10,2) DEFAULT '0.00' COMMENT '提现成功金额',
5 years ago
5 years ago
`verify_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '审核状态 -2:打款失败 -1审批拒绝 0:未审批 1:审核通过 2:待打款 3:打款中 4:打款成功',
5 years ago
`verify_log` text NOT NULL COMMENT '审批相关信息json',
5 years ago
`ext_file` text COMMENT '凭证地址',
5 years ago
`company_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '公司性质: 1-下游公司 2-下游个人 3上游公司',
`is_payment` tinyint(3) NOT NULL DEFAULT '1' COMMENT '是否需要打款1-是 2-否(线下)',
5 years ago
`op_time` int(11) NOT NULL DEFAULT '0' COMMENT '操作时间',
5 years ago
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
5 years ago
PRIMARY KEY (`id`),
5 years ago
KEY `statement_num` (`statement_num`) USING BTREE,
5 years ago
KEY `statement_begin_time` (`statement_begin_time`) USING BTREE,
5 years ago
KEY `statement_end_time` (`statement_end_time`) USING BTREE,
KEY `verify_status` (`verify_status`) USING BTREE,
KEY `op_time` (`op_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='对账单汇总';
5 years ago
CREATE TABLE `tab_company_statement_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`pool_id` int(11) NOT NULL COMMENT '汇总单id',
`company_id` int(11) DEFAULT '0' COMMENT '对账公司id',
`company_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '公司性质: 1-下游公司 2-下游个人 3上游公司',
5 years ago
`company_name` varchar(60) NOT NULL DEFAULT '' COMMENT '对账公司名称',
5 years ago
`company_info` text NOT NULL COMMENT '公司其他信息json',
5 years ago
`statement_money` decimal(10,2) DEFAULT '0.00' COMMENT '对账金额',
`pay_amount` decimal(10,2) DEFAULT '0.00' COMMENT '总计',
`platform_amount` decimal(10,2) DEFAULT '0.00' COMMENT '平台流水金额',
`fine` decimal(10,2) DEFAULT '0.00' COMMENT '罚款',
`reward` decimal(10,2) DEFAULT '0.00' COMMENT '奖励',
`statement_begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账开始时间',
`statement_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间',
`statement_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '结算单号',
5 years ago
`statement_info` text NOT NULL COMMENT '订单相关信息json',
`verify_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '验证状态 -1:配置信息不全 0:信息未确认 1:允许打款 2:线下无需打款',
`pay_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '打款状态 -1:打款失败 0:未打款 1:打款成功',
5 years ago
`pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付完成时间',
`pay_type` tinyint(2) NOT NULL DEFAULT '0' COMMENT '打款类型 1提现 2线上打款 3线下打款',
`pay_info` text COMMENT '打款信息',
5 years ago
5 years ago
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
5 years ago
PRIMARY KEY (`id`),
KEY `company_tid` (`company_id`,`company_type`) USING BTREE,
KEY `statement_begin_time` (`statement_begin_time`) USING BTREE,
KEY `statement_end_time` (`statement_end_time`) USING BTREE,
KEY `pay_status` (`pay_status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='对账单汇总详情';
5 years ago
CREATE TABLE `tab_company_lack_statement_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`company_id` int(11) DEFAULT '0' COMMENT '对账公司id',
`company_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '公司性质: 1-下游公司 2-下游个人 3上游公司',
`company_name` varchar(60) NOT NULL DEFAULT '' COMMENT '对账公司名称',
5 years ago
`company_info` text NOT NULL COMMENT '公司其他信息json',
5 years ago
`statement_money` decimal(10,2) DEFAULT '0.00' COMMENT '对账金额',
`pay_amount` decimal(10,2) DEFAULT '0.00' COMMENT '总计',
`platform_amount` decimal(10,2) DEFAULT '0.00' COMMENT '平台流水金额',
`fine` decimal(10,2) DEFAULT '0.00' COMMENT '罚款',
`reward` decimal(10,2) DEFAULT '0.00' COMMENT '奖励',
`statement_begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账开始时间',
`statement_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间',
5 years ago
`statement_info` text NOT NULL COMMENT '订单相关信息json',
5 years ago
`statement_pool_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '生成此单的汇总单单号',
`is_payment` tinyint(3) NOT NULL DEFAULT '1' COMMENT '是否需要打款1-是 2-否(线下)',
`is_pool` tinyint(3) NOT NULL DEFAULT '0' COMMENT '是否被汇总:0否/1是',
5 years ago
PRIMARY KEY (`id`),
KEY `company_tid` (`company_id`,`company_type`) USING BTREE,
KEY `statement_begin_time` (`statement_begin_time`) USING BTREE,
KEY `statement_end_time` (`statement_end_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='未满足支付条件的公司信息';
-- zyx 20200515
INSERT INTO `tab_tool`( `name`, `title`, `config`, `template`, `type`, `status`, `create_time`) VALUES ('juhedata', '聚合数据', '{\"tpl_id\":\"215303\",\"key\":\"1aa07a33b6d6408e835e416fafcd6f22\",\"limit\":\"\",\"status\":\"1\"}', NULL, 1, 1, 1589361782);
INSERT INTO `tab_tool`( `name`, `title`, `config`, `template`, `type`, `status`, `create_time`) VALUES ('juhe_age', '聚合身份认证', '{\"appkey\":\"80427f4769c6938f12a870f51014ddbe\",\"status\":\"1\"}', NULL, 1, 1, 1464164373);
-- 推广规则限制 elf 20200615
CREATE TABLE `tab_promote_limit_rules` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`promote_id` int(11) NOT NULL COMMENT '会长ID',
`started_at` date DEFAULT NULL COMMENT '开始时间',
`ended_at` date DEFAULT NULL COMMENT '结束时间',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
5 years ago
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
ALTER TABLE `tab_forbit_ip`
ADD COLUMN `type` tinyint(2) NULL DEFAULT 0 COMMENT '类型 0美国ip白名单 1苹果第三方支付白名单 2 测试白名单' AFTER `remarks`;
ALTER TABLE `tab_forbit_ip`
ADD UNIQUE INDEX `userid_type`(`user_id`, `type`) COMMENT '用户id与类型唯一索引';
ALTER TABLE `tab_promote_company`
ADD COLUMN `develop_type` tinyint(2) NULL DEFAULT 0 COMMENT '1 自主开发 2 自主开发及维护 3 只维护' AFTER `company_belong`;
ALTER TABLE `tab_forbit_ip`
ADD COLUMN `type` tinyint(2) NULL DEFAULT 0 COMMENT '类型 0美国ip白名单 1苹果第三方支付白名单' AFTER `remarks`;
ALTER TABLE `tab_forbit_ip`
5 years ago
ADD UNIQUE INDEX `userid_type`(`user_id`, `type`) COMMENT '用户id与类型唯一索引';
ALTER TABLE `tab_promote`
ADD COLUMN `withdraw_show` tinyint(2) NOT NULL DEFAULT 0 COMMENT '推广员提现查看权限 1 有 0 无' AFTER `group_remark`,
5 years ago
ADD COLUMN `withdraw_done` tinyint(2) NOT NULL DEFAULT 0 COMMENT '推广员提现查看权限 1 有 0 无' AFTER `withdraw_show`;
CREATE TABLE `tab_tasks` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`type` varchar(20) COLLATE utf8mb4_bin NOT NULL COMMENT '类型',
`params` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '参数',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态 0 待处理 1 处理中 2 处理成功 3 处理失败 ',
`result` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '处理结果',
`start_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '处理开始时间',
`end_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '处理结束时间',
`created_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
CREATE TABLE `tab_market_shift` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`promote_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '会长ID',
`from_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '原市场专员ID',
`to_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '市场专员ID',
`split_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '切割时间',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态 0 待处理 1 处理成功 2 处理失败 ',
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
`creator_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建者',
`created_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
ALTER TABLE `tab_deposit` add column `market_admin_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '市场专员ID' after promote_account;
5 years ago
ALTER TABLE `tab_spend` add column `market_admin_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '市场专员ID' after promote_account;
5 years ago
--
ALTER TABLE `tab_promote_company`
5 years ago
ADD COLUMN `service_agreement_show` int(11) UNSIGNED NOT NULL DEFAULT 1 COMMENT '展示状态 1展示 2不展示',
ADD COLUMN `marketing_director_show` tinyint(1) UNSIGNED NOT NULL DEFAULT 2 COMMENT '市场总结展示 1展示 2不展示';
5 years ago
--
CREATE TABLE `tab_service_agreement` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '协议标题',
5 years ago
`content` longtext COLLATE utf8mb4_bin,
5 years ago
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态 1正常 2删除',
`creator` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建者',
`created_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`)
5 years ago
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
INSERT INTO `tab_service_agreement` (`id`, `name`, `content`, `status`, `creator`, `created_time`) VALUES ('1', '默认模板', '<p>\r\n <br />\r\n</p>\r\n<h2 style=\"text-align:center;font-family:;\">\r\n 游戏推广服务框架协议\r\n</h2>\r\n<p style=\"text-align:left;\">\r\n <span style=\"font-family:\" font-size:medium;\"=\"\"> </span> \r\n</p>\r\n<blockquote>\r\n 本协议由以下双方于{time}签订:<br />\r\n合同编号{sn}<br />\r\n甲方海南万盟天下科技有限公司<br />\r\n注册地址海南省海口市南海大道26号海口国家高新区创业孵化中心A楼5层A1-1268室<br />\r\n联系电话13067391751<br />\r\n联系人雷丽华<br />\r\n邮箱号383166987@qq.com<br />\r\n乙方{realname}<br />\r\n注册地址{address}<br />\r\n联系电话{phone}<br />\r\n联系人{realname}<br />\r\n邮箱号{email}<br />\r\n&nbsp; &nbsp; &nbsp; 经甲乙双方协商一致,在平等互利的基础上,就乙方推广甲方拥有知识产权 或合法授权的游戏(以下简称“产品”)达成如下协议:<br />\r\n1 合作内容及合作期限<br />\r\n&nbsp; &nbsp; &nbsp; 1.1合作内容:在双方合作期间,乙方以正规合法途径推广甲方拥有知识产 权或合法授权的游戏产品,为甲方产品导入用户,甲方根据乙方导入用户产生的 消费向乙方支付推广服务费。<br />\r\n&nbsp; &nbsp; &nbsp; 1.2本协议有效期自{time}起至{endTime}止。<br />\r\n&nbsp; &nbsp; &nbsp; 1.3本协议为甲乙双方之间推广服务的框架性协议,具体合作游戏的付费金 额、渠道等未尽事宜详见双方签订的附件《游戏推广服务协议》,甲乙双方在合 作期限内签订的所有附件《游戏推广服务协议》均为本框架协议的组成部分。乙方使用甲方的合作渠道应当严格遵守合作渠道已经发布的或将来可能发布或修 订的各种规则制度、条款、帮助、提示文档等规定,若乙方有存在违反的行为乙 方愿意接受该规定的处理措施合作渠道中新发布或修订的内容经本协议8.3 条通知送达后若乙方未按照8.3条提出异议并停止使用合作渠道的,视为乙方接 受并同意遵守合作渠道发布的内容,关于异议部分双方无法协商一致的,甲方有 权单方终止本协议。附件《游戏推广服务协议》或本框架协议组成部分与本框架 协议约定不符的,以最新签订的《游戏推广服务协议》或协议为准。<br />\r\n2 甲方的权利及义务<br />\r\n&nbsp; &nbsp; &nbsp; 2.1甲方负责合作产品内容及运营的合法性。<br />\r\n&nbsp; &nbsp; &nbsp; 2.2甲方负责维护各推广渠道的产品的内容更新;甲方负责产品内容及其传 播的合法性、适当性。甲方承诺其享有提供给乙方的全部产品内容及其组成部分 的相关知识产权等权利或有合法授权。<br />\r\n3 乙方的权利及义务<br />\r\n&nbsp; &nbsp; &nbsp; 3.1乙方需利用自身资源将潜在用户导入到甲方提供的游戏系统内,推广甲 方的产品,提升甲方产品的付费用户的导入,对于甲方产品以外的推广,甲方将 不予支付推广服务费。<br />\r\n&nbsp; &nbsp; &nbsp; 3.2乙方应自行负责并保证其组织、推广活动的合法性,乙方组织、推广甲 方产品活动不得有虚假或者引人误解的内容,不得进行不正当竞争行为,不得欺 骗、误导玩家,不得损害甲方商誉或侵害任何第三方合法权益等行为。<br />\r\n&nbsp; &nbsp; &nbsp; 3.3乙方违反3.2条规定引发的一切争议、责任由乙方自行负责处理、承担, 与甲方无关;若因此损害甲方声誉的或造成甲方损失的,乙方应承担赔偿责任。 若甲方发现乙方违反3.2条规定,甲方有权暂停结算,因此引起的一切纠纷和责 任均由乙方承担,甲方有权直接从任何应支付给乙方的款项中直接扣除,并且甲 方有权立即终止本协议。<br />\r\n&nbsp; &nbsp; &nbsp; 3.4乙方保证其推
5 years ago
--20200629 cz
ALTER TABLE `tab_company_info`
ADD COLUMN `ali_account` varchar(128) NULL COMMENT '支付宝账号' AFTER `last_up_time`,
ADD COLUMN `fax_ratio` varchar(20) NULL COMMENT '开票税率' AFTER `ali_account`;
--20200630 cz
ALTER TABLE `tab_promote_company`
5 years ago
ADD COLUMN `game_ids` varchar(300) NOT NULL DEFAULT '' COMMENT '可申请游戏 空值表示没有' AFTER `marketing_director_show`;
ALTER TABLE `tab_partner`
ADD COLUMN `validity_start_time` int(11) NOT NULL DEFAULT 0 COMMENT '生效开始时间' AFTER `company_type`,
ADD COLUMN `validity_end_time` int(11) NOT NULL DEFAULT 0 COMMENT '生效结算时间' AFTER `validity_start_time`,
ADD COLUMN `reg_address` varchar(255) NULL DEFAULT NULL COMMENT '注册地址' AFTER `validity_end_time`,
ADD COLUMN `reg_phone` varchar(24) NULL DEFAULT NULL COMMENT '注册电话' AFTER `reg_address`,
ADD COLUMN `has_advance_charge` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否有预付款 1是 0否' AFTER `reg_phone`,
ADD COLUMN `has_server_fee` tinyint(1) NOT NULL DEFAULT 0 COMMENT '承担服务费1是 0否' AFTER `has_advance_charge`,
ADD COLUMN `server_fee` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '服务器费用' AFTER `has_server_fee`,
ADD COLUMN `cooperation_status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '合作关系1合作中 0暂停合作' AFTER `server_fee`;
ALTER TABLE `tab_partner`
5 years ago
MODIFY COLUMN `settlement_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '结算方式(作废,请查看tab_company_relation表)' AFTER `is_sign_contract`;
ALTER TABLE `sys_shift_task`
5 years ago
ADD COLUMN `change_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '推广员充值换榜执行状态 0 未处理 1 已处理' AFTER `status`;
--CP cz
ALTER TABLE `tab_partner`
ADD COLUMN `taxation_rate` decimal(5,3) NOT NULL DEFAULT '0.00' COMMENT '税费费率' AFTER `cooperation_status`;
CREATE TABLE `tab_partner_verify` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`partner_id` int(11) NOT NULL COMMENT '0新增,其他修改',
`partner_name` varchar(60) NOT NULL DEFAULT '' COMMENT '上游公司名称',
`partner_info` text COMMENT '公司信息',
`verify_status` tinyint(3) DEFAULT '0' COMMENT '状态 -1拒绝 0未审核 1审核通过',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '操作时间',
`verify_log` text COMMENT '审批相关信息json',
PRIMARY KEY (`id`),
KEY `partner_id` (`partner_id`) USING BTREE,
KEY `partner_name` (`partner_name`) USING BTREE,
KEY `verify_status` (`verify_status`) USING BTREE
5 years ago
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='CP公司审核';
-- 新增推广公司字段及审核
ALTER TABLE `tab_promote_company`
ADD COLUMN `validity_start_time` int(11) NOT NULL DEFAULT 0 COMMENT '生效开始时间' AFTER `company_type`,
ADD COLUMN `validity_end_time` int(11) NOT NULL DEFAULT 0 COMMENT '生效结算时间' AFTER `validity_start_time`,
ADD COLUMN `reg_address` varchar(255) NULL DEFAULT NULL COMMENT '注册地址' AFTER `validity_end_time`,
ADD COLUMN `reg_phone` varchar(24) NULL DEFAULT NULL COMMENT '注册电话' AFTER `reg_address`,
ADD COLUMN `has_ratio` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否有比例增量 1是 0否' AFTER `reg_phone`,
ADD COLUMN `turnover_ratio` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '流水分成比例= turnover:流水,ratio:比例,instanceof:1>= || 2>' AFTER `has_ratio`,
ADD COLUMN `has_server_fee` tinyint(1) NOT NULL DEFAULT 0 COMMENT '承担服务费1是 0否' AFTER `turnover_ratio`,
ADD COLUMN `server_fee` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '服务器费用' AFTER `has_server_fee`,
ADD COLUMN `cooperation_status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '合作关系1合作中 0暂停合作' AFTER `server_fee`;
ALTER TABLE `tab_promote_company`
ADD COLUMN `taxation_rate` decimal(5,3) NOT NULL DEFAULT '0' COMMENT '税费费率' AFTER `cooperation_status`;
ALTER TABLE `tab_promote_company`
ADD COLUMN `channel_rate` decimal(5,2) NOT NULL DEFAULT '0' COMMENT '渠道费率' AFTER `taxation_rate`;
ALTER TABLE `tab_promote_company`
5 years ago
MODIFY COLUMN `contact_phone` varchar(24) NOT NULL DEFAULT '' COMMENT '联系电话' AFTER `settlement_contact`;
CREATE TABLE `tab_promote_company_verify` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`company_id` int(11) NOT NULL COMMENT '0新增,其他修改',
`company_name` varchar(60) NOT NULL DEFAULT '' COMMENT '上游公司名称',
`company_info` text COMMENT '公司信息',
`verify_status` tinyint(3) DEFAULT '0' COMMENT '状态 -1拒绝 0未审核 1审核通过',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '操作时间',
`verify_log` text COMMENT '审批相关信息json',
PRIMARY KEY (`id`),
KEY `company_id` (`company_id`) USING BTREE,
KEY `company_name` (`company_name`) USING BTREE,
KEY `verify_status` (`verify_status`) USING BTREE
5 years ago
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='推广公司审核';
CREATE TABLE `tab_excel_statement_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`batch_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '批次号',
`company_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '公司性质: 1-下游公司 2-下游个人 3上游公司',
`company_name` varchar(60) NOT NULL DEFAULT '' COMMENT '对账公司名称',
`company_info` text NOT NULL COMMENT '公司其他信息json',
`statement_money` decimal(10,2) DEFAULT '0.00' COMMENT '对账金额',
`platform_amount` decimal(10,2) DEFAULT '0.00' COMMENT '平台流水金额',
`fine` decimal(10,2) DEFAULT '0.00' COMMENT '罚款',
`reward` decimal(10,2) DEFAULT '0.00' COMMENT '奖励',
`statement_begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账开始时间',
`statement_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间',
`statement_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '结算单号',
`statement_info` text NOT NULL COMMENT '订单相关信息json',
`pay_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '打款状态 -1:打款失败 0:未打款 1:打款成功',
`pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付完成时间',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '生成时间',
`pay_info` text COMMENT '打款信息',
`document_maker` varchar(255) DEFAULT '' COMMENT '制单信息',
`payment_user` varchar(255) DEFAULT '' COMMENT '打款基础信息',
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
PRIMARY KEY (`id`),
KEY `batch_num` (`batch_num`) USING BTREE,
KEY `statement_begin_time` (`statement_begin_time`) USING BTREE,
KEY `statement_end_time` (`statement_end_time`) USING BTREE,
KEY `pay_status` (`pay_status`) USING BTREE
5 years ago
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='exce汇总单';
-- zyx 20200629
ALTER TABLE `sys_member`
ADD COLUMN `real_name` varchar(255) NULL DEFAULT '' COMMENT '真实姓名' AFTER `status`;
CREATE TABLE `tab_settleup_marketorder` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pay_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '' COMMENT '月份时间',
`company_id` int(11) NULL DEFAULT 0 COMMENT '公司id',
`promote_id` int(11) NULL DEFAULT 0 COMMENT '推广员id',
`promote_account` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '' COMMENT '推广员账号',
`company_belong` tinyint(2) NULL DEFAULT 0 COMMENT '工会归属0-内团1-外团 2-分发联盟 3 无',
`develop_type` tinyint(2) NULL DEFAULT 0 COMMENT '开发类型 1 自主开发 2 自主开发及维护 3 只维护',
`game_id` int(11) NULL DEFAULT 0 COMMENT '游戏id',
`game_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '游戏名称',
`relation_game_id` int(11) NULL DEFAULT 0 COMMENT '关联游戏id',
`pay_amount` decimal(13, 2) NOT NULL DEFAULT 0.00 COMMENT '总流水',
`real_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '' COMMENT '市场专员姓名',
`admin_id` int(11) NULL DEFAULT 0 COMMENT '市场专员id',
`cp_amount` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '上游结算流水',
`promote_amount` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '下游结算流水',
`channel_amount` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '支付渠道费用',
`company_tax` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '公司税费',
`company_profit` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '毛利',
`sdk_version` tinyint(2) NULL DEFAULT 1 COMMENT '设备类型 1 安卓 2 ios',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
CREATE TABLE `tab_market_altogether` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pay_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '' COMMENT '时间月份记录',
`real_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '' COMMENT '管理员姓名',
`admin_id` int(11) NULL DEFAULT NULL COMMENT '管理员id',
`nickname` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '' COMMENT '管理员账号',
`level` tinyint(2) NULL DEFAULT 0 COMMENT '级别21:初级 11:中级 12:高级',
`pay_amount` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '总流水',
`extend_commission` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '已发放金额',
`wait_commission` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '待发放金额',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '' COMMENT '备注',
`create_time` int(11) NULL DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
5 years ago
INSERT INTO `tab_tool`(`id`, `name`, `title`, `config`, `type`, `status`) VALUES (59, 'tax_radio', '公司税费', '{"tax_radio":1.5,"time":1589361782}', 1, 1)
5 years ago
--20200709 chenzhi
CREATE TABLE `tab_payment_member` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID',
`real_name` varchar(255) DEFAULT '' COMMENT '真实姓名',
`mobile` char(11) NOT NULL COMMENT '手机号码',
`last_login_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后登录时间',
PRIMARY KEY (`id`),
5 years ago
KEY `mobile` (`mobile`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='打款登陆账号';
5 years ago
INSERT INTO `tab_payment_member` (`id`, `real_name`, `mobile`, `last_login_time`) VALUES ('1', '胡歌', '18959188422', '0')
--chenzhi
ALTER TABLE `tab_game`
ADD COLUMN `select_package_name` tinyint(2) NOT NULL DEFAULT 0 COMMENT '结算包名 0:原包名 1:现包名' AFTER `original_package_name`;
--chenzhi
CREATE TABLE `tab_company_statement` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`withdraw_type` tinyint(2) DEFAULT '0' COMMENT '对账类型(0-周结 1月结 2补点)',
`company_id` int(11) DEFAULT '0' COMMENT '对账公司id',
`company_name` varchar(60) NOT NULL DEFAULT '' COMMENT '对账公司名称',
`company_belong` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会归属0-下游内团1-下游外团 2-下游分发联盟 3 下游无9:上游',
`company_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '公司性质1-公司 2-个人',
`is_payment` tinyint(3) NOT NULL DEFAULT '1' COMMENT '是否需要打款1-是 2-否(线下)',
`statement_begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账开始时间',
`statement_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间',
`statement_money` decimal(10,2) DEFAULT '0.00' COMMENT '对账金额',
`pay_amount` decimal(10,2) DEFAULT '0.00' COMMENT '总计',
`platform_amount` decimal(10,2) DEFAULT '0.00' COMMENT '平台流水金额',
`verify_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '审核状态 -2:汇总驳回 -1审批拒绝 0:系统生成 1:审核通过 2:对外发起 3:合作确认 4:汇总',
`verify_log` text NOT NULL COMMENT '审批相关信息json',
`pay_type` tinyint(2) DEFAULT '0' COMMENT '1甲方收款;2乙方收款',
`first_party_info` text NOT NULL COMMENT '甲方相关信息json',
`second_party_info` text NOT NULL COMMENT '乙方相关信息json',
`statement_info` text NOT NULL COMMENT '订单相关信息json',
`op_time` int(11) NOT NULL DEFAULT '0' COMMENT '操作时间',
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
PRIMARY KEY (`id`),
KEY `withdraw_type` (`withdraw_type`) USING BTREE,
KEY `company_id` (`company_id`) USING BTREE,
KEY `statement_begin_time` (`statement_begin_time`) USING BTREE,
KEY `statement_end_time` (`statement_end_time`) USING BTREE,
KEY `verify_status` (`verify_status`) USING BTREE,
KEY `op_time` (`op_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='聚合上游联运上下游对账单';
ALTER TABLE `tab_company_statement`
ADD COLUMN `confirm_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '确认状态 0:未处理 1:发起 2审核' AFTER `verify_log`;
ALTER TABLE `tab_company_statement`
ADD COLUMN `confirm_log` text COMMENT '确认信息' AFTER `confirm_status`;
5 years ago
ALTER TABLE `tab_company_statement`
MODIFY COLUMN `verify_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '审核状态 -3:汇总驳回 -2:审核拒绝 -1管理员审批拒绝 0:系统生成 1:管理员审核通过 2:审核通过 3:汇总' AFTER `platform_amount`;