You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
454 lines
16 KiB
454 lines
16 KiB
/*
|
|
Navicat Premium Data Transfer
|
|
|
|
Source Server : 本机
|
|
Source Server Type : MySQL
|
|
Source Server Version : 50713
|
|
Source Host : 127.0.0.1:3306
|
|
Source Schema : toss
|
|
|
|
Target Server Type : MySQL
|
|
Target Server Version : 50713
|
|
File Encoding : 65001
|
|
|
|
Date: 11/11/2021 16:20:26
|
|
*/
|
|
drop database if exists anhei_oss;
|
|
create database anhei_oss DEFAULT CHARACTER SET utf8mb4;
|
|
use anhei_oss;
|
|
|
|
|
|
|
|
|
|
SET NAMES utf8mb4;
|
|
SET FOREIGN_KEY_CHECKS = 0;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for account
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `account`;
|
|
CREATE TABLE `account` (
|
|
`account` varchar(64) NOT NULL,
|
|
`name` varchar(64) NOT NULL,
|
|
`password` varchar(64) NOT NULL,
|
|
`jurisdiction` varchar(64) NOT NULL DEFAULT '',
|
|
`valid` tinyint(4) NOT NULL DEFAULT 1,
|
|
`lastLoginTime` datetime(0) NOT NULL DEFAULT '2016-02-01 00:00:00',
|
|
`createTime` datetime(0) NOT NULL DEFAULT '2023-01-01 00:00:00',
|
|
PRIMARY KEY (`account`) USING BTREE
|
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
-- Records of account mmogtest sS*%9Ew6P8!$
|
|
-- ----------------------------
|
|
-- default account password is 123456789
|
|
INSERT INTO `account` VALUES ('lvyue','lvyue','f7c3bc1d808e04732adf679965ccc34ca7ae3441','',1,'2024-02-05 15:10:07','2024-01-24 19:12:29'),
|
|
('mmogtest','mmogtest','dd694df73b30e5d798cbb205770908e56a6452e9','1',1,'2024-02-05 09:45:01','2023-01-01 00:00:00'),
|
|
('tangwenjiang','tangwenjiang','f7c3bc1d808e04732adf679965ccc34ca7ae3441','',1,'2024-01-24 20:02:50','2024-01-24 19:12:15'),
|
|
('xiongfei','xiongfei','f7c3bc1d808e04732adf679965ccc34ca7ae3441','',1,'2024-01-26 17:12:02','2024-01-24 19:11:49'),
|
|
('yangdong','yangdong','f7c3bc1d808e04732adf679965ccc34ca7ae3441','',1,'2016-02-01 00:00:00','2024-01-24 19:12:44'),
|
|
('zhaoxiaomeng','zhaoxiaomeng','f7c3bc1d808e04732adf679965ccc34ca7ae3441','',1,'2024-01-29 10:02:03','2024-01-29 10:01:56');
|
|
|
|
-- ----------------------------
|
|
-- Table structure for admin_account_role
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `admin_account_role`;
|
|
CREATE TABLE `admin_account_role`
|
|
(
|
|
`account` varchar(100) NOT NULL,
|
|
`role` text NULL,
|
|
PRIMARY KEY (`account`) USING BTREE
|
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Records of admin_account_role
|
|
-- ----------------------------
|
|
-- default admin account role
|
|
INSERT INTO `admin_account_role` VALUES ('mmogtest', '1');
|
|
INSERT INTO `admin_account_role` VALUES ('lvyue', '1');
|
|
INSERT INTO `admin_account_role` VALUES ('tangwenjiang', '1');
|
|
INSERT INTO `admin_account_role` VALUES ('xiongfei', '1');
|
|
INSERT INTO `admin_account_role` VALUES ('yangdong', '1');
|
|
INSERT INTO `admin_account_role` VALUES ('zhaoxiaomeng', '1');
|
|
|
|
-- ----------------------------
|
|
-- Table structure for admin_menu
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `admin_menu`;
|
|
CREATE TABLE `admin_menu`
|
|
(
|
|
`menu_id` int(20) NOT NULL AUTO_INCREMENT,
|
|
`name` varchar(100) NOT NULL,
|
|
`icon` varchar(100) NULL DEFAULT NULL,
|
|
`order` int(20) NULL DEFAULT 1,
|
|
`parent_id` int(20) NULL DEFAULT 0,
|
|
`permission` int(20) NULL DEFAULT 0,
|
|
`url` varchar(255) NULL DEFAULT NULL,
|
|
PRIMARY KEY (`menu_id`) USING BTREE,
|
|
INDEX `_name`(`name`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 87 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for admin_permission
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `admin_permission`;
|
|
CREATE TABLE `admin_permission`
|
|
(
|
|
`id` int(20) NOT NULL,
|
|
`name` varchar(100) NULL DEFAULT NULL,
|
|
`url` longtext NULL,
|
|
`parent_id` int(20) NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
UNIQUE INDEX `_id`(`id`) USING BTREE
|
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
-- ----------------------------
|
|
-- Table structure for admin_role
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `admin_role`;
|
|
CREATE TABLE `admin_role`
|
|
(
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`name` varchar(100) NOT NULL,
|
|
`permission` text NULL,
|
|
`menu` text NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Records of admin_role
|
|
-- ----------------------------
|
|
INSERT INTO `admin_role` VALUES (1, 'Administrator', NULL, NULL);
|
|
|
|
-- ----------------------------
|
|
-- Table structure for player_preset
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `player_preset`;
|
|
CREATE TABLE `player_preset`
|
|
(
|
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
|
`account` varchar(100) NOT NULL,
|
|
`realms` varchar(500) NOT NULL,
|
|
`items` varchar(1000) NOT NULL,
|
|
`start_time` varchar(100) NOT NULL,
|
|
`end_time` varchar(100) NOT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for ban_box
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `ban_box`;
|
|
CREATE TABLE `ban_box` (
|
|
`Id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`dater` datetime(0) NOT NULL,
|
|
`UID` varchar(100) NOT NULL,
|
|
`banDay` varchar(100) NOT NULL,
|
|
`type` int not null default 0 ,
|
|
`reasonType` int not null default 0,
|
|
`otherReason` varchar(256) not null default '',
|
|
PRIMARY KEY (`Id`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for mail_box
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `mail_box`;
|
|
CREATE TABLE `mail_box` (
|
|
`Id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`dater` datetime(0) NOT NULL,
|
|
`datee` datetime(0) NOT NULL,
|
|
`name` varchar(9000) NOT NULL,
|
|
`title` varchar(100) NOT NULL,
|
|
`language` varchar(64) NOT NULL,
|
|
`uuid` varchar(64) NOT NULL,
|
|
`content` varchar(1000) NOT NULL,
|
|
`timeLimit` int(11) NOT NULL,
|
|
`status` int(11) NOT NULL,
|
|
`isSendToAll` int(11) NOT NULL DEFAULT 0,
|
|
`realmlist` varchar(1000) NULL DEFAULT NULL,
|
|
`itemstr` varchar(1000) NULL DEFAULT NULL,
|
|
`curstr` varchar(1000) NULL DEFAULT NULL,
|
|
`equipStr` varchar(1000) NULL DEFAULT NULL,
|
|
`customItemStr` varchar(1000) NULL DEFAULT NULL,
|
|
`herolist` varchar(1000) NULL DEFAULT NULL,
|
|
`data` blob NULL DEFAULT NULL,
|
|
PRIMARY KEY (`Id`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 143 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for mail_box_temp
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `mail_box_temp`;
|
|
CREATE TABLE `mail_box_temp` (
|
|
`Id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`dater` datetime(0) NOT NULL,
|
|
`datee` datetime(0) NOT NULL,
|
|
`name` varchar(9000) NOT NULL,
|
|
`title` varchar(100) NOT NULL,
|
|
`language` varchar(64) NOT NULL,
|
|
`uuid` varchar(64) NOT NULL,
|
|
`content` varchar(1000) NOT NULL,
|
|
`timeLimit` int(11) NOT NULL,
|
|
`status` int(11) NOT NULL,
|
|
`isSendToAll` int(11) NOT NULL DEFAULT 0,
|
|
`realmlist` varchar(1000) NULL DEFAULT NULL,
|
|
`itemstr` varchar(1000) NULL DEFAULT NULL,
|
|
`curstr` varchar(1000) NULL DEFAULT NULL,
|
|
`equipStr` varchar(1000) NULL DEFAULT NULL,
|
|
`customItemStr` varchar(1000) NULL DEFAULT NULL,
|
|
`herolist` varchar(1000) NULL DEFAULT NULL,
|
|
`data` blob NULL DEFAULT NULL,
|
|
PRIMARY KEY (`Id`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 143 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
-- Table structure for item_cost
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `item_cost`;
|
|
CREATE TABLE `item_cost` (
|
|
`itemId` int NOT NULL,
|
|
`kr` float ZEROFILL NOT NULL,
|
|
`cn` float ZEROFILL NOT NULL,
|
|
`jp` float NOT NULL,
|
|
`en` float NOT NULL,
|
|
PRIMARY KEY (`itemId`) USING BTREE
|
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
-- ----------------------------
|
|
-- Table structure for welfare_payment
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `welfare_payment`;
|
|
CREATE TABLE `welfare_payment` (
|
|
`id` int(20) NOT NULL AUTO_INCREMENT,
|
|
`uid` int(20) NOT NULL,
|
|
`itemId` varchar(100) NOT NULL,
|
|
`realm` varchar(50) NOT NULL,
|
|
`owner` varchar(100) NOT NULL,
|
|
`admin` varchar(100) NOT NULL,
|
|
`dep` varchar(100) NOT NULL,
|
|
`num` int(20) ZEROFILL NOT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for operation_log
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `operation_log`;
|
|
CREATE TABLE `operation_log` (
|
|
`id` int(20) NOT NULL AUTO_INCREMENT,
|
|
`account` varchar(100) NOT NULL,
|
|
`method` varchar(64) NOT NULL,
|
|
`url` varchar(100) NOT NULL,
|
|
`data` mediumblob NOT NULL,
|
|
`ctime` datetime NOT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for notice
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `notice`;
|
|
CREATE TABLE `notice` (
|
|
`id` int(11) PRIMARY KEY AUTO_INCREMENT,
|
|
`noticeId` int(11) NOT NULL DEFAULT 0,
|
|
`noticeType` int(11) NOT NULL DEFAULT 0,
|
|
`state` int(3) NOT NULL DEFAULT 0,
|
|
`startTime` datetime(0) NULL DEFAULT NULL,
|
|
`endTime` datetime(0) NULL DEFAULT NULL,
|
|
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`content` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
|
`icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
|
`pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
|
`jump` int(3) NULL DEFAULT NULL,
|
|
`popUp` tinyint(1) NULL DEFAULT NULL,
|
|
`sort` int(3) NOT NULL,
|
|
`link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
|
`realmlist` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`triggertype` int(11) NOT NULL DEFAULT 1,
|
|
`openserverstartday` int(11) NULL DEFAULT 0,
|
|
`openserverstarttime` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
|
`openserverendday` int(11) NULL DEFAULT 0,
|
|
`openserverendtime` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
|
`dungeonid` int(11) NULL DEFAULT 0,
|
|
`updatetime` datetime(0) NULL DEFAULT NULL,
|
|
`Intervaldays` int(11) NOT NULL,
|
|
`isshowtimetext` tinyint(1) NULL DEFAULT NULL,
|
|
`aotupop` tinyint(1) NOT NULL DEFAULT 0,
|
|
`giftbagcustoms` int(11) NOT NULL DEFAULT 0,
|
|
`jumpParam` int(11) NULL DEFAULT NULL,
|
|
`customRealmStr` varchar(256) not null default '' ,
|
|
`timeParamStr` varchar(256) not null default '' ,
|
|
`areaNameList` varchar(256) not null default '' ,
|
|
`language` varchar(64) NOT NULL,
|
|
`data` blob NULL DEFAULT NULL,
|
|
`pageType` int(11) not null DEFAULT 1,
|
|
`seq` int(11) not null DEFAULT 0,
|
|
index (noticeId)
|
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for noticelamp
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `noticelamp`;
|
|
CREATE TABLE `noticelamp` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`content` varchar(2550) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`cycleTimeType` int(11) NOT NULL,
|
|
`triggerTime` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`showInterval` int(11) NOT NULL,
|
|
`showCount` int(11) NOT NULL,
|
|
`realms` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
-- ----------------------------
|
|
-- Table structure for notice backgroungs
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `noticebackgrounds`;
|
|
CREATE TABLE `noticebackgrounds` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`state` int(11) NOT NULL,
|
|
`language` varchar(64) NOT NULL,
|
|
`startTime` datetime(0) NULL DEFAULT NULL,
|
|
`endTime` datetime(0) NULL DEFAULT NULL,
|
|
`pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
index (language)
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for 兑换码
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `tbexchange_code`;
|
|
CREATE TABLE `tbexchange_code` (
|
|
`exchangeCodeId` int NOT NULL AUTO_INCREMENT,
|
|
`exchangeCode` varchar(64) NOT NULL UNIQUE,
|
|
`maxExchangeNum` int ZEROFILL NOT NULL ,
|
|
`exchangeNum` int ZEROFILL NOT NULL ,
|
|
`mainline` int NOT NULL ,
|
|
`status` int NOT NULL ,
|
|
`beginTime` bigint NOT NULL ,
|
|
`endTime` bigint NOT NULL ,
|
|
`content` blob NOT NULL ,
|
|
`type` int NOT NULL ,
|
|
PRIMARY KEY (`exchangeCodeId`),
|
|
index (exchangeCode)
|
|
)ENGINE=InnoDB AUTO_INCREMENT = 500 DEFAULT CHARSET = utf8mb4;
|
|
|
|
|
|
-- ----------------------------
|
|
-- Table structure for exchange
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `exchange`;
|
|
CREATE TABLE `exchange` (
|
|
`exchangecode` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
|
|
`exchangenum` int(11) NOT NULL,
|
|
`expirationtime` datetime(6) NULL DEFAULT NULL,
|
|
`gamelevel` int(11) NULL DEFAULT NULL,
|
|
`exchangecontent` blob NOT NULL,
|
|
`quantityexchanged` int(11) NULL DEFAULT NULL,
|
|
`remainingquantity` int(11) NULL DEFAULT NULL
|
|
) ENGINE = InnoDB CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
-- ----------------------------
|
|
-- Table structure for exchange
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `player_op`;
|
|
CREATE TABLE `player_op` (
|
|
`Id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`uid` bigint(20) NOT NULL,
|
|
`uidList` varchar(4000) NULL DEFAULT NULL,
|
|
`type` int not null default 0,
|
|
`opUser` varchar(30) NOT NULL,
|
|
`opId` int(11) NOT NULL,
|
|
`opType` int(11) NOT NULL,
|
|
`opNum` int(11) NOT NULL,
|
|
`uniqueId` varchar(30) NOT NULL,
|
|
`createtime` datetime(0) NOT NULL,
|
|
`exData` blob NULL DEFAULT NULL,
|
|
PRIMARY KEY (`Id`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
-- ----------------------------
|
|
-- Table structure for exchangerecord
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `exchangerecord`;
|
|
CREATE TABLE `exchangerecord` (
|
|
`exchangecode` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
|
|
`uid` bigint(20) NOT NULL
|
|
) ENGINE = InnoDB CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
|
|
|
|
SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
-- 替换结束符
|
|
delimiter //
|
|
|
|
-- exchange_record表
|
|
CREATE procedure create_table()
|
|
BEGIN
|
|
DECLARE `@i` int(11);
|
|
DECLARE `@sqlstr` varchar(2560);
|
|
SET `@i`= 1;
|
|
WHILE `@i` <= 100 DO
|
|
SET @sqlstr = CONCAT(
|
|
"create table tbexchange_record_",
|
|
`@i`,
|
|
"(
|
|
`codeId` int(11) NOT NULL COMMENT '兑换码id',
|
|
`groupId` int(11) NOT NULL COMMENT '组id',
|
|
`codeIndex` int(11) NOT NULL COMMENT '序号',
|
|
`code` varchar(64) NOT NULL COMMENT '兑换码',
|
|
`uid` bigint(20) NOT NULL default 0,
|
|
PRIMARY KEY (`codeId`,`groupId`,`codeIndex`),
|
|
KEY `uidMap` (`codeId`,`groupId`,`uid`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"
|
|
);
|
|
prepare stmt from @sqlstr;
|
|
execute stmt;
|
|
|
|
SET `@i` = `@i` + 1;
|
|
END WHILE;
|
|
END;
|
|
call create_table();
|
|
drop procedure create_table;
|
|
|
|
-- exchange_record_common_表
|
|
CREATE procedure create_table()
|
|
BEGIN
|
|
DECLARE `@i` int(11);
|
|
DECLARE `@sqlstr` varchar(2560);
|
|
SET `@i`= 1;
|
|
WHILE `@i` <= 100 DO
|
|
SET @sqlstr = CONCAT(
|
|
"create table tbexchange_record_common_",
|
|
`@i`,
|
|
"(
|
|
`codeId` int(11) NOT NULL COMMENT '兑换码id',
|
|
`uid` bigint(20) NOT NULL default 0,
|
|
PRIMARY KEY (`codeId`,`uid`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"
|
|
);
|
|
prepare stmt from @sqlstr;
|
|
execute stmt;
|
|
|
|
SET `@i` = `@i` + 1;
|
|
END WHILE;
|
|
END;
|
|
call create_table();
|
|
drop procedure create_table;
|
|
|
|
|
|
//
|
|
|
|
-- 恢复结束符;
|
|
delimiter ;
|
|
|