|
|
|
|
|
-- 推广员后台首页快捷菜单 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');
|
|
|
|
|
|
-- 2019-10-01 by elf
|
|
|
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
|
|
|
-- ----------------------------
|
|
|
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
|
|
|
-- ----------------------------
|
|
|
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`)
|
|
|
) 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
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='测试资源申请';
|
|
|
|
|
|
-- 2019-10-09 by elf
|
|
|
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';
|
|
|
alter table tab_user_play_info add column `create_device_number` varchar(50) NOT NULL DEFAULT '' COMMENT '角色创建设备号';
|
|
|
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`)
|
|
|
) ENGINE=MyISAM AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
|
|
|
|
|
-- 增加用户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`;
|
|
|
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 '父类名称',
|
|
|
`root_id` int(11) DEFAULT 0 COMMENT '根ID',
|
|
|
`root_name` varchar(30) DEFAULT NULL 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 `count_date` (`count_date`) USING BTREE
|
|
|
) 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 '内充流水',
|
|
|
`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 `parent_id` (`parent_id`) USING BTREE,
|
|
|
KEY `count_date` (`count_date`) USING BTREE
|
|
|
) 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`;
|
|
|
|
|
|
--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`;
|
|
|
|
|
|
-- 2019-11-06 chenzhi
|
|
|
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='游戏流水聚合表';
|
|
|
|
|
|
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='流水月份聚合表';
|
|
|
|
|
|
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 '平台币流水',
|
|
|
`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 `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`;
|
|
|
|
|
|
-- 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`
|
|
|
ADD COLUMN `bind_coin_count` decimal(10,2) NULL DEFAULT 0.00 COMMENT '绑定币消耗' AFTER `balance_coin_count`;
|
|
|
|
|
|
-- 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`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
|
|
|
|
|
|
-- 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;
|
|
|
|
|
|
-- 2019-11-07 elf 迁移任务
|
|
|
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`
|
|
|
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;
|
|
|
|
|
|
-- 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`);
|
|
|
ALTER TABLE `tab_spend` ADD INDEX `search`(`promote_id`, `game_id`, `server_id`, `pay_way`, `pay_status`, `pay_time`);
|
|
|
|
|
|
|
|
|
-- 添加登录日统计表
|
|
|
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;
|
|
|
--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`,
|
|
|
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 '单日活跃总计',
|
|
|
`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 '单日付费用户总计',
|
|
|
`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='首页折线图静态数据';
|
|
|
|
|
|
-- 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;
|
|
|
|
|
|
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;
|
|
|
|
|
|
-- 身份证认证信息
|
|
|
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='身份证认证信息';
|
|
|
|
|
|
-- 公告已读表
|
|
|
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';
|
|
|
|
|
|
-- 推广员添加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
|
|
|
('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 );
|
|
|
|
|
|
-- 修改迁移
|
|
|
ALTER TABLE `tab_mend`
|
|
|
ADD COLUMN `order_time` int(11) NOT NULL DEFAULT 0 COMMENT '订单时间' AFTER `remark`;
|
|
|
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`;
|
|
|
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虚拟';
|
|
|
|
|
|
--游戏评分字段改为保留小数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`)
|
|
|
) 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');
|
|
|
|
|
|
--游戏表新增字段-落地页视频 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-不置顶';
|
|
|
|
|
|
-- 新旧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='合服游戏区服表';
|
|
|
|
|
|
-- 用户行为 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苹果 ';
|
|
|
ALTER TABLE `tab_pay_info` ADD COLUMN `promote_account` varchar(30) DEFAULT '' COMMENT '推广员账号';
|
|
|
|
|
|
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`;
|
|
|
-- 默认值处理 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`;
|
|
|
|
|
|
-- 苹果内购 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 '落地页视频封面';
|
|
|
|
|
|
--2019-12-11 超级签新增充值方式 chenzhi
|
|
|
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;
|
|
|
|
|
|
-- 超级签统计菜单
|
|
|
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`
|
|
|
ADD COLUMN `data_president` longtext NULL COMMENT '会长数据' AFTER `data_empower_type`;
|
|
|
|
|
|
-- user_play 增加create_time
|
|
|
ALTER TABLE `platform_pre1218`.`tab_user_play`
|
|
|
ADD COLUMN `create_time` int(11) NOT NULL COMMENT '创建时间' AFTER `check_money`;
|
|
|
|
|
|
-- 推广员表加入推广公司字段 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='推广公司';
|
|
|
-- 推广员表新增推广公司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='推广公司';
|
|
|
|
|
|
|
|
|
-- 菜单(推广公司录入)有个变量,所以后面几句要一起执行 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);
|
|
|
|
|
|
CREATE TABLE `tab_player_retention` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`user_id` int(11) not null COMMENT '用户ID',
|
|
|
`game_id` int(11) NOT NULL COMMENT '游戏ID',
|
|
|
`player_id` int(11) NOT NULL COMMENT '玩家ID',
|
|
|
`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`),
|
|
|
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 '玩家注册时间';
|
|
|
|
|
|
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`
|
|
|
ADD COLUMN `event_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '事件是否通知';
|
|
|
|
|
|
-- 菜单添加补单记录
|
|
|
INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) VALUES ('补单记录管理', 137, 0, 'BehaviorLog/singleSupplement', 0, '', '游戏订单', 0, 1);
|
|
|
|
|
|
|
|
|
-- 增加通知到账 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`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='通知到账补单';
|
|
|
|
|
|
ALTER TABLE `tab_game`
|
|
|
ADD COLUMN `beta_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Beta版状态';
|
|
|
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-外团';
|
|
|
ALTER TABLE tab_promote add `company_relation` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会关系:0-自主开发及维护;1-只维护';
|
|
|
-- 游戏的合作方新增联系人,联系电话,邮寄地址,公司税号,收款方名称,银行账号,开户行 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`;
|
|
|
|
|
|
-- 推广公会归属管理 2020-1-1 刘伟文
|
|
|
CREATE TABLE `tab_promote_belong` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`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,
|
|
|
`approver_id` int(11) NOT NULL DEFAULT '0' COMMENT '确认人(后台管理员)id',
|
|
|
`approver_name` varchar(30) DEFAULT NULL,
|
|
|
`applicant_time` int(11) DEFAULT '0' COMMENT '申请时间',
|
|
|
`update_time` int(11) DEFAULT '0' COMMENT '修改时间',
|
|
|
`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/公会对账单';
|
|
|
|
|
|
-- 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`;
|
|
|
|
|
|
-- 2020 01-07 cxj
|
|
|
ALTER TABLE `tab_withdraw`
|
|
|
ADD COLUMN `game_ratio` varchar(5000) NOT NULL COMMENT '游戏提现实际分成比例';
|
|
|
|
|
|
ALTER TABLE `tab_withdraw`
|
|
|
MODIFY COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '结算类型:1-周结 2-月结 9-其他';
|
|
|
|
|
|
|
|
|
-- 新增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类型';
|
|
|
|
|
|
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 '游戏提现实际分成比例';
|
|
|
|
|
|
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
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
|
|
|
|
-- 平台规则
|
|
|
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;
|
|
|
|
|
|
--会长设置推广配置--
|
|
|
|
|
|
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 '工会授权游戏';
|
|
|
|
|
|
--游戏会长申请权限--
|
|
|
ALTER TABLE `tab_game`
|
|
|
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 结算',
|
|
|
MODIFY COLUMN `selle_ratio` double(5, 2) DEFAULT 0.00 COMMENT '渠道分成比例';
|
|
|
|
|
|
|
|
|
ALTER TABLE `tab_game`
|
|
|
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;
|
|
|
|
|
|
-- 2020-02-10 yulingwei 奖罚记录
|
|
|
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 '事件内容',
|
|
|
`money` double(11,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '金额',
|
|
|
`reward_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '奖惩时间',
|
|
|
`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`)
|
|
|
) 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='内部公司信息';
|
|
|
|
|
|
|
|
|
-- 2020-02-10 liaojinling 会长押金
|
|
|
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`;
|
|
|
|
|
|
-- 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`;
|
|
|
|
|
|
--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格式';
|
|
|
ALTER TABLE tab_partner
|
|
|
ADD COLUMN `company_type` TINYINT (3) NOT NULL DEFAULT '1' COMMENT '公司性质:1-公司 2-个人';
|
|
|
|
|
|
|
|
|
-- 添加测试订单录入表 郑昌隆 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 预付款预警
|
|
|
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`)
|
|
|
) 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 '审核进度 1,2,3',
|
|
|
`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`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
|
|
|
|
--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 '新用户资源最高申请额度',
|
|
|
`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`)
|
|
|
) 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-非新用户';
|
|
|
|
|
|
--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
|
|
|
) 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;
|
|
|
|
|
|
-- 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 '评价分数',
|
|
|
`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]';
|
|
|
|
|
|
|
|
|
-- 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;
|
|
|
|
|
|
-- 2020-03-06 liaojinling
|
|
|
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='包下载记录表';
|
|
|
|
|
|
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`
|
|
|
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
|
|
|
) 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:渠道不符',
|
|
|
`order_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '1:游戏流水;2:平台币订单;0:未知',
|
|
|
`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,
|
|
|
KEY `compare_order_type` (`compare_id`,`order_type`,`pay_order_number`) USING BTREE,
|
|
|
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`;
|
|
|
|
|
|
--新增参数kv表 chenzhi 20200422
|
|
|
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储存表';
|
|
|
|
|
|
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地址');
|
|
|
|
|
|
--聚合渠道结算单 chenzhi 20200422
|
|
|
CREATE TABLE `tab_aggregate_statement` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
|
|
|
`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 '对账公司名称',
|
|
|
`link_phone` varchar(24) DEFAULT NULL COMMENT '对账公司联系人电话',
|
|
|
`begintime` int(11) NOT NULL DEFAULT '0' COMMENT '对账开始时间',
|
|
|
`endtime` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间',
|
|
|
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建对账单时间',
|
|
|
`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-乙方付给甲方,甲方收款)',
|
|
|
`ext_field` longtext COMMENT '凭证地址',
|
|
|
`first_party_info` longtext DEFAULT NULL COMMENT '甲方相关信息json',
|
|
|
`second_party_info` longtext DEFAULT NULL COMMENT '乙方相关信息json',
|
|
|
`statement_info` longtext NOT NULL COMMENT '订单相关信息json',
|
|
|
`admin_name` varchar(60) NOT NULL COMMENT '操作人名称',
|
|
|
`admin_id`int(11) DEFAULT '0' COMMENT '操作人id',
|
|
|
`verify_status` tinyint(2) DEFAULT '0' COMMENT '审核状态 -1审核拒绝 0:系统生成结算单 1:申请开票 2:审核同意 3:已开票 4:上传收款凭证 5已到账',
|
|
|
`remark` longtext DEFAULT NULL COMMENT '备注信息',
|
|
|
PRIMARY KEY (`id`),
|
|
|
KEY `withdraw_type` (`withdraw_type`) USING BTREE,
|
|
|
KEY `channel_id` (`channel_id`) USING BTREE,
|
|
|
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
|
|
|
--新增上游结算接口
|
|
|
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地址');
|
|
|
INSERT INTO `sys_kv` (`key`, `value`, `type`, `remark`) VALUES ('payment_check_mobile', '18959188422', 'string', '打款登陆验证手机');
|
|
|
|
|
|
--新增游戏分成模板
|
|
|
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 '分成比例',
|
|
|
`turnover_ratio` varchar(2000) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '流水分成比例',
|
|
|
`last_ratio` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '上次的分成比例',
|
|
|
`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 '过期时间',
|
|
|
`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='公司关系绑定申请记录';
|
|
|
|
|
|
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='聚合上游联运上下游对账单';
|
|
|
|
|
|
CREATE TABLE `tab_company_statement_pool` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
|
|
|
`statement_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '结算批量单号',
|
|
|
`statement_ids` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '涉及的结算单id',
|
|
|
`withdraw_type` tinyint(2) DEFAULT '3' COMMENT '对账类型(0-周结 1月结 2补点 3无)',
|
|
|
`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',
|
|
|
|
|
|
`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 '不结算金额',
|
|
|
`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 '不结算平台流水金额',
|
|
|
`fine` decimal(10,2) DEFAULT '0.00' COMMENT '罚款',
|
|
|
`reward` decimal(10,2) DEFAULT '0.00' COMMENT '奖励',
|
|
|
|
|
|
`online_money` decimal(10,2) DEFAULT '0.00' COMMENT '成功支付金额',
|
|
|
`withdraw_money` 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',
|
|
|
`ext_file` text COMMENT '凭证地址',
|
|
|
`company_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '公司性质: 1-下游公司 2-下游个人 3上游公司',
|
|
|
`is_payment` tinyint(3) NOT NULL DEFAULT '1' COMMENT '是否需要打款:1-是 2-否(线下)',
|
|
|
|
|
|
`op_time` int(11) NOT NULL DEFAULT '0' COMMENT '操作时间',
|
|
|
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
|
|
|
PRIMARY KEY (`id`),
|
|
|
KEY `statement_num` (`statement_num`) 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='对账单汇总';
|
|
|
|
|
|
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上游公司',
|
|
|
`company_name` varchar(60) NOT NULL DEFAULT '' COMMENT '对账公司名称',
|
|
|
`company_info` text NOT NULL COMMENT '公司其他信息json',
|
|
|
|
|
|
`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 '结算单号',
|
|
|
`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:打款成功',
|
|
|
`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 '打款信息',
|
|
|
|
|
|
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
|
|
|
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='对账单汇总详情';
|
|
|
|
|
|
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 '对账公司名称',
|
|
|
`company_info` text NOT NULL COMMENT '公司其他信息json',
|
|
|
|
|
|
`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_info` text NOT NULL COMMENT '订单相关信息json',
|
|
|
`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是',
|
|
|
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`)
|
|
|
) 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`
|
|
|
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`,
|
|
|
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;
|
|
|
ALTER TABLE `tab_spend` add column `market_admin_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '市场专员ID' after promote_account;
|
|
|
|
|
|
--合作公司新增展示状态
|
|
|
ALTER TABLE `tab_promote_company`
|
|
|
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不展示';
|
|
|
|
|
|
--插入默认的模板
|
|
|
|
|
|
CREATE TABLE `tab_service_agreement` (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`name` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '协议标题',
|
|
|
`content` longtext COLLATE utf8mb4_bin,
|
|
|
`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`)
|
|
|
) 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 经甲乙双方协商一致,在平等互利的基础上,就乙方推广甲方拥有知识产权 或合法授权的游戏(以下简称“产品”)达成如下协议:<br />\r\n1 合作内容及合作期限<br />\r\n 1.1合作内容:在双方合作期间,乙方以正规合法途径推广甲方拥有知识产 权或合法授权的游戏产品,为甲方产品导入用户,甲方根据乙方导入用户产生的 消费向乙方支付推广服务费。<br />\r\n 1.2本协议有效期自{time}起至{endTime}止。<br />\r\n 1.3本协议为甲乙双方之间推广服务的框架性协议,具体合作游戏的付费金 额、渠道等未尽事宜详见双方签订的附件《游戏推广服务协议》,甲乙双方在合 作期限内签订的所有附件《游戏推广服务协议》均为本框架协议的组成部分。乙方使用甲方的合作渠道应当严格遵守合作渠道已经发布的或将来可能发布或修 订的各种规则制度、条款、帮助、提示文档等规定,若乙方有存在违反的行为乙 方愿意接受该规定的处理措施,合作渠道中新发布或修订的内容经本协议8.3 条通知送达后若乙方未按照8.3条提出异议并停止使用合作渠道的,视为乙方接 受并同意遵守合作渠道发布的内容,关于异议部分双方无法协商一致的,甲方有 权单方终止本协议。附件《游戏推广服务协议》或本框架协议组成部分与本框架 协议约定不符的,以最新签订的《游戏推广服务协议》或协议为准。<br />\r\n2 甲方的权利及义务<br />\r\n 2.1甲方负责合作产品内容及运营的合法性。<br />\r\n 2.2甲方负责维护各推广渠道的产品的内容更新;甲方负责产品内容及其传 播的合法性、适当性。甲方承诺其享有提供给乙方的全部产品内容及其组成部分 的相关知识产权等权利或有合法授权。<br />\r\n3 乙方的权利及义务<br />\r\n 3.1乙方需利用自身资源将潜在用户导入到甲方提供的游戏系统内,推广甲 方的产品,提升甲方产品的付费用户的导入,对于甲方产品以外的推广,甲方将 不予支付推广服务费。<br />\r\n 3.2乙方应自行负责并保证其组织、推广活动的合法性,乙方组织、推广甲 方产品活动不得有虚假或者引人误解的内容,不得进行不正当竞争行为,不得欺 骗、误导玩家,不得损害甲方商誉或侵害任何第三方合法权益等行为。<br />\r\n 3.3乙方违反3.2条规定引发的一切争议、责任由乙方自行负责处理、承担, 与甲方无关;若因此损害甲方声誉的或造成甲方损失的,乙方应承担赔偿责任。 若甲方发现乙方违反3.2条规定,甲方有权暂停结算,因此引起的一切纠纷和责 任均由乙方承担,甲方有权直接从任何应支付给乙方的款项中直接扣除,并且甲 方有权立即终止本协议。<br />\r\n 3.4乙方保证其推广成果的真实有效,否则甲方有权利拒绝支付相应部分的 推广服务费。<br />\r\n 3.5未经甲方事先书面同意,乙方不得将本协议项下的任何权利或义务全部或部分转让、分包或委托给任何第三方,否则甲方有权随时提前终止本协议并追 究乙方的违约责任。甲方有权将本协议项下的任何权利或义务全部或部分转让给 其他公司,而无须另行征得乙方的同意。<br />\r\n4 结算方式<br />\r\n 4.1甲方按照乙方完成的每款产品推广付费金额支付服务费。乙方的推广服 务费=推广付费总金额×(乙方推广服务费比例+补点比例)×(1-税费费率), 每款产品推广服务费比例、税费费率、补点比例等由甲乙双方在《游戏推广服务 协议》中另行约定。<br />\r\n 4.2结算周期:按自然月进行结算,本协议合作期内合作游戏有效用户产生 的游戏运营收入后的次月前七个工作日内对账(如遇节假休息日则顺延),乙方 在甲方指定的后台核对乙方导入的付费总金额后申请结算(数据以甲方指定的后 台为准),甲方将上一月产生的属于乙方的合作分成费用款项向乙方分别出具结 算单,乙方在收到并确认甲方结算单后的5个工作日内,乙方在结算单加盖公章 (公章公司名称必须与协议公司名称完全一致)并向甲方开具等额发票,发票类 型为增值税专用发票(内容为信息服务费),发票抬头为“海南万盟天下科技有 限公司”,盖好章的结算单与发票一并交付给甲方。<br />\r\n 4.3推广服务费支付时间:甲方在收到乙方开具的正式发票及加盖公章的结 算单后5日内将双方确认的应结款项支付到协议约定的乙方账户号。(如遇节假 日或休息日则相应顺延,或者其他特殊情况应提前通知后可以延后打款,且甲方 无需支付滞纳金)<br />\r\n甲乙双方账户信息如下:\r\n <table style=\"color:#000000;font-family:;\">\r\n <tbody>\r\n <tr>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n </th>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n 甲方信息\r\n </th>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n 乙方信息\r\n </th>\r\n </tr>\r\n <tr>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n 纳税人识别号\r\n </th>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n 海南万盟天下科技有限公司\r\n </th>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n </th>\r\n </tr>\r\n <tr>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n 开户行\r\n </th>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n 中国工商银行股份有限公司 海口海德路支行\r\n </th>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n </th>\r\n </tr>\r\n <tr>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n 地址\r\n </th>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n 海南省海口市南海大道26号 海口国家高新区创业孵化中 心A楼5层A1-1268室\r\n </th>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n </th>\r\n </tr>\r\n <tr>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n 电话\r\n </th>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n 13067391751\r\n </th>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n </th>\r\n </tr>\r\n <tr>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n 银行账号\r\n </th>\r\n <th style=\"border:1px solid black;font-size:12px;text-align:center;\">\r\n 2201021709200030067\r\n </th>\r\n </tr>\r\n </tbody>\r\n </table>\r\n 4.4乙方不得擅自变更上述收款账户,如确需变更账户,乙方应当在变更前 书面通知甲方,经甲方同意后就变更账户事项双方另行签订补充或变更协议,协 议生效后变更账户方得以生效,否则甲方就乙方变更前的账户进行的所有支付均 视为乙方已收到甲方的支付款项,由乙方自行承担相应法律后果,乙方不得向甲 方再主张支付。<br />\r\n5 保密条款<br />\r\n 5.1未经对方书面许可或本协议另有约定,任何一方禁止向与履行本协议无 关的任何第三方或雇员泄露本协议的条款的任何内容以及本协议的签订及履行 情况,以及通过签订和履行本协议过程中获知的对方及对方关联公司或对方提供 的任何信息和数据资料。但确为本协议履行之必需任何一方(以下简称披露方) 可向其法律、会计、商业及其它顾问、授权雇员(统称“接收方代表”)披露前 述信息,披露前提是披露方须提前明确告知接收方代表关于本协议的保密义务, 接收方代表明确同意承担与本协议中所规定的保密义务相同或更严格的保密义 务,如果接收方代表违反保密义务的与披露方连带承担赔偿责任或违约责任。<br />\r\n 5.2本协议有效期内及终止后5年内,保密条款仍具有法律效力。如有违反, 违约方应承担由此给守约方造成的一切损失【包含一方因违约方的违约行为而遭 致的全部直接经济损失及任何可预期的间接损失及额外的费用(包括但不限于律 师费用、诉讼及仲裁费用、申请执行费用、财务费用及差旅费等详见本协议7.3 条)】或向守约方支付本协议项下双方结算的所有推广服务费合计金额五倍的违 约金。<br />\r\n 5.3未经对方事先书面许可,任何一方均不得就本协议发表任何公开声明。<br />\r\n6 不可抗力条款<br />\r\n 6.1不可抗力:如果出现不可抗力,双方在本协议中的义务在不可抗力影响 范围及其持续期间内将中止履行。合作期限可根据中止的期限而作相应延长,但 须双方协商一致。任何一方均不会因此而承担责任。声称遭受不可抗力的一方应 在不可抗力发生后不迟于十五(15)日内通知另一方,并随附经有关部门确认的不 可抗力书面证明,且应尽可能减少不可抗力所产生之损害。<br />\r\n 6.2本协议中的不可抗力是指无法预见、无法避免、无法克服、非任何一 方所能控制且使任何一方无法部分或完全履行本协议的地震、台风、火灾、水灾、 战争、罢工、暴动、黑客攻击、电信部门技术调整和政府管制、病毒侵袭、系统 故障或任何其它自然或人为造成的灾难和意外事件。<br />\r\n7 违约责任<br />\r\n 7.1除本协议另有约定外,任何一方直接或间接违反本协议的任何条款,或 不承担或不及时、充分地承担本协议项下其应承担的义务即构成违约行为,守约 方有权以书面通知要求违约方纠正其违约行为并采取充分、有效、及时的措施消 除违约后果,并赔偿守约方因违约方之违约行为而遭致的损失。若违约方在收到 守约方关于其违约行为的上述通知后10日内未纠正其违约行为,守约方有权以 书面通知的方式单方提前解除本协议,并追究违约方之违约责任。<br />\r\n 7.2经数据核对甲方认为乙方未按合作产品规则内容进行推广或未达到规 则要求的,甲方有权利单方面解除本协议,乙方应按照合作产品规定或约定标准 支付违约金,违约金不足以弥补给甲方造成损失的,乙方还应赔偿损失。<br />\r\n 7.3本协议所指守约方的损失包括但不限于守约方因主张违约方的违约赔 偿责任而支出的律师费、诉讼费用、差旅费、交通费、调查费、评估费、鉴定费、 公告费、公证费、审计费用等等。<br />\r\n8 通知<br />\r\n 8.1双方确认本协议首部双方的通讯地址、邮箱、电话为真实有效的,并且 同意作为双方或人民法院或仲裁机构向各方送达(包含电子方式送达)相关文书 的送达地址,依据通讯地址、邮箱、电话向一方发出与本协议相关的任何通知、 协议或其他有关文件或法律文书的,无论该方是否签收(包括但不限于拒收、查 无此人、下落不明等)均视为有效送达。<br />\r\n 8.2如果一方需要变更通讯地址及方式(含联系人)的,应在变更前五日内及时将变更的情况书面通知另一方,变更后的通讯地址及方式(含联系人)自被 通知方实际收到时生效,在变更后的通讯地址及方式(含联系人)生效前,另一 方就以变更前的通讯地址及方式送达文件的即视为有效送达。<br />\r\n 8.3除上述通知形式外,甲方有权单方在甲方渠道以网页公告、网页提示、 电子邮箱、手机短信、QQ、发送站内信等方式中的一种或多种,向乙方送达发布 或修订的规则制度、用户协议、隐私政策、公告通知等内容,一经甲方采取前述 任何一种方式公布或发送,即视为送达。若乙方收到通知后对内容存在异议的, 应在收到通知后24小时内提出异议并且停止使用合作渠道,否则均视为乙方已 充分阅读、理解并接受遵守甲方发布或修订的内容,并与甲方达成协议,甲方有 权按照渠道发布内容对乙方进行管理。<br />\r\n9 其他条款<br />\r\n 9.1本协议之未尽事宜应按照中国法律规定执行,不足之处双方应当本着诚 实信用的原则协商并另行签订补充协议,补充协议与本协议条款不一致时,以最 新签订的补充协议为准。如果协商不能解决,任何一方均可以向原告方所在地人 民法院提起诉讼解决。<br />\r\n 9.2本协议的注解、附件、补充协议以及经甲方发布的渠道使用规则制度、 用户协议、隐私政策、公告通知等为本协议组成部分,与本协议具有同等法律效 力。<p style=\"font-family:\" font-size:medium;\"=\"\">\r\n 9.3本协议自双方签字或盖章之日起生效。本协议壹式肆份,双方各留存贰 份,每份具有同等法律效力。本协议的任何条款部分或全部无效的,不影响其它 条款的效力。\r\n </p>\r\n </blockquote>', '1', '1', '1591781995');
|
|
|
|
|
|
|
|
|
--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`
|
|
|
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`
|
|
|
MODIFY COLUMN `settlement_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '结算方式(作废,请查看tab_company_relation表)' AFTER `is_sign_contract`;
|
|
|
ALTER TABLE `sys_shift_task`
|
|
|
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
|
|
|
) 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`
|
|
|
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
|
|
|
) 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
|
|
|
) 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;
|
|
|
|
|
|
INSERT INTO `tab_tool`(`id`, `name`, `title`, `config`, `type`, `status`) VALUES (59, 'tax_radio', '公司税费', '{"tax_radio":1.5,"time":1589361782}', 1, 1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--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`),
|
|
|
KEY `mobile` (`mobile`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='打款登陆账号';
|
|
|
|
|
|
|
|
|
INSERT INTO `tab_payment_member` (`id`, `real_name`, `mobile`, `last_login_time`) VALUES ('1', '胡歌', '18959188422', '0')
|
|
|
|
|
|
--20200715 elf
|
|
|
CREATE TABLE `tab_payment_merchant` (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`name` varchar(150) not null COMMENT '商户名称',
|
|
|
`account` varchar(150) not null DEFAULT '' COMMENT '商户账号',
|
|
|
`identifier` varchar(50) not null DEFAULT '' COMMENT '标识',
|
|
|
`channel` tinyint(1) not null COMMENT '支付渠道 1 支付宝 2 微信 3 易宝支付 4 双乾支付 5 汇付宝支付',
|
|
|
`type` tinyint(1) not null COMMENT '支付渠道 1 收款 2 付款',
|
|
|
`status` tinyint(1) not null DEFAULT 0 COMMENT '状态 0 未启用 1 启用',
|
|
|
`config` text COMMENT '配置参数JSON',
|
|
|
`admin_id` int(11) not null DEFAULT 0 COMMENT '最后操作管理员ID',
|
|
|
`ways` tinyint(1) not null DEFAULT 0 COMMENT '支持支付方式(位) 1 支付宝 2 微信 4 快捷支付',
|
|
|
`is_default` tinyint(1) not null DEFAULT 0 COMMENT '是否默认支付 1 支付宝 2 微信 4 快捷支付',
|
|
|
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
|
|
|
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后修改时间',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='付款/收款商户';
|
|
|
|
|
|
CREATE TABLE `tab_payment_merchant_way` (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`merchant_id` int(11) not null COMMENT '商户ID',
|
|
|
`way` tinyint(1) not null COMMENT '支付方式 1 支付宝 2 微信 3 快捷支付',
|
|
|
`is_default` tinyint(1) not null DEFAULT 0 COMMENT '是否默认 0 否 1 是',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商户支付方式';
|
|
|
|
|
|
CREATE TABLE `tab_payment_rule` (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`game_type_id` int(11) not null DEFAULT 0 COMMENT '游戏类型ID',
|
|
|
`game_id` int(11) not null DEFAULT 0 COMMENT '游戏ID',
|
|
|
`company_belong` tinyint(1) not null DEFAULT -1 COMMENT '-1 全部 0-内团;1-外团 2-分发联盟 3 无',
|
|
|
`company_id` int(11) not null DEFAULT 0 COMMENT '推广公司ID',
|
|
|
`alipay_merchant_id` int(11) not null DEFAULT 0 COMMENT '支付宝商户ID',
|
|
|
`weixin_merchant_id` int(11) not null DEFAULT 0 COMMENT '微信商户ID',
|
|
|
`express_merchant_id` int(11) not null DEFAULT 0 COMMENT '快捷支付商户ID',
|
|
|
`start_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '开始时间',
|
|
|
`end_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '结束时间',
|
|
|
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
|
|
|
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后修改时间',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='基础商户规则配置';
|
|
|
|
|
|
alter table tab_payment_merchant add column `main_name` varchar(150) NOT NULL default '' comment '商户主体名称';
|
|
|
|
|
|
alter table tab_spend add column `merchant_id` int(11) unsigned NOT NULL default 0 comment '支付商户ID';
|
|
|
alter table tab_deposit add column `merchant_id` int(11) unsigned NOT NULL default 0 comment '支付商户ID';
|
|
|
alter table tab_game_supersign add column `merchant_id` int(11) unsigned NOT NULL default 0 comment '支付商户ID';
|
|
|
alter table tab_coin_pay_order add column `merchant_id` int(11) unsigned NOT NULL default 0 comment '支付商户ID';
|
|
|
alter table tab_test_order add column `merchant_id` int(11) unsigned NOT NULL default 0 comment '支付商户ID';
|
|
|
alter table tab_bind_recharge add column `merchant_id` int(11) unsigned NOT NULL default 0 comment '支付商户ID'
|
|
|
|
|
|
alter table tab_spend add column `merchant_way` tinyint(3) unsigned NOT NULL default 0 comment '商户支付方式';
|
|
|
alter table tab_deposit add column `merchant_way` tinyint(3) unsigned NOT NULL default 0 comment '商户支付方式';
|
|
|
alter table tab_game_supersign add column `merchant_way` tinyint(3) unsigned NOT NULL default 0 comment '商户支付方式';
|
|
|
alter table tab_coin_pay_order add column `merchant_way` tinyint(3) unsigned NOT NULL default 0 comment '商户支付方式';
|
|
|
alter table tab_test_order add column `merchant_way` tinyint(3) unsigned NOT NULL default 0 comment '商户支付方式';
|
|
|
alter table tab_bind_recharge add column `merchant_way` tinyint(3) unsigned NOT NULL default 0 comment '商户支付方式'
|
|
|
--- 押金收到时间
|
|
|
ALTER TABLE `tab_president_deposit`
|
|
|
ADD COLUMN `pay_accept_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '押金收到时间' AFTER `pay_confirm_time`;
|
|
|
|
|
|
--20200710 ylw 奖罚
|
|
|
ALTER TABLE `tab_reward_record`
|
|
|
ADD COLUMN `promote_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '会长id' AFTER `company_id`,
|
|
|
ADD COLUMN `settlement_info` json NOT NULL AFTER `accounts`,
|
|
|
ADD COLUMN `confirm_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '确认时间' AFTER `remark`;
|
|
|
|
|
|
CREATE TABLE `tab_reward_detail` (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`company_type` tinyint(1) unsigned NOT NULL DEFAULT '3' COMMENT '公司类型 1上游 2下游 3内部',
|
|
|
`company_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '公司id',
|
|
|
`company_name` varchar(64) NOT NULL DEFAULT '' COMMENT '公司/部门名称',
|
|
|
`promote_account` varchar(64) NOT NULL DEFAULT '' COMMENT '会长账号',
|
|
|
`settlement_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '结算方式 1线下结算 2线上结算 ',
|
|
|
`amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '奖罚额度',
|
|
|
`record_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '记录id',
|
|
|
`type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1奖励 2惩罚',
|
|
|
`confirm_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '结算时间',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ALTER TABLE `tab_reward_record`
|
|
|
DROP COLUMN `company_type`,
|
|
|
DROP COLUMN `company_id`,
|
|
|
DROP COLUMN `promote_id`,
|
|
|
DROP COLUMN `settlement_info`,
|
|
|
DROP COLUMN `money`,
|
|
|
MODIFY COLUMN `reward_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '奖罚类型 1奖励 2惩罚 3双向' AFTER `id`,
|
|
|
MODIFY COLUMN `relation_game_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '游戏id 0其他' AFTER `accounts`
|
|
|
---- 2020-7-20 ylw
|
|
|
ALTER TABLE `tab_promote`
|
|
|
ADD COLUMN `alipay_real_name` varchar(30) NOT NULL DEFAULT '' COMMENT '支付宝真实姓名' AFTER `alipay_account`;
|
|
|
--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 '平台流水金额',
|
|
|
|
|
|
INSERT INTO `sj_game_channel`.`sj_cptogether_company`(`name`, `channel_id`) VALUES ('数据误差渠道', 1);
|
|
|
INSERT INTO `sj_game_channel`.`sj_cptogether_company`(`name`, `channel_id`) VALUES ('官方主渠道', 9);
|
|
|
INSERT INTO `sj_game_channel`.`sj_cptogether_company`(`name`, `channel_id`) VALUES ('测试一级渠道', 685);
|
|
|
INSERT INTO `sj_game_channel`.`sj_cptogether_company`(`name`, `channel_id`) VALUES ('坚果', 686);
|
|
|
INSERT INTO `sj_game_channel`.`sj_cptogether_company`(`name`, `channel_id`) VALUES ('万盟天下', 687);
|
|
|
INSERT INTO `sj_game_channel`.`sj_cptogether_company`(`name`, `channel_id`) VALUES ('海南万盟天下科技有限公司', 688);
|
|
|
INSERT INTO `sj_game_channel`.`sj_cptogether_company`(`name`, `channel_id`) VALUES ('河南南北网络科技有限公司', 689);
|
|
|
INSERT INTO `sj_game_channel`.`sj_cptogether_company`(`name`, `channel_id`) VALUES ('福建君易道网络科技有限公司', 690);
|
|
|
INSERT INTO `sj_game_channel`.`sj_cptogether_company`(`name`, `channel_id`) VALUES ('泉州神战网络科技有限公司', 691);
|
|
|
INSERT INTO `sj_game_channel`.`sj_cptogether_company`(`name`, `channel_id`) VALUES ('北京浩游网讯科技有限公司', 692);
|
|
|
|
|
|
ALTER TABLE `sj_game_channel`.`sj_cptogether_company`
|
|
|
ADD COLUMN `tax_ratio` varchar(10) NULL DEFAULT '' COMMENT '税费费率' AFTER `tax_identification_number`,
|
|
|
ADD COLUMN `channel_radio` varchar(10) NULL DEFAULT '' COMMENT '渠道费率' AFTER `tax_ratio`,
|
|
|
ADD COLUMN `connection_address` longtext NULL COMMENT '联系地址' AFTER `channel_radio`;
|
|
|
ALTER TABLE `sj_game_channel`.`sj_cptogether_company`
|
|
|
ADD COLUMN `is_received` tinyint(2) NULL DEFAULT 0 COMMENT '是否为收款方' AFTER `connection_address`;
|
|
|
`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`;
|
|
|
|
|
|
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`;
|
|
|
INSERT INTO `sys_kv`(`id`, `key`, `value`, `type`, `remark`) VALUES (4, 'cp_company_api', 'http://10.0.1.161:8095/index.php?g=Api&m=CpJuheCompany&a=index', 'string', '聚合公司网址')
|
|
|
|
|
|
ALTER TABLE `sj_game_channel`.`sj_cptogether_company`
|
|
|
ADD COLUMN `is_qualifity` tinyint(2) NULL COMMENT '是否具有游戏资质 0 否 1 是' AFTER `is_received`;
|
|
|
|
|
|
ALTER TABLE `tab_president_deposit`
|
|
|
ADD COLUMN `company_id` int(1) NOT NULL DEFAULT 0 COMMENT '推广公司ID' AFTER `promote_id`;
|
|
|
UPDATE tab_president_deposit s left join tab_promote c ON s.promote_id = c.id SET s.company_id=c.company_id
|
|
|
CREATE TABLE `tab_testing_user` (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`user_id` int(11) unsigned NOT NULL COMMENT '测试用户ID',
|
|
|
`user_account` varchar(50) not null comment '测试用户账号',
|
|
|
`promote_id` int(11) not null default 0 COMMENT '推广员ID',
|
|
|
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0 禁用 1 可用',
|
|
|
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
|
|
|
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后修改时间',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
CREATE TABLE `tab_testing_binding` (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`game_id` int(11) NOT NULL COMMENT '游戏ID',
|
|
|
`user_id` int(11) unsigned NOT NULL COMMENT '测试用户ID',
|
|
|
`role_id` varchar(50) NOT NULL default '' COMMENT '角色ID',
|
|
|
`bind_user_id` int(11) unsigned NOT NULL default 0 COMMENT '绑定用户ID',
|
|
|
`bind_role_id` varchar(50) NOT NULL default '' COMMENT '绑定角色ID',
|
|
|
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
|
|
|
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后修改时间',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
CREATE TABLE `tab_testing_resource` (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`name` varchar(120) NOT NULL DEFAULT COMMENT '测试资源名称',
|
|
|
`game_id` int(11) NOT NULL COMMENT '游戏ID',
|
|
|
`type_id` int(11) NOT NULL COMMENT '测试资源类型ID',
|
|
|
`price` decimal(12, 2) NOT NULL default '0.00' COMMENT '资源价值',
|
|
|
`identifier` varchar(50) NOT NULL default '与CP对应资源标识' COMMENT '标识符',
|
|
|
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
|
|
|
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后修改时间',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
CREATE TABLE `tab_testing_resource_type` (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`name` varchar(120) NOT NULL COMMENT '测试资源类型名称',
|
|
|
`game_id` int(11) NOT NULL COMMENT '游戏ID',
|
|
|
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
|
|
|
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后修改时间',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
CREATE TABLE `tab_testing_resource_order` (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`batch_id` int(11) NOT NULL COMMENT '批次ID',
|
|
|
`order_no` varchar(32) NOT NULL COMMENT '订单号',
|
|
|
`ref_id` varchar(30) NOT NULL COMMENT '测试资源ID(第三方)',
|
|
|
`ref_name` varchar(150) NOT NULL COMMENT '测试资源名称(第三方)',
|
|
|
`ref_amount` decimal(12, 2) not null default '0.00' comment '测试资源价值(第三方)',
|
|
|
`num` int(11) NOT NULL DEFAULT 0 COMMENT '申请数量',
|
|
|
`provide_status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0 待发放 1 已经发放 2 拒绝',
|
|
|
`provide_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发放时间',
|
|
|
`amount` decimal(12, 2) not null default '0.00' comment '申请金额',
|
|
|
`remark` varchar(255) NOT NULL DEFAULT '' COMMENT '审核备注',
|
|
|
`result` varchar(255) NOT NULL DEFAULT '' COMMENT '发放结果',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
CREATE TABLE `tab_testing_resource_batch` (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`batch_no` varchar(30) NOT NULL COMMENT '批次号',
|
|
|
`game_id` int(11) NOT NULL DEFAULT '0' COMMENT '游戏ID',
|
|
|
`user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
|
|
|
`server_id` int(11) NOT NULL DEFAULT '0' COMMENT '区服ID',
|
|
|
`role_id` varchar(50) NOT NULL DEFAULT '' COMMENT '角色ID',
|
|
|
`apply_amount` decimal(12, 2) not null default '0.00' comment '申请金额',
|
|
|
`provide_amount` decimal(12, 2) not null default '0.00' comment '发放金额',
|
|
|
`provide_status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0 待发放 1 已经发放 2 异常',
|
|
|
`provide_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发放时间',
|
|
|
`apply_promote_id` int(11) NOT NULL DEFAULT '0' COMMENT '申请推广员ID',
|
|
|
`verify_status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0 未审核 1 审核通过 2 未审核通过',
|
|
|
`verify_remark` varchar(255) NOT NULL DEFAULT '' COMMENT '审核备注',
|
|
|
`verify_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '审核时间',
|
|
|
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
|
|
|
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后修改时间',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
alter table tab_user_play_info add column `game_role_id` varchar(80) not null DEFAULT '' COMMENT '游戏角色标识' after role_level;
|
|
|
alter table tab_user_play_info add column `testing_other_quota` decimal(12, 2) not null DEFAULT '0.00' COMMENT '测试资源额外额度' after promote_account;
|
|
|
update tab_user_play_info set game_role_id = concat(game_id, '#', role_id);
|
|
|
ALTER TABLE `tab_user_play_info` ADD INDEX `index_unique_role`(`game_role_id`);
|
|
|
|
|
|
ALTER TABLE `tab_market_altogether`
|
|
|
ADD COLUMN `achievement_profit` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '开发毛利' AFTER `wait_achievement_commission`,
|
|
|
ADD COLUMN `performance_profit` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '维护毛利' AFTER `achievement_profit`;
|
|
|
|
|
|
ALTER TABLE `sys_ucenter_member`
|
|
|
ADD COLUMN `work_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '离职状态' AFTER `openid_sign`;
|
|
|
|
|
|
ALTER TABLE `tab_company_relation_log`
|
|
|
ADD COLUMN `first_company_info` longtext NULL COMMENT '甲方公司信息' AFTER `first_company_type`,
|
|
|
ADD COLUMN `second_company_info` longtext NULL COMMENT '乙方公司信息' AFTER `second_company_type`;
|
|
|
|
|
|
CREATE TABLE `tab_payment_orders` (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`merchant_id` int(11) NOT NULL COMMENT '商户ID',
|
|
|
`order_no` varchar(100) NOT NULL COMMENT '订单号',
|
|
|
`business_type` varchar(20) NOT NULL DEFAULT '' COMMENT '业务类型',
|
|
|
`order_amount` decimal(12, 2) not null default '0.00' comment '订单金额',
|
|
|
`fee` decimal(12, 2) not null default '0.00' comment '手续费',
|
|
|
`product_name` varchar(255) NOT NULL DEFAULT '' COMMENT '产品名称',
|
|
|
`channel_order_no` varchar(100) NOT NULL DEFAULT '' COMMENT '渠道订单号',
|
|
|
`channel_user_account` varchar(100) NOT NULL DEFAULT '' COMMENT '渠道用户',
|
|
|
`remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
|
|
|
`created_at` datetime NOT NULL COMMENT '订单创建时间',
|
|
|
`finished_at` datetime NOT NULL COMMENT '订单完成时间',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
CREATE TABLE `tab_admin_notice` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`type` varchar(20) NOT NULL COMMENT '提示类型',
|
|
|
`title` varchar(32) NOT NULL COMMENT '标题',
|
|
|
`content` varchar(255) NOT NULL COMMENT '内容',
|
|
|
`admin_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '接收管理员ID',
|
|
|
`target` varchar(255) NOT NULL DEFAULT '' COMMENT '对应标识',
|
|
|
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
|
|
`start_time` int(11) NOT NULL DEFAULT '0' COMMENT '展示开始时间',
|
|
|
`end_time` int(11) NOT NULL DEFAULT '0' COMMENT '展示结束时间',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
CREATE TABLE `tab_admin_notice_read` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`notice_id` int(11) NOT NULL COMMENT '通知ID',
|
|
|
`admin_id` int(11) NOT NULL COMMENT '管理员ID',
|
|
|
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
|
|
`update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
|
|
|
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态 0 未读 1 已读',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
/**
|
|
|
zyx 2020-09-25
|
|
|
*/
|
|
|
ALTER TABLE `tab_market_altogether`
|
|
|
ADD COLUMN `market_check` tinyint(2) NULL DEFAULT 0 COMMENT '市场确认 0 未确认 1 确认' AFTER `performance_profit`,
|
|
|
ADD COLUMN `market_check_detail` varchar(100) NULL DEFAULT '' COMMENT '市场确认详情' AFTER `market_check`,
|
|
|
ADD COLUMN `finance_check` tinyint(2) NULL DEFAULT 0 COMMENT '财务确认 0 未确认 1 确认' AFTER `market_check_detail`,
|
|
|
ADD COLUMN `finance_check_detail` varchar(100) NULL DEFAULT '' COMMENT '财务确认详情' AFTER `finance_check`;
|
|
|
|
|
|
ALTER TABLE `tab_promote_company`
|
|
|
ADD COLUMN `is_inside` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否为内部公司' AFTER `ali_partner`;
|
|
|
|
|
|
ALTER TABLE `tab_settleup_marketorder`
|
|
|
DROP COLUMN `company_name`,
|
|
|
ADD COLUMN `company_name` varchar(50) NULL DEFAULT '' COMMENT '公司名称' AFTER `company_id`;
|
|
|
|
|
|
ALTER TABLE `tab_company_lack_statement_info`
|
|
|
ADD COLUMN `remark` varchar(255) NULL DEFAULT '' COMMENT '备注' AFTER `withdraw_type`;
|
|
|
|
|
|
CREATE TABLE `tab_aggregate_lack_statement_info` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
|
|
|
`company_id` int(11) NULL DEFAULT 0 COMMENT '对账公司id',
|
|
|
`company_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '对账公司名称',
|
|
|
`company_belong_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '归属团体',
|
|
|
`company_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '公司其他信息json',
|
|
|
`statement_money` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '对账金额',
|
|
|
`pay_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '总计',
|
|
|
`platform_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '平台流水金额',
|
|
|
`fine` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '罚款',
|
|
|
`reward` decimal(10, 2) NULL 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_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '订单相关信息json',
|
|
|
`statement_pool_num` varchar(500) CHARACTER SET utf8mb4 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是',
|
|
|
`withdraw_type` tinyint(2) NULL DEFAULT 0 COMMENT '对账类型(0-周结 1月结 2补点 3特殊补点)',
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
INDEX `company_tid`(`company_id`) USING BTREE,
|
|
|
INDEX `statement_begin_time`(`statement_begin_time`) USING BTREE,
|
|
|
INDEX `statement_end_time`(`statement_end_time`) USING BTREE
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '未满足支付条件的公司信息' ROW_FORMAT = Dynamic;
|
|
|
|
|
|
CREATE TABLE `tab_aggregate_statement_info` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
|
|
|
`pool_id` int(11) NOT NULL COMMENT '汇总单id',
|
|
|
`company_id` int(11) NULL DEFAULT 0 COMMENT '对账公司id',
|
|
|
`company_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '对账公司名称',
|
|
|
`company_belong_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '归属团体',
|
|
|
`company_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '公司其他信息json',
|
|
|
`statement_money` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '对账金额',
|
|
|
`pay_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '总计',
|
|
|
`platform_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '平台流水金额',
|
|
|
`fine` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '罚款',
|
|
|
`reward` decimal(10, 2) NULL 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '结算单号',
|
|
|
`statement_info` text CHARACTER SET utf8 COLLATE utf8_general_ci 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:打款成功',
|
|
|
`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 CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '打款信息',
|
|
|
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
|
|
|
`withdraw_type` tinyint(2) NULL DEFAULT 0 COMMENT '对账类型(0-周结 1月结 2补点 3特殊补点)',
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
INDEX `company_tid`(`company_id`) USING BTREE,
|
|
|
INDEX `statement_begin_time`(`statement_begin_time`) USING BTREE,
|
|
|
INDEX `statement_end_time`(`statement_end_time`) USING BTREE,
|
|
|
INDEX `pay_status`(`pay_status`) USING BTREE
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '对账单汇总详情' ROW_FORMAT = Dynamic;
|
|
|
|
|
|
CREATE TABLE `tab_aggregate_statement_pool` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
|
|
|
`statement_num` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '结算批量单号',
|
|
|
`statement_ids` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '涉及的结算单id',
|
|
|
`withdraw_type` tinyint(2) NULL DEFAULT 3 COMMENT '对账类型(0-周结 1月结 2补点 3无)',
|
|
|
`create_lack_ids` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '生成的lackid',
|
|
|
`del_lack_ids` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '合并计算的lackid',
|
|
|
`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) NULL DEFAULT 0.00 COMMENT '对账金额',
|
|
|
`lack_statement_money` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '不结算金额',
|
|
|
`pay_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '总计',
|
|
|
`platform_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '平台流水金额',
|
|
|
`lack_platform_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '不结算平台流水金额',
|
|
|
`fine` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '罚款',
|
|
|
`reward` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '奖励',
|
|
|
`online_money` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '成功支付金额',
|
|
|
`withdraw_money` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '提现成功金额',
|
|
|
`verify_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '审核状态 -2:打款失败 -1审批拒绝 0:未审批 1:审核通过 2:待打款 3:打款中 4:打款成功',
|
|
|
`verify_log` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '审批相关信息json',
|
|
|
`ext_file` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '凭证地址',
|
|
|
`is_payment` tinyint(3) NOT NULL DEFAULT 1 COMMENT '是否需要打款:1-是 2-否(线下)',
|
|
|
`op_time` int(11) NOT NULL DEFAULT 0 COMMENT '操作时间',
|
|
|
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
INDEX `op_time`(`op_time`) USING BTREE,
|
|
|
INDEX `verify_status`(`verify_status`) USING BTREE,
|
|
|
INDEX `statement_end_time`(`statement_end_time`) USING BTREE,
|
|
|
INDEX `statement_begin_time`(`statement_begin_time`) USING BTREE,
|
|
|
INDEX `statement_num`(`statement_num`) USING BTREE
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '对账单汇总' ROW_FORMAT = Dynamic;
|
|
|
|
|
|
ALTER TABLE `tab_company_info`
|
|
|
ADD COLUMN `invoice_item` varchar(255) NULL DEFAULT '' COMMENT '开票内容' AFTER `fax_ratio`,
|
|
|
ADD COLUMN `invoice_type` varchar(255) NULL DEFAULT '' COMMENT '开票类型' AFTER `invoice_item`,
|
|
|
ADD COLUMN `register_phone` varchar(24) NULL DEFAULT '' COMMENT '注册电话' AFTER `invoice_type`,
|
|
|
ADD COLUMN `register_address` varchar(255) NULL DEFAULT '' COMMENT '注册地址' AFTER `register_phone`;
|
|
|
|
|
|
CREATE TABLE `tab_promote_grade_setting` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`company_id` int(11) NOT NULL COMMENT '推广公司ID',
|
|
|
`config` varchar(255) NOT NULL COMMENT '配置',
|
|
|
`status` tinyint(11) NOT NULL DEFAULT '0' COMMENT '状态',
|
|
|
`create_time` int(11) NOT NULL DEFAULT '0',
|
|
|
`update_time` int(11) NOT NULL DEFAULT '0',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='推广评级设定';
|
|
|
|
|
|
ALTER TABLE `tab_aggregate_statement`
|
|
|
ADD COLUMN `detail` longtext NULL COMMENT '审批详情' AFTER `remark`;
|
|
|
|
|
|
ALTER TABLE `tab_game_ratio_mould`
|
|
|
ADD COLUMN `begin_time` int(11) NOT NULL DEFAULT 0 COMMENT '开始时间' AFTER `admin_name`,
|
|
|
ADD COLUMN `end_time` int(11) NOT NULL DEFAULT 0 COMMENT '过期时间' AFTER `begin_time`;
|
|
|
|
|
|
ALTER TABLE `tab_game_ratio_mould`
|
|
|
ADD COLUMN `turnover_type` tinyint(2) NULL DEFAULT 1 COMMENT '结算流水类型' AFTER `end_time`;
|
|
|
|
|
|
ALTER TABLE `tab_company_game_ratio_log`
|
|
|
ADD COLUMN `turnover_type` tinyint(2) NULL DEFAULT 1 COMMENT '结算流水类型 1 月流水 2 历史流水' AFTER `end_time`;
|
|
|
|
|
|
ALTER TABLE `tab_company_game_ratio`
|
|
|
ADD COLUMN `turnover_type` tinyint(2) NULL DEFAULT 1 COMMENT '结算流水类型 1 月流水 2 历史流水' AFTER `end_time`;
|
|
|
|
|
|
ALTER TABLE `tab_settleup_marketorder`
|
|
|
ADD COLUMN `is_settlement` tinyint(2) NULL DEFAULT 0 COMMENT '是否结算' AFTER `company_profit`;
|
|
|
|
|
|
CREATE TABLE `tab_company_belong_game` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`game_ids` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '外团推广关联游戏的数据',
|
|
|
`begin_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '起始时间',
|
|
|
`end_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '结束时间',
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
UPDATE `tab_game_ratio_mould` SET `begin_time` = 1567267200 WHERE `begin_time` = 0
|
|
|
|
|
|
|
|
|
CREATE TABLE `tab_testing_game_setting` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`base_game_id` int(11) NOT NULL COMMENT '游戏ID',
|
|
|
`base_quota` int(11) NOT NULL DEFAULT '0' COMMENT '初始额度',
|
|
|
`rate` int(11) NOT NULL DEFAULT '0' COMMENT '额度比例(百分比)',
|
|
|
`has_itf` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否发放接口',
|
|
|
`create_time` int(11) NOT NULL DEFAULT '0',
|
|
|
`update_time` int(11) NOT NULL DEFAULT '0',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='测试资源游戏设置';
|
|
|
|
|
|
ALTER TABLE `tab_promote_grade_setting`
|
|
|
ADD COLUMN `base_game_id` int(11) not NULL DEFAULT 0 COMMENT '游戏ID' AFTER `name`,
|
|
|
ADD COLUMN `month_begin` int(11) not NULL DEFAULT 0 COMMENT '规则截止月份' AFTER `base_game_id`,
|
|
|
ADD COLUMN `month_end` int(11) not NULL DEFAULT 0 COMMENT '规则开始月份' AFTER `month_begin`;
|
|
|
|
|
|
ALTER TABLE `tab_testing_user`
|
|
|
ADD COLUMN `verify_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '审核状态' AFTER `status`;
|
|
|
ALTER TABLE `tab_testing_user`
|
|
|
ADD COLUMN `verify_time` int(11) NOT NULL DEFAULT 0 COMMENT '审核时间' AFTER `verify_status`;
|
|
|
ALTER TABLE `tab_testing_resource_batch`
|
|
|
ADD COLUMN `auto_verify` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否需要审核' AFTER `verify_status`;
|
|
|
|
|
|
ALTER TABLE `tab_company_game_ratio_log`
|
|
|
ADD COLUMN `company_belong` varchar(60) NOT NULL DEFAULT 0 COMMENT '工会归属:0-内团 1-外团 2-分发联盟 3-无 4-下游聚合' AFTER `verify_log`;
|
|
|
|
|
|
ALTER TABLE `tab_company_statement_info`
|
|
|
ADD COLUMN `pay_verify_status` tinyint(255) NULL DEFAULT 0 COMMENT '审核状态 0 未审核 1 审核通过 2 审核拒绝' AFTER `withdraw_type`,
|
|
|
ADD COLUMN `verify_time` varchar(11) NULL DEFAULT 0 COMMENT '审核时间' AFTER `pay_verify_status`,
|
|
|
ADD COLUMN `verify_member_id` int(11) NULL DEFAULT 0 COMMENT '审核人员id' AFTER `verify_time`;
|
|
|
|
|
|
ALTER TABLE `tab_excel_statement_info`
|
|
|
ADD COLUMN `verify_status` tinyint(255) NULL DEFAULT 0 COMMENT '审核状态 0 未审核 1 审核通过 2 审核拒绝',
|
|
|
ADD COLUMN `verify_time` varchar(11) NULL DEFAULT 0 COMMENT '审核时间',
|
|
|
ADD COLUMN `verify_member_id` int(11) NULL DEFAULT 0 COMMENT '审核人员id';
|
|
|
|
|
|
ALTER TABLE `sj_game_channel`.`sj_cptogether_company`
|
|
|
MODIFY COLUMN `phone` varchar(20) NULL DEFAULT NULL COMMENT '联系电话' AFTER `connection_person`,
|
|
|
MODIFY COLUMN `register_phone` varchar(20) NULL DEFAULT NULL COMMENT '注册电话' AFTER `register_address`;
|
|
|
|
|
|
CREATE TABLE `sys_payment_member` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '姓名',
|
|
|
`mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '手机号码',
|
|
|
`is_payment` tinyint(2) NULL DEFAULT 0 COMMENT '是否可打款 否0,是1',
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
-- ----------------------------
|
|
|
-- Records of sys_payment_member
|
|
|
-- ----------------------------
|
|
|
INSERT INTO `sys_payment_member` VALUES (1, '李', '1990676517', 1);
|
|
|
INSERT INTO `sys_payment_member` VALUES (3, '关飞', '18859216458', 0);
|
|
|
INSERT INTO `sys_payment_member` VALUES (4, '测试正在', '16754678756', 0);
|
|
|
|
|
|
ALTER TABLE `tab_promote_company`
|
|
|
ADD COLUMN `is_site_custom` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否定制推广后台' AFTER `is_inside`;
|
|
|
ALTER TABLE `tab_promote_company`
|
|
|
ADD COLUMN `site_domain_prefix` varchar(20) NOT NULL DEFAULT '' COMMENT '推广后台域名前缀' AFTER `is_site_custom`;
|
|
|
ALTER TABLE `tab_promote_company`
|
|
|
ADD COLUMN `site_config` varchar(255) NOT NULL DEFAULT '' COMMENT '推广后台网站配置' AFTER `is_site_custom`;
|
|
|
|
|
|
ALTER TABLE `tab_market_altogether`
|
|
|
ADD COLUMN `coefficient_check` tinyint(2) NULL DEFAULT 0 COMMENT '绩效确认 0 未确认 1 确认' AFTER `finance_check_detail`,
|
|
|
ADD COLUMN `coefficient_check_detail` varchar(100) NULL DEFAULT '' COMMENT '绩效确认详情' AFTER `coefficient_check`;
|
|
|
|
|
|
CREATE TABLE `tab_coefficient` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`pay_time` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '' COMMENT '时间月份记录',
|
|
|
`real_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '市场专员姓名',
|
|
|
`admin_id` int(11) NOT NULL DEFAULT 0 COMMENT '市场专员id',
|
|
|
`nickname` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '市场专员账号',
|
|
|
`coefficient` decimal(11, 2) NOT NULL DEFAULT 100.00 COMMENT '绩效系数',
|
|
|
`update_time` int(11) NOT NULL DEFAULT 0 COMMENT '更新时间',
|
|
|
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
) ENGINE = InnoDB CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
ALTER TABLE `tab_company_statement_info`
|
|
|
MODIFY COLUMN `pay_verify_status` tinyint(2) NULL DEFAULT 0 COMMENT '审核状态 0 未审核 1 审核通过 2 审核拒绝' AFTER `withdraw_type`,
|
|
|
ADD COLUMN `pay_check` tinyint(2) NULL DEFAULT 0 COMMENT '支付信息确认' AFTER `verify_member_id`;
|
|
|
|
|
|
ALTER TABLE `tab_company_statement_info`
|
|
|
ADD COLUMN `pay_check_time` int(11) NULL DEFAULT 0 COMMENT '支付确认时间' AFTER `pay_check_member_id`;
|
|
|
|
|
|
ALTER TABLE `tab_testing_resource_batch`
|
|
|
ADD COLUMN `verify_admin_id` int(11) NOT NULL DEFAULT 0 COMMENT '審核管理員ID' AFTER `verify_status`;
|
|
|
ALTER TABLE `tab_testing_resource_batch`
|
|
|
ADD COLUMN `apply_admin_id` int(11) NOT NULL DEFAULT 0 COMMENT '申請管理員ID' AFTER `apply_promote_id`;
|
|
|
|
|
|
|
|
|
ALTER TABLE `tab_society_info`
|
|
|
ADD COLUMN `sociaty_level` tinyint(2) NOT NULL DEFAULT 0 COMMENT '公会等级 1:S 2:A 3:B 4:其他 ' AFTER `create_account`;
|
|
|
|
|
|
ALTER TABLE `sys_ucenter_member`
|
|
|
ADD COLUMN `apply_leave_time` int(11) NOT NULL DEFAULT 0 COMMENT '申请离职时间' AFTER `work_status`,
|
|
|
ADD COLUMN `leave_time` int(11) NOT NULL DEFAULT 0 COMMENT '离职时间' AFTER `apply_leave_time`;
|
|
|
|
|
|
ALTER TABLE `tab_company_statement_info`
|
|
|
ADD COLUMN `is_reward_fine_split` tinyint(255) NULL DEFAULT 0 COMMENT '是否是奖罚分离生成 0 否 1 是' AFTER `pay_check_time`;
|
|
|
|
|
|
ALTER TABLE `platform_wm`.`tab_company_statement_pool`
|
|
|
ADD COLUMN `wm_statement_ids` int(11) NOT NULL DEFAULT 0 COMMENT '子系统财务结算单id' AFTER `remark`;
|
|
|
|
|
|
ALTER TABLE `tab_reward_record`
|
|
|
ADD COLUMN `is_verify` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否审核' AFTER `settlement_time`,
|
|
|
ADD COLUMN `verify_detail` longtext NULL COMMENT '审核详情' AFTER `is_verify`;
|
|
|
|
|
|
ALTER TABLE `tab_game`
|
|
|
ADD COLUMN `game_belong_id` int(11) NOT NULL DEFAULT 0 COMMENT '归属市场员id' AFTER `data_share`,
|
|
|
ADD COLUMN `game_belong_name` varchar(50) NOT NULL DEFAULT '' COMMENT '归属市场员姓名' AFTER `game_belong_id`;
|
|
|
|
|
|
ALTER TABLE `sys_ucenter_member`
|
|
|
ADD COLUMN `become_time` int(11) NOT NULL DEFAULT 0 COMMENT '转正时间' AFTER `leave_time`;
|
|
|
|
|
|
CREATE TABLE `tab_business_affairs_award_pool` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '月份',
|
|
|
`pay_amount` decimal(13, 2) NOT NULL COMMENT '流水',
|
|
|
`relation_game_id` int(11) NOT NULL COMMENT '游戏id',
|
|
|
`relation_game_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '游戏名',
|
|
|
`game_belong_id` int(11) NOT NULL DEFAULT 0 COMMENT '归属id',
|
|
|
`game_belong_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '归属名',
|
|
|
`month_bonus_pool` decimal(13, 2) NOT NULL DEFAULT 0.00 COMMENT '月奖金池',
|
|
|
`quarter_bonus_pool` decimal(13, 2) NOT NULL DEFAULT 0.00 COMMENT '季度奖金池',
|
|
|
`month_award` decimal(13, 2) NOT NULL DEFAULT 0.00 COMMENT '月奖金',
|
|
|
`quarter_award` decimal(13, 2) NOT NULL DEFAULT 0.00 COMMENT '季度奖金',
|
|
|
`person_award` decimal(13, 2) NOT NULL DEFAULT 0.00 COMMENT '个人奖金',
|
|
|
`verify_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '审核状态 0 未审核 1 审核通过 2 审核拒绝',
|
|
|
`verify_time` int(11) NOT NULL DEFAULT 0 COMMENT '审核时间',
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic; |