order-number-generator

单号生成方案

数字和字符组成的序列

1
2
3
4
5
6
7
8
CREATE DATABASE books CHARACTER SET utf8 COLLATE utf8_general_ci;
USE books;

CREATE TABLE IF NOT EXISTS `book_order_sequence` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`generate_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(`id`)
) ENGINE = InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

推荐文章