mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-22 12:48:59 +08:00
feat: docker-compose 中间件一键搭建脚本整理
This commit is contained in:
parent
719dc58cf3
commit
c85a62aa15
6
.gitignore
vendored
6
.gitignore
vendored
@ -9,12 +9,16 @@ out
|
||||
gen
|
||||
target
|
||||
*.log
|
||||
logs
|
||||
data
|
||||
|
||||
docs/docker/minio/config
|
||||
|
||||
# Nacos
|
||||
!**/nacos/target
|
||||
**/nacos/bin/work
|
||||
**/nacos/data
|
||||
logs
|
||||
|
||||
**/nacos/LICENSE
|
||||
**/nacos/NOTICE
|
||||
|
||||
|
129
docs/docker/docker-compose.yml
Normal file
129
docs/docker/docker-compose.yml
Normal file
@ -0,0 +1,129 @@
|
||||
|
||||
|
||||
version: '3'
|
||||
|
||||
# 创建一个名为 "mall" 的桥接网络
|
||||
networks:
|
||||
mall:
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0.29
|
||||
container_name: mysql
|
||||
restart: unless-stopped # 重启策略:除非手动停止容器,否则自动重启
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- LANG= en_US.UTF-8
|
||||
- MYSQL_ROOT_PASSWORD=123456 #设置 root 用户的密码
|
||||
volumes:
|
||||
- ./mysql/conf/my.cnf:/etc/my.cnf # 挂载 my.cnf 文件到容器的指定路径
|
||||
- ./mysql/data:/var/lib/mysql # 持久化 MySQL 数据
|
||||
- ../sql/mysql8:/docker-entrypoint-initdb.d # 初始化 SQL 脚本目录
|
||||
ports:
|
||||
- 3306:3306 # 暴露 3306 端口
|
||||
networks:
|
||||
- mall # 加入 "mall" 网络
|
||||
|
||||
nacos:
|
||||
image: nacos/nacos-server:v2.2.3 # 使用 Nacos 2.2.3 镜像
|
||||
container_name: nacos-server
|
||||
restart: unless-stopped # 重启策略:除非手动停止容器,否则自动重启
|
||||
environment:
|
||||
- MODE=standalone
|
||||
- SPRING_DATASOURCE_PLATFORM=mysql
|
||||
- MYSQL_SERVICE_HOST=mysql
|
||||
- MYSQL_SERVICE_PORT=3306
|
||||
- MYSQL_SERVICE_DB_NAME=nacos_config
|
||||
- MYSQL_SERVICE_USER=root
|
||||
- MYSQL_SERVICE_PASSWORD=123456
|
||||
volumes:
|
||||
- ./logs:/home/nacos/logs
|
||||
ports:
|
||||
- 8848:8848
|
||||
- 9848:9848
|
||||
networks:
|
||||
- mall # 加入 "mall" 网络
|
||||
depends_on:
|
||||
- mysql # 保证 MySQL 服务先启动
|
||||
|
||||
# https://seata.apache.org/zh-cn/docs/ops/deploy-by-docker-compose#nacos%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83db%E5%AD%98%E5%82%A8
|
||||
seata:
|
||||
image: seataio/seata-server:1.7.1
|
||||
container_name: seata-server
|
||||
restart: unless-stopped # 指定了容器的重启策略,除了手动停止容器,其他情况都自动重启容器
|
||||
environment:
|
||||
- STORE_MODE=db
|
||||
- SEATA_IP=192.168.31.134
|
||||
- SEATA_PORT=8091
|
||||
volumes:
|
||||
- ./seata/config:/seata-server/resources
|
||||
- ./seata/logs:/root/logs/seata
|
||||
ports:
|
||||
- 8091:8091
|
||||
- 7091:7091
|
||||
networks:
|
||||
- mall # 加入 "mall" 网络
|
||||
depends_on:
|
||||
- nacos
|
||||
|
||||
redis:
|
||||
image: redis:7.2.3
|
||||
container_name: redis
|
||||
restart: unless-stopped # 重启策略:除非手动停止容器,否则自动重启
|
||||
command: redis-server /etc/redis/redis.conf --requirepass 123456 --appendonly no # 启动 Redis 服务并添加密码为:123456,默认不开启 Redis AOF 方式持久化配置
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
volumes:
|
||||
- ./redis/data:/data
|
||||
- ./redis/config/redis.conf:/etc/redis/redis.conf
|
||||
ports:
|
||||
- 6379:6379
|
||||
networks:
|
||||
- mall
|
||||
|
||||
minio:
|
||||
image: minio/minio:latest
|
||||
container_name: minio
|
||||
restart: unless-stopped # 重启策略:除非手动停止容器,否则自动重启
|
||||
command: server /data --console-address ":9090"
|
||||
ports:
|
||||
- 9001:9000
|
||||
- 9090:9090
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- LANG=en_US.UTF-8
|
||||
- MINIO_ROOT_USER=minioadmin
|
||||
- MINIO_ROOT_PASSWORD=minioadmin
|
||||
volumes:
|
||||
- ./minio/data:/data
|
||||
- ./minio/config:/root/.minio
|
||||
networks:
|
||||
- mall
|
||||
|
||||
rabbitmq:
|
||||
image: rabbitmq:management
|
||||
container_name: rabbitmq
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- RABBITMQ_DEFAULT_USER=admin
|
||||
- RABBITMQ_DEFAULT_PASS=admin
|
||||
ports:
|
||||
- 5672:5672
|
||||
- 15672:15672
|
||||
networks:
|
||||
- mall # 加入 "mall" 网络
|
||||
|
||||
xxl-job-admin:
|
||||
image: xuxueli/xxl-job-admin:2.4.0 # https://hub.docker.com/r/xuxueli/xxl-job-admin/tags
|
||||
container_name: xxl-job-admin
|
||||
restart: unless-stopped # 指定了容器的重启策略,除了手动停止容器,其他情况都自动重启容器
|
||||
environment:
|
||||
PARAMS: '--spring.datasource.url=jdbc:mysql://mysql:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai --spring.datasource.username=root --spring.datasource.password=123456 --spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver'
|
||||
volumes:
|
||||
- ./xxljob/logs:/data/applogs
|
||||
ports:
|
||||
- 8181:8080
|
||||
networks:
|
||||
- mall
|
41
docs/docker/mysql/conf/my.cnf
Normal file
41
docs/docker/mysql/conf/my.cnf
Normal file
@ -0,0 +1,41 @@
|
||||
# 服务端参数配置
|
||||
[mysqld]
|
||||
skip-name-resolve
|
||||
user=mysql # MySQL启动用户
|
||||
default-storage-engine=INNODB # 创建新表时将使用的默认存储引擎
|
||||
character-set-server=utf8mb4 # 设置mysql服务端默认字符集
|
||||
collation-server = utf8mb4_general_ci # 数据库字符集对应一些排序等规则,注意要和character-set-server对应
|
||||
|
||||
pid-file = /var/lib/mysql/mysqld.pid # pid文件所在目录
|
||||
socket = /var/lib/mysql/mysqld.sock # 用于本地连接的socket套接字
|
||||
datadir = /var/lib/mysql # 数据文件存放的目录
|
||||
bind-address = 127.0.0.1 # MySQL绑定IP
|
||||
expire_logs_days= 7 # 定义清除过期日志的时间(这里设置为7天)
|
||||
|
||||
# 设置client连接mysql时的字符集,防止乱码
|
||||
init_connect='SET NAMES utf8mb4'
|
||||
|
||||
# 是否对sql语句大小写敏感,1表示不敏感
|
||||
lower_case_table_names = 1
|
||||
|
||||
# 执行sql的模式,规定了sql的安全等级, 暂时屏蔽,my.cnf文件中配置报错
|
||||
#sql_mode = STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
||||
|
||||
# 事务隔离级别,默认为可重复读,mysql默认可重复读级别(此级别下可能参数很多间隙锁,影响性能)
|
||||
transaction_isolation = READ-COMMITTED
|
||||
|
||||
# TIMESTAMP如果没有显示声明NOT NULL,允许NULL值
|
||||
explicit_defaults_for_timestamp = true
|
||||
|
||||
#它控制着mysqld进程能使用的最大文件描述(FD)符数量。
|
||||
#需要注意的是这个变量的值并不一定是你设定的值,mysqld会在系统允许的情况下尽量获取更多的FD数量
|
||||
open_files_limit = 65535
|
||||
|
||||
# 允许最大连接数
|
||||
max_connections=200
|
||||
|
||||
#最大错误连接数
|
||||
max_connect_errors = 1000
|
||||
|
||||
[client]
|
||||
default-character-set=utf8mb4 # 设置mysql客户端默认字符集
|
2297
docs/docker/redis/config/redis.conf
Normal file
2297
docs/docker/redis/config/redis.conf
Normal file
File diff suppressed because it is too large
Load Diff
13
docs/docker/run.md
Normal file
13
docs/docker/run.md
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
# MySQL
|
||||
|
||||
## 安装
|
||||
|
||||
```bash
|
||||
docker-compose -f docker-compose.yml -p youlai-mall up -d
|
||||
```
|
||||
## 卸载
|
||||
```bash
|
||||
docker-compose -f docker-compose.yml -p youlai-mall down
|
||||
```
|
||||
|
@ -0,0 +1 @@
|
||||
io.seata.server.auth.DefaultCheckAuthHandler
|
@ -0,0 +1,2 @@
|
||||
io.seata.server.storage.redis.lock.RedisDistributedLocker
|
||||
io.seata.server.storage.db.lock.DataBaseDistributedLocker
|
@ -0,0 +1,3 @@
|
||||
io.seata.server.store.DbcpDataSourceProvider
|
||||
io.seata.server.store.DruidDataSourceProvider
|
||||
io.seata.server.store.HikariDataSourceProvider
|
@ -0,0 +1,4 @@
|
||||
io.seata.server.transaction.at.ATCore
|
||||
io.seata.server.transaction.tcc.TccCore
|
||||
io.seata.server.transaction.saga.SagaCore
|
||||
io.seata.server.transaction.xa.XACore
|
@ -0,0 +1,3 @@
|
||||
io.seata.server.storage.db.lock.DataBaseLockManager
|
||||
io.seata.server.storage.file.lock.FileLockManager
|
||||
io.seata.server.storage.redis.lock.RedisLockManager
|
@ -0,0 +1,3 @@
|
||||
io.seata.server.storage.file.session.FileSessionManager
|
||||
io.seata.server.storage.db.session.DataBaseSessionManager
|
||||
io.seata.server.storage.redis.session.RedisSessionManager
|
@ -0,0 +1,22 @@
|
||||
{
|
||||
"groups": [],
|
||||
"properties": [
|
||||
{
|
||||
"name": "logging.extend.kafka-appender.bootstrap-servers",
|
||||
"type": "java.lang.String",
|
||||
"defaultValue": "localhost:9092"
|
||||
},
|
||||
{
|
||||
"name": "logging.extend.kafka-appender.topic",
|
||||
"type": "java.lang.String",
|
||||
"defaultValue": "logback_to_logstash"
|
||||
},
|
||||
{
|
||||
"name": "logging.extend.logstash-appender.destination",
|
||||
"type": "java.lang.String",
|
||||
"defaultValue": "localhost:4560"
|
||||
}
|
||||
],
|
||||
"hints": [
|
||||
]
|
||||
}
|
4
docs/docker/seata/config/META-INF/spring.factories
Normal file
4
docs/docker/seata/config/META-INF/spring.factories
Normal file
@ -0,0 +1,4 @@
|
||||
org.springframework.context.ApplicationListener=\
|
||||
io.seata.server.spring.listener.ServerApplicationListener
|
||||
org.springframework.context.ApplicationContextInitializer=\
|
||||
io.seata.server.spring.listener.SeataPropertiesLoader
|
59
docs/docker/seata/config/application.yml
Normal file
59
docs/docker/seata/config/application.yml
Normal file
@ -0,0 +1,59 @@
|
||||
# Copyright 1999-2019 Seata.io Group.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
server:
|
||||
port: 7091
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: seata-server
|
||||
|
||||
logging:
|
||||
config: classpath:logback-spring.xml
|
||||
file:
|
||||
path: ${log.home:${user.home}/logs/seata}
|
||||
console:
|
||||
user:
|
||||
username: seata
|
||||
password: seata
|
||||
|
||||
seata:
|
||||
config:
|
||||
# support: nacos, consul, apollo, zk, etcd3
|
||||
type: nacos
|
||||
nacos:
|
||||
server-addr: 192.168.31.134:8848
|
||||
namespace:
|
||||
group: SEATA_GROUP
|
||||
username: nacos
|
||||
password: nacos
|
||||
data-id: seataServer.properties
|
||||
|
||||
registry:
|
||||
# support: nacos, eureka, redis, zk, consul, etcd3, sofa
|
||||
type: nacos
|
||||
nacos:
|
||||
application: seata-server
|
||||
server-addr: 192.168.31.134:8848
|
||||
namespace:
|
||||
group: SEATA_GROUP
|
||||
# tc集群名称
|
||||
cluster: default
|
||||
username:
|
||||
password:
|
||||
security:
|
||||
secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
|
||||
tokenValidityInMilliseconds: 1800000
|
||||
ignore:
|
||||
urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login
|
23
docs/docker/seata/config/docker/seata-server-entrypoint.sh
Normal file
23
docs/docker/seata/config/docker/seata-server-entrypoint.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# Copyright 1999-2019 Seata.io Group.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# entrypoint for server
|
||||
|
||||
. /seata-setup.sh
|
||||
JAVA_OPT=${JAVA_OPT//"//"/"/"}
|
||||
echo "Affected JVM parameters:$JAVA_OPT"
|
||||
exec java $JAVA_OPT \
|
||||
-cp $( cat /seata-server/jib-classpath-file ) \
|
||||
$( cat /seata-server/jib-main-class-file )
|
30
docs/docker/seata/config/file.conf
Normal file
30
docs/docker/seata/config/file.conf
Normal file
@ -0,0 +1,30 @@
|
||||
#For details about configuration items, see https://seata.io/zh-cn/docs/user/configurations.html
|
||||
#Transport configuration, for client and server
|
||||
#https://github.com/seata/seata/blob/1.8.0/script/config-center/config.txt
|
||||
|
||||
|
||||
|
||||
#For details about configuration items, see https://seata.io/zh-cn/docs/user/configurations.html
|
||||
store {
|
||||
## store mode: file、db
|
||||
mode = "db"
|
||||
lock {
|
||||
mode: "db"
|
||||
}
|
||||
session {
|
||||
mode: "db"
|
||||
}
|
||||
|
||||
## database store property
|
||||
db {
|
||||
## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp) etc.
|
||||
datasource = "druid"
|
||||
## mysql/oracle/h2/oceanbase etc.
|
||||
dbType = "mysql"
|
||||
driverClassName = "com.mysql.cj.jdbc.Driver"
|
||||
## if using mysql to store the data, recommend add rewriteBatchedStatements=true in jdbc connection param
|
||||
url = "jdbc:mysql://192.168.31.134:3306/seata?useUnicode=true&rewriteBatchedStatements=true"
|
||||
user = "root"
|
||||
password = "123456"
|
||||
}
|
||||
}
|
80
docs/docker/seata/config/logback-spring.xml
Normal file
80
docs/docker/seata/config/logback-spring.xml
Normal file
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright 1999-2019 Seata.io Group.
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- Context listeners -->
|
||||
<contextListener class="io.seata.server.logging.listener.SystemPropertyLoggerContextListener"/>
|
||||
|
||||
<!-- The conversion rules are copied from `defaults.xml` in the `spring-boot-xxx.jar` -->
|
||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
|
||||
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
|
||||
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
|
||||
<!-- The custom conversion rules -->
|
||||
<conversionRule conversionWord="wEx2" converterClass="io.seata.server.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
|
||||
|
||||
<!-- common properties -->
|
||||
<springProperty name="PORT" source="server.port" defaultValue="7091"/>
|
||||
<springProperty name="LOG_BASH_DIR" source="spring.config.additional-location" defaultValue="" />
|
||||
<springProperty name="APPLICATION_NAME" source="spring.application.name" defaultValue="seata-server"/>
|
||||
|
||||
<if condition='property("LOG_BASH_DIR").equals("")'>
|
||||
<then>
|
||||
<!-- console-appender -->
|
||||
<include resource="logback/console-appender.xml"/>
|
||||
|
||||
<!-- file-appender -->
|
||||
<include resource="logback/file-appender.xml"/>
|
||||
|
||||
<!-- logstash-appender: off by default -->
|
||||
<!--<include resource="logback/logstash-appender.xml"/>-->
|
||||
|
||||
<!-- kafka-appender: off by default -->
|
||||
<!--<include resource="logback/kafka-appender.xml"/>-->
|
||||
</then>
|
||||
<else>
|
||||
<!-- console-appender -->
|
||||
<include file="${LOG_BASH_DIR}/logback/console-appender.xml"/>
|
||||
|
||||
<!-- file-appender -->
|
||||
<include file="${LOG_BASH_DIR}/logback/file-appender.xml"/>
|
||||
|
||||
<!-- logstash-appender: off by default -->
|
||||
<!--<include resource="${LOG_BASH_DIR}/logback/logstash-appender.xml"/>-->
|
||||
|
||||
<!-- kafka-appender: off by default -->
|
||||
<!--<include resource="${LOG_BASH_DIR}/logback/kafka-appender.xml"/>-->
|
||||
</else>
|
||||
</if>
|
||||
|
||||
<root level="INFO">
|
||||
<!-- console-appender -->
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
|
||||
<!-- file-appender -->
|
||||
<appender-ref ref="FILE_ALL"/>
|
||||
<appender-ref ref="FILE_WARN"/>
|
||||
<appender-ref ref="FILE_ERROR"/>
|
||||
|
||||
<!-- logstash-appender: off by default -->
|
||||
<!--<appender-ref ref="LOGSTASH"/>-->
|
||||
|
||||
<!-- kafka-appender: off by default -->
|
||||
<!--<appender-ref ref="KAFKA"/>-->
|
||||
</root>
|
||||
<logger name="org.springframework.security.config.annotation.web.builders.WebSecurity" level="ERROR"/>
|
||||
<logger name="org.springframework.security.web.DefaultSecurityFilterChain" level="ERROR"/>
|
||||
</configuration>
|
29
docs/docker/seata/config/logback/console-appender.xml
Normal file
29
docs/docker/seata/config/logback/console-appender.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright 1999-2019 Seata.io Group.
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<included>
|
||||
<!-- console-appender properties -->
|
||||
<springProperty name="CONSOLE_LOG_PATTERN" source="logging.pattern.console"
|
||||
defaultValue="%clr(%d{HH:mm:ss.SSS}){faint} %clr(%5p) %clr(---){faint} %clr([%25.25t]){faint} %clr([%-30.30logger]){cyan} %clr([%20.20M]){faint} %clr([%X{X-TX-XID:-}]){faint} %clr(:){faint} %m%n%wEx2"/>
|
||||
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</included>
|
85
docs/docker/seata/config/logback/file-appender.xml
Normal file
85
docs/docker/seata/config/logback/file-appender.xml
Normal file
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright 1999-2019 Seata.io Group.
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<included>
|
||||
<!-- file-appender properties -->
|
||||
<springProperty name="LOG_FILE_PATH" source="logging.file.path"
|
||||
defaultValue="${user.home}/logs/seata"/>
|
||||
<springProperty name="FILE_LOG_PATTERN" source="logging.pattern.file"
|
||||
defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p --- [%t] [%logger] [%M] [%X{X-TX-XID:-}]: %m%n%wEx2"/>
|
||||
|
||||
<!--ALL-->
|
||||
<appender name="FILE_ALL" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_FILE_PATH}/${APPLICATION_NAME:-seata-server}.${RPC_PORT}.all.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_PATH}/history/${APPLICATION_NAME:-seata-server}.${RPC_PORT}.all.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<maxFileSize>2GB</maxFileSize>
|
||||
<MaxHistory>7</MaxHistory>
|
||||
<totalSizeCap>7GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<Pattern>${FILE_LOG_PATTERN}</Pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--WARN-->
|
||||
<appender name="FILE_WARN" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>WARN</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
<file>${LOG_FILE_PATH}/${APPLICATION_NAME:-seata-server}.${RPC_PORT}.warn.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_PATH}/history/${APPLICATION_NAME:-seata-server}.${RPC_PORT}.warn.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<maxFileSize>2GB</maxFileSize>
|
||||
<MaxHistory>7</MaxHistory>
|
||||
<totalSizeCap>7GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<Pattern>${FILE_LOG_PATTERN}</Pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--ERROR-->
|
||||
<appender name="FILE_ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
<file>${LOG_FILE_PATH}/${APPLICATION_NAME:-seata-server}.${RPC_PORT}.error.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_PATH}/history/${APPLICATION_NAME:-seata-server}.${RPC_PORT}.error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<maxFileSize>2GB</maxFileSize>
|
||||
<MaxHistory>7</MaxHistory>
|
||||
<totalSizeCap>7GB</totalSizeCap>
|
||||
<cleanHistoryOnStart>true</cleanHistoryOnStart>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<Pattern>${FILE_LOG_PATTERN}</Pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</included>
|
50
docs/docker/seata/config/logback/kafka-appender.xml
Normal file
50
docs/docker/seata/config/logback/kafka-appender.xml
Normal file
@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright 1999-2019 Seata.io Group.
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<included>
|
||||
<!-- kafka-appender properties -->
|
||||
<springProperty name="KAFKA_BOOTSTRAP_SERVERS" source="logging.extend.kafka-appender.bootstrap-servers"
|
||||
defaultValue="127.0.0.1:9092"/>
|
||||
<springProperty name="KAFKA_TOPIC" source="logging.extend.kafka-appender.topic"
|
||||
defaultValue="logback_to_logstash"/>
|
||||
|
||||
<appender name="KAFKA" class="com.github.danielwegener.logback.kafka.KafkaAppender">
|
||||
<encoder>
|
||||
<!--<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS}|%p|${APPLICATION_NAME:-seata-server}|${RPC_PORT:-0}|%t|%logger|%X{X-TX-XID:-}|%X{X-TX-BRANCH-ID:-}|%m|%wex</pattern>-->
|
||||
<pattern>{
|
||||
"@timestamp": "%d{yyyy-MM-dd HH:mm:ss.SSS}",
|
||||
"level":"%p",
|
||||
"app_name":"${APPLICATION_NAME:-seata-server}",
|
||||
"PORT": ${RPC_PORT:-0},
|
||||
"thread_name": "%t",
|
||||
"logger_name": "%logger",
|
||||
"X-TX-XID": "%X{X-TX-XID:-}",
|
||||
"X-TX-BRANCH-ID": "%X{X-TX-BRANCH-ID:-}",
|
||||
"message": "%m",
|
||||
"stack_trace": "%wex"
|
||||
}
|
||||
</pattern>
|
||||
</encoder>
|
||||
<topic>${KAFKA_TOPIC}</topic>
|
||||
<keyingStrategy class="com.github.danielwegener.logback.kafka.keying.NoKeyKeyingStrategy"/>
|
||||
<deliveryStrategy class="com.github.danielwegener.logback.kafka.delivery.AsynchronousDeliveryStrategy"/>
|
||||
<producerConfig>bootstrap.servers=${KAFKA_BOOTSTRAP_SERVERS}</producerConfig>
|
||||
<producerConfig>acks=0</producerConfig>
|
||||
<producerConfig>linger.ms=1000</producerConfig>
|
||||
<producerConfig>max.block.ms=0</producerConfig>
|
||||
</appender>
|
||||
</included>
|
45
docs/docker/seata/config/logback/logstash-appender.xml
Normal file
45
docs/docker/seata/config/logback/logstash-appender.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright 1999-2019 Seata.io Group.
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<included>
|
||||
<!-- logstash-appender properties -->
|
||||
<springProperty name="LOGSTASH_DESTINATION" source="logging.extend.logstash-appender.destination"
|
||||
defaultValue="127.0.0.1:4560"/>
|
||||
|
||||
<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
|
||||
<!-- the TCP address of the logstash -->
|
||||
<destination>${LOGSTASH_DESTINATION}</destination>
|
||||
|
||||
<!--<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">-->
|
||||
<encoder charset="UTF-8" class="io.seata.server.logging.logback.appender.EnhancedLogstashEncoder">
|
||||
<!-- the global custom fields -->
|
||||
<customFields>
|
||||
{
|
||||
"app_name": "${APPLICATION_NAME:-seata-server}"
|
||||
}
|
||||
</customFields>
|
||||
|
||||
<!-- Exclude the provider of data `@version` -->
|
||||
<excludeProvider>net.logstash.logback.composite.LogstashVersionJsonProvider</excludeProvider>
|
||||
<!-- Exclude providers that are not currently needed, reduce some performance loss. -->
|
||||
<excludeProvider>net.logstash.logback.composite.loggingevent.JsonMessageJsonProvider</excludeProvider>
|
||||
<excludeProvider>net.logstash.logback.composite.loggingevent.TagsJsonProvider</excludeProvider>
|
||||
<excludeProvider>net.logstash.logback.composite.loggingevent.LogstashMarkersJsonProvider</excludeProvider>
|
||||
<excludeProvider>net.logstash.logback.composite.loggingevent.ArgumentsJsonProvider</excludeProvider>
|
||||
</encoder>
|
||||
</appender>
|
||||
</included>
|
52
docs/docker/seata/config/redislocker/redislock.lua
Normal file
52
docs/docker/seata/config/redislocker/redislock.lua
Normal file
@ -0,0 +1,52 @@
|
||||
--
|
||||
-- User: tianyu.li
|
||||
-- Date: 2021/1/19
|
||||
--
|
||||
-- init data
|
||||
local array = {}; local result; local keySize = ARGV[1]; local argSize = ARGV[2];
|
||||
-- Loop through all keys to see if they can be used , when a key is not available, exit
|
||||
for i= 1, keySize do
|
||||
-- search lock xid
|
||||
result = redis.call('HGET',KEYS[i],'xid');
|
||||
-- if lock xid is nil
|
||||
if (not result)
|
||||
-- set 'no' mean There is need to store lock information
|
||||
then array[i]='no'
|
||||
else
|
||||
if (result ~= ARGV[3])
|
||||
then
|
||||
-- return fail
|
||||
return result
|
||||
else
|
||||
-- set 'yes' mean There is not need to store lock information
|
||||
array[i]= 'yes'
|
||||
end
|
||||
end
|
||||
end
|
||||
-- Loop through array
|
||||
for i =1, keySize do
|
||||
-- if is no ,The lock information is stored
|
||||
if(array[i] == 'no')
|
||||
then
|
||||
-- set xid
|
||||
redis.call('HSET',KEYS[i],'xid',ARGV[3]);
|
||||
-- set transactionId
|
||||
redis.call('HSET',KEYS[i],'transactionId',ARGV[(i-1)*6+4]);
|
||||
-- set branchId
|
||||
redis.call('HSET',KEYS[i],'branchId',ARGV[(i-1)*6+5]);
|
||||
-- set resourceId
|
||||
redis.call('HSET',KEYS[i],'resourceId',ARGV[(i-1)*6+6]);
|
||||
-- set tableName
|
||||
redis.call('HSET',KEYS[i],'tableName',ARGV[(i-1)*6+7]);
|
||||
-- set rowKey
|
||||
redis.call('HSET',KEYS[i],'rowKey',ARGV[(i-1)*6+8]);
|
||||
-- set pk
|
||||
redis.call('HSET',KEYS[i],'pk',ARGV[(i-1)*6+9]);
|
||||
-- exit if
|
||||
end
|
||||
-- exit for
|
||||
end
|
||||
-- set SEATA_GLOBAL_LOCK
|
||||
redis.call('HSET',KEYS[(keySize+1)],KEYS[(keySize+2)],ARGV[(argSize+0)]);
|
||||
-- return success
|
||||
return ARGV[3]
|
Binary file not shown.
@ -34,7 +34,7 @@ CREATE TABLE `oms_order` (
|
||||
`delivery_time` datetime NULL DEFAULT NULL COMMENT '发货时间',
|
||||
`receive_time` datetime NULL DEFAULT NULL COMMENT '确认收货时间',
|
||||
`comment_time` datetime NULL DEFAULT NULL COMMENT '评价时间',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
@ -65,7 +65,7 @@ CREATE TABLE `oms_order_delivery` (
|
||||
`delivery_status` tinyint NULL DEFAULT 0 COMMENT '物流状态【0->运输中;1->已收货】',
|
||||
`delivery_time` datetime NULL DEFAULT NULL COMMENT '发货时间',
|
||||
`receive_time` datetime NULL DEFAULT NULL COMMENT '确认收货时间',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
@ -86,7 +86,7 @@ CREATE TABLE `oms_order_item` (
|
||||
`price` bigint NOT NULL DEFAULT 0 COMMENT '商品单价(单位:分)',
|
||||
`quantity` int NULL DEFAULT NULL COMMENT '商品数量',
|
||||
`total_amount` bigint NOT NULL DEFAULT 0 COMMENT '商品总价(单位:分)',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除标识(1:已删除;0:正常)',
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除标识(1:已删除;0:正常)',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
@ -104,7 +104,7 @@ CREATE TABLE `oms_order_log` (
|
||||
`detail` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作详情',
|
||||
`order_status` int NULL DEFAULT NULL COMMENT '操作时订单状态',
|
||||
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
@ -126,7 +126,7 @@ CREATE TABLE `oms_order_pay` (
|
||||
`callback_content` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '回调内容',
|
||||
`callback_time` datetime NULL DEFAULT NULL COMMENT '回调时间',
|
||||
`pay_subject` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '交易内容',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
@ -144,7 +144,7 @@ CREATE TABLE `oms_order_setting` (
|
||||
`finish_overtime` int NULL DEFAULT NULL COMMENT '自动完成交易时间,不能申请退货(天)',
|
||||
`comment_overtime` int NULL DEFAULT NULL COMMENT '订单完成后自动好评时间(天)',
|
||||
`member_level` tinyint NULL DEFAULT NULL COMMENT '会员等级【0-不限会员等级,全部通用;其他-对应的其他会员等级】',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
|
@ -60,7 +60,7 @@ CREATE TABLE `sms_coupon` (
|
||||
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`deleted` tinyint(0) NULL DEFAULT 1 COMMENT '逻辑删除标识(0-正常;1-删除)',
|
||||
`is_deleted` tinyint(0) NULL DEFAULT 1 COMMENT '逻辑删除标识(0-正常;1-删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券表' ROW_FORMAT = Dynamic;
|
||||
|
||||
|
@ -48,7 +48,7 @@ CREATE TABLE `ums_member` (
|
||||
`session_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`status` tinyint(1) NULL DEFAULT 1,
|
||||
`point` int NULL DEFAULT 0 COMMENT '会员积分',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0,
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0,
|
||||
`create_time` datetime NULL DEFAULT NULL,
|
||||
`update_time` datetime NULL DEFAULT NULL,
|
||||
`balance` bigint NULL DEFAULT 1000000000,
|
||||
|
@ -14,7 +14,7 @@ CREATE TABLE `sys_dept` (
|
||||
`tree_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '父节点id路径',
|
||||
`sort` int NULL DEFAULT 0 COMMENT '显示顺序',
|
||||
`status` tinyint NULL DEFAULT 1 COMMENT '状态(1:正常;0:禁用)',
|
||||
`deleted` tinyint NULL DEFAULT 0 COMMENT '逻辑删除标识(1:已删除;0:未删除)',
|
||||
`is_deleted` tinyint NULL DEFAULT 0 COMMENT '逻辑删除标识(1:已删除;0:未删除)',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
@ -158,7 +158,7 @@ CREATE TABLE `sys_role` (
|
||||
`code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色编码',
|
||||
`sort` int NULL DEFAULT NULL COMMENT '显示顺序',
|
||||
`status` tinyint NULL DEFAULT 1 COMMENT '角色状态(1-正常;0-停用)',
|
||||
`deleted` tinyint NOT NULL DEFAULT 0 COMMENT '逻辑删除标识(0-未删除;1-已删除)',
|
||||
`is_deleted` tinyint NOT NULL DEFAULT 0 COMMENT '逻辑删除标识(0-未删除;1-已删除)',
|
||||
`data_scope` tinyint NULL DEFAULT NULL COMMENT '数据权限(0-所有数据;1-部门及子部门数据;2-本部门数据;3-本人数据)',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
@ -245,7 +245,7 @@ CREATE TABLE `sys_user` (
|
||||
`mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系方式',
|
||||
`status` tinyint(1) NULL DEFAULT 1 COMMENT '用户状态((1:正常;0:禁用))',
|
||||
`email` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户邮箱',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除标识(0:未删除;1:已删除)',
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除标识(0:未删除;1:已删除)',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`create_by` bigint NULL DEFAULT NULL COMMENT '创建人ID',
|
||||
|
307
docs/sql/mysql8/nacos_config.sql
Normal file
307
docs/sql/mysql8/nacos_config.sql
Normal file
File diff suppressed because one or more lines are too long
76
docs/sql/mysql8/seata.sql
Normal file
76
docs/sql/mysql8/seata.sql
Normal file
@ -0,0 +1,76 @@
|
||||
use seata;
|
||||
|
||||
-- https://github.com/seata/seata/blob/1.7.1/script/server/db/mysql.sql
|
||||
-- -------------------------------- The script used when storeMode is 'db' --------------------------------
|
||||
-- the table to store GlobalSession data
|
||||
CREATE TABLE IF NOT EXISTS `global_table`
|
||||
(
|
||||
`xid` VARCHAR(128) NOT NULL,
|
||||
`transaction_id` BIGINT,
|
||||
`status` TINYINT NOT NULL,
|
||||
`application_id` VARCHAR(32),
|
||||
`transaction_service_group` VARCHAR(32),
|
||||
`transaction_name` VARCHAR(128),
|
||||
`timeout` INT,
|
||||
`begin_time` BIGINT,
|
||||
`application_data` VARCHAR(2000),
|
||||
`gmt_create` DATETIME,
|
||||
`gmt_modified` DATETIME,
|
||||
PRIMARY KEY (`xid`),
|
||||
KEY `idx_status_gmt_modified` (`status` , `gmt_modified`),
|
||||
KEY `idx_transaction_id` (`transaction_id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
-- the table to store BranchSession data
|
||||
CREATE TABLE IF NOT EXISTS `branch_table`
|
||||
(
|
||||
`branch_id` BIGINT NOT NULL,
|
||||
`xid` VARCHAR(128) NOT NULL,
|
||||
`transaction_id` BIGINT,
|
||||
`resource_group_id` VARCHAR(32),
|
||||
`resource_id` VARCHAR(256),
|
||||
`branch_type` VARCHAR(8),
|
||||
`status` TINYINT,
|
||||
`client_id` VARCHAR(64),
|
||||
`application_data` VARCHAR(2000),
|
||||
`gmt_create` DATETIME(6),
|
||||
`gmt_modified` DATETIME(6),
|
||||
PRIMARY KEY (`branch_id`),
|
||||
KEY `idx_xid` (`xid`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
-- the table to store lock data
|
||||
CREATE TABLE IF NOT EXISTS `lock_table`
|
||||
(
|
||||
`row_key` VARCHAR(128) NOT NULL,
|
||||
`xid` VARCHAR(128),
|
||||
`transaction_id` BIGINT,
|
||||
`branch_id` BIGINT NOT NULL,
|
||||
`resource_id` VARCHAR(256),
|
||||
`table_name` VARCHAR(32),
|
||||
`pk` VARCHAR(36),
|
||||
`status` TINYINT NOT NULL DEFAULT '0' COMMENT '0:locked ,1:rollbacking',
|
||||
`gmt_create` DATETIME,
|
||||
`gmt_modified` DATETIME,
|
||||
PRIMARY KEY (`row_key`),
|
||||
KEY `idx_status` (`status`),
|
||||
KEY `idx_branch_id` (`branch_id`),
|
||||
KEY `idx_xid` (`xid`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `distributed_lock`
|
||||
(
|
||||
`lock_key` CHAR(20) NOT NULL,
|
||||
`lock_value` VARCHAR(20) NOT NULL,
|
||||
`expire` BIGINT,
|
||||
primary key (`lock_key`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
INSERT INTO `distributed_lock` (lock_key, lock_value, expire) VALUES ('AsyncCommitting', ' ', 0);
|
||||
INSERT INTO `distributed_lock` (lock_key, lock_value, expire) VALUES ('RetryCommitting', ' ', 0);
|
||||
INSERT INTO `distributed_lock` (lock_key, lock_value, expire) VALUES ('RetryRollbacking', ' ', 0);
|
||||
INSERT INTO `distributed_lock` (lock_key, lock_value, expire) VALUES ('TxTimeoutCheck', ' ', 0);
|
115
docs/sql/mysql8/xxl_job.sql
Normal file
115
docs/sql/mysql8/xxl_job.sql
Normal file
@ -0,0 +1,115 @@
|
||||
use `xxl_job`;
|
||||
|
||||
CREATE TABLE `xxl_job_info` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`job_group` int(11) NOT NULL COMMENT '执行器主键ID',
|
||||
`job_desc` varchar(255) NOT NULL,
|
||||
`add_time` datetime DEFAULT NULL,
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
`author` varchar(64) DEFAULT NULL COMMENT '作者',
|
||||
`alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
|
||||
`schedule_type` varchar(50) NOT NULL DEFAULT 'NONE' COMMENT '调度类型',
|
||||
`schedule_conf` varchar(128) DEFAULT NULL COMMENT '调度配置,值含义取决于调度类型',
|
||||
`misfire_strategy` varchar(50) NOT NULL DEFAULT 'DO_NOTHING' COMMENT '调度过期策略',
|
||||
`executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
|
||||
`executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
|
||||
`executor_param` varchar(512) DEFAULT NULL COMMENT '执行器任务参数',
|
||||
`executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
|
||||
`executor_timeout` int(11) NOT NULL DEFAULT '0' COMMENT '任务执行超时时间,单位秒',
|
||||
`executor_fail_retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '失败重试次数',
|
||||
`glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
|
||||
`glue_source` mediumtext COMMENT 'GLUE源代码',
|
||||
`glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
|
||||
`glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
|
||||
`child_jobid` varchar(255) DEFAULT NULL COMMENT '子任务ID,多个逗号分隔',
|
||||
`trigger_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '调度状态:0-停止,1-运行',
|
||||
`trigger_last_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '上次调度时间',
|
||||
`trigger_next_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '下次调度时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE `xxl_job_log` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`job_group` int(11) NOT NULL COMMENT '执行器主键ID',
|
||||
`job_id` int(11) NOT NULL COMMENT '任务,主键ID',
|
||||
`executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
|
||||
`executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
|
||||
`executor_param` varchar(512) DEFAULT NULL COMMENT '执行器任务参数',
|
||||
`executor_sharding_param` varchar(20) DEFAULT NULL COMMENT '执行器任务分片参数,格式如 1/2',
|
||||
`executor_fail_retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '失败重试次数',
|
||||
`trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
|
||||
`trigger_code` int(11) NOT NULL COMMENT '调度-结果',
|
||||
`trigger_msg` text COMMENT '调度-日志',
|
||||
`handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
|
||||
`handle_code` int(11) NOT NULL COMMENT '执行-状态',
|
||||
`handle_msg` text COMMENT '执行-日志',
|
||||
`alarm_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `I_trigger_time` (`trigger_time`),
|
||||
KEY `I_handle_code` (`handle_code`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE `xxl_job_log_report` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`trigger_day` datetime DEFAULT NULL COMMENT '调度-时间',
|
||||
`running_count` int(11) NOT NULL DEFAULT '0' COMMENT '运行中-日志数量',
|
||||
`suc_count` int(11) NOT NULL DEFAULT '0' COMMENT '执行成功-日志数量',
|
||||
`fail_count` int(11) NOT NULL DEFAULT '0' COMMENT '执行失败-日志数量',
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `i_trigger_day` (`trigger_day`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE `xxl_job_logglue` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`job_id` int(11) NOT NULL COMMENT '任务,主键ID',
|
||||
`glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
|
||||
`glue_source` mediumtext COMMENT 'GLUE源代码',
|
||||
`glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
|
||||
`add_time` datetime DEFAULT NULL,
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE `xxl_job_registry` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`registry_group` varchar(50) NOT NULL,
|
||||
`registry_key` varchar(255) NOT NULL,
|
||||
`registry_value` varchar(255) NOT NULL,
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `i_g_k_v` (`registry_group`,`registry_key`,`registry_value`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE `xxl_job_group` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
|
||||
`title` varchar(12) NOT NULL COMMENT '执行器名称',
|
||||
`address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
|
||||
`address_list` text COMMENT '执行器地址列表,多地址逗号分隔',
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE `xxl_job_user` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`username` varchar(50) NOT NULL COMMENT '账号',
|
||||
`password` varchar(50) NOT NULL COMMENT '密码',
|
||||
`role` tinyint(4) NOT NULL COMMENT '角色:0-普通用户、1-管理员',
|
||||
`permission` varchar(255) DEFAULT NULL COMMENT '权限:执行器ID列表,多个逗号分割',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `i_username` (`username`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE `xxl_job_lock` (
|
||||
`lock_name` varchar(50) NOT NULL COMMENT '锁名称',
|
||||
PRIMARY KEY (`lock_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
INSERT INTO `xxl_job_group`(`id`, `app_name`, `title`, `address_type`, `address_list`, `update_time`) VALUES (1, 'xxl-job-executor-sample', '示例执行器', 0, NULL, '2018-11-03 22:21:31' );
|
||||
INSERT INTO `xxl_job_info`(`id`, `job_group`, `job_desc`, `add_time`, `update_time`, `author`, `alarm_email`, `schedule_type`, `schedule_conf`, `misfire_strategy`, `executor_route_strategy`, `executor_handler`, `executor_param`, `executor_block_strategy`, `executor_timeout`, `executor_fail_retry_count`, `glue_type`, `glue_source`, `glue_remark`, `glue_updatetime`, `child_jobid`) VALUES (1, 1, '测试任务1', '2018-11-03 22:21:31', '2018-11-03 22:21:31', 'XXL', '', 'CRON', '0 0 0 * * ? *', 'DO_NOTHING', 'FIRST', 'demoJobHandler', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化', '2018-11-03 22:21:31', '');
|
||||
INSERT INTO `xxl_job_user`(`id`, `username`, `password`, `role`, `permission`) VALUES (1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', 1, NULL);
|
||||
INSERT INTO `xxl_job_lock` ( `lock_name`) VALUES ( 'schedule_lock');
|
||||
|
||||
commit;
|
||||
|
@ -62,7 +62,7 @@ CREATE TABLE `oms_order_delivery` (
|
||||
`delivery_status` tinyint NULL DEFAULT 0 COMMENT '物流状态【0->运输中;1->已收货】',
|
||||
`delivery_time` datetime NULL DEFAULT NULL COMMENT '发货时间',
|
||||
`receive_time` datetime NULL DEFAULT NULL COMMENT '确认收货时间',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
@ -87,7 +87,7 @@ CREATE TABLE `oms_order_item` (
|
||||
`price` bigint NOT NULL DEFAULT 0 COMMENT '商品单价(单位:分)',
|
||||
`quantity` int NULL DEFAULT NULL COMMENT '商品数量',
|
||||
`total_amount` bigint NOT NULL DEFAULT 0 COMMENT '商品总价(单位:分)',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除标识(1:已删除;0:正常)',
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除标识(1:已删除;0:正常)',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
@ -109,7 +109,7 @@ CREATE TABLE `oms_order_log` (
|
||||
`detail` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作详情',
|
||||
`order_status` int NULL DEFAULT NULL COMMENT '操作时订单状态',
|
||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '备注',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
@ -135,7 +135,7 @@ CREATE TABLE `oms_order_pay` (
|
||||
`callback_content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '回调内容',
|
||||
`callback_time` datetime NULL DEFAULT NULL COMMENT '回调时间',
|
||||
`pay_subject` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '交易内容',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
@ -182,7 +182,7 @@ CREATE TABLE `oms_order_setting` (
|
||||
`finish_overtime` int NULL DEFAULT NULL COMMENT '自动完成交易时间,不能申请退货(天)',
|
||||
`comment_overtime` int NULL DEFAULT NULL COMMENT '订单完成后自动好评时间(天)',
|
||||
`member_level` tinyint NULL DEFAULT NULL COMMENT '会员等级【0-不限会员等级,全部通用;其他-对应的其他会员等级】',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除【0->正常;1->已删除】',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
|
@ -43,7 +43,7 @@ CREATE TABLE `ums_member` (
|
||||
`session_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
`status` tinyint(1) NULL DEFAULT 1,
|
||||
`point` int NULL DEFAULT 0 COMMENT '会员积分',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0,
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0,
|
||||
`create_time` datetime NULL DEFAULT NULL,
|
||||
`update_time` datetime NULL DEFAULT NULL,
|
||||
`balance` bigint NULL DEFAULT 1000000000,
|
||||
|
@ -1,9 +1,31 @@
|
||||
|
||||
use youlai_system;
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_config
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_config`;
|
||||
CREATE TABLE `sys_config` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||
`config_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '配置名称',
|
||||
`config_key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '配置key',
|
||||
`config_value` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '配置值',
|
||||
`remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述、备注',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`create_by` bigint NULL DEFAULT NULL COMMENT '创建人ID',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`update_by` bigint NULL DEFAULT NULL COMMENT '更新人ID',
|
||||
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除标识(0-未删除 1-已删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统配置表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_config
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_config` VALUES (1, '系统限流QPS', 'IP_QPS_THRESHOLD_LIMIT', '10', '单个IP请求的最大每秒查询数(QPS)阈值Key', '2024-10-27 10:14:51', 1, NULL, NULL, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_dept
|
||||
-- ----------------------------
|
||||
@ -34,45 +56,87 @@ INSERT INTO `sys_dept` VALUES (3, '测试部门', 1, '0,1', 1, 1, NULL, '2022-04
|
||||
DROP TABLE IF EXISTS `sys_dict`;
|
||||
CREATE TABLE `sys_dict` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键 ',
|
||||
`dict_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类型编码',
|
||||
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类型名称',
|
||||
`code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类型编码',
|
||||
`status` tinyint(1) NULL DEFAULT 0 COMMENT '状态(0:正常;1:禁用)',
|
||||
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`create_by` bigint NULL DEFAULT NULL COMMENT '创建人ID',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`update_by` bigint NULL DEFAULT NULL COMMENT '修改人ID',
|
||||
`is_deleted` tinyint NULL DEFAULT 0 COMMENT '是否删除(1-删除,0-未删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `uk_code`(`code`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 89 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典类型表' ROW_FORMAT = Dynamic;
|
||||
UNIQUE INDEX `uk_code`(`dict_code` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 89 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典类型表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_dict
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_dict` VALUES (1, '性别', 'gender', 1, NULL, '2019-12-06 19:03:32', '2024-06-22 21:14:47', 0);
|
||||
INSERT INTO `sys_dict` VALUES (1, 'gender', '性别', 1, NULL, '2024-10-15 11:47:09', 1, '2024-10-15 11:47:09', 1, 0);
|
||||
INSERT INTO `sys_dict` VALUES (2, 'notice_type', '通知类型', 1, NULL, '2024-10-15 11:47:09', 1, '2024-10-15 11:47:09', 1, 0);
|
||||
INSERT INTO `sys_dict` VALUES (3, 'notice_level', '通知级别', 1, NULL, '2024-10-15 11:47:09', 1, '2024-10-15 11:47:09', 1, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_dict_item
|
||||
-- Table structure for sys_dict_data
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_dict_item`;
|
||||
CREATE TABLE `sys_dict_item` (
|
||||
DROP TABLE IF EXISTS `sys_dict_data`;
|
||||
CREATE TABLE `sys_dict_data` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`dict_id` bigint NULL DEFAULT NULL COMMENT '字典ID',
|
||||
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '字典项名称',
|
||||
`dict_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联字典编码,与sys_dict表中的dict_code对应',
|
||||
`value` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '字典项值',
|
||||
`label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '字典项标签',
|
||||
`tag_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签类型,用于前端样式展示(如success、warning等)',
|
||||
`status` tinyint NULL DEFAULT 0 COMMENT '状态(1-正常,0-禁用)',
|
||||
`sort` int NULL DEFAULT 0 COMMENT '排序',
|
||||
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`create_by` bigint NULL DEFAULT NULL COMMENT '创建人ID',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`update_by` bigint NULL DEFAULT NULL COMMENT '更新人ID',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 70 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典数据表' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典数据表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_dict_item
|
||||
-- Records of sys_dict_data
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_dict_data` VALUES (1, 'gender', '1', '男', 'primary', 1, 1, NULL, '2024-10-15 11:47:15', 1, '2024-10-15 11:47:15', 1);
|
||||
INSERT INTO `sys_dict_data` VALUES (2, 'gender', '2', '女', 'danger', 1, 2, NULL, '2024-10-15 11:47:15', 1, '2024-10-15 11:47:15', 1);
|
||||
INSERT INTO `sys_dict_data` VALUES (3, 'gender', '0', '保密', 'info', 1, 3, NULL, '2024-10-15 11:47:15', 1, '2024-10-15 11:47:15', 1);
|
||||
INSERT INTO `sys_dict_data` VALUES (4, 'notice_type', '1', '系统升级', 'success', 1, 1, '', '2024-10-15 11:47:15', 1, '2024-10-15 11:47:15', 1);
|
||||
INSERT INTO `sys_dict_data` VALUES (5, 'notice_type', '2', '系统维护', 'primary', 1, 2, '', '2024-10-15 11:47:15', 1, '2024-10-15 11:47:15', 1);
|
||||
INSERT INTO `sys_dict_data` VALUES (6, 'notice_type', '3', '安全警告', 'danger', 1, 3, '', '2024-10-15 11:47:15', 1, '2024-10-15 11:47:15', 1);
|
||||
INSERT INTO `sys_dict_data` VALUES (7, 'notice_type', '4', '假期通知', 'success', 1, 4, '', '2024-10-15 11:47:15', 1, '2024-10-15 11:47:15', 1);
|
||||
INSERT INTO `sys_dict_data` VALUES (8, 'notice_type', '5', '公司新闻', 'primary', 1, 5, '', '2024-10-15 11:47:15', 1, '2024-10-15 11:47:15', 1);
|
||||
INSERT INTO `sys_dict_data` VALUES (9, 'notice_type', '99', '其他', 'info', 1, 99, '', '2024-10-15 11:47:15', 1, '2024-10-15 11:47:15', 1);
|
||||
INSERT INTO `sys_dict_data` VALUES (10, 'notice_level', 'L', '低', 'info', 1, 1, '', '2024-10-15 11:47:15', 1, '2024-10-15 11:47:15', 1);
|
||||
INSERT INTO `sys_dict_data` VALUES (11, 'notice_level', 'M', '中', 'warning', 1, 2, '', '2024-10-15 11:47:15', 1, '2024-10-15 11:47:15', 1);
|
||||
INSERT INTO `sys_dict_data` VALUES (12, 'notice_level', 'H', '高', 'danger', 1, 3, '', '2024-10-15 11:47:15', 1, '2024-10-15 11:47:15', 1);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_log
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_log`;
|
||||
CREATE TABLE `sys_log` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`module` enum('LOGIN','USER','ROLE','DEPT','MENU','DICT','OTHER') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '日志模块',
|
||||
`content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '日志内容',
|
||||
`request_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求路径',
|
||||
`ip` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'IP地址',
|
||||
`province` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '省份',
|
||||
`city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '城市',
|
||||
`execution_time` bigint NULL DEFAULT NULL COMMENT '执行时间(ms)',
|
||||
`browser` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览器',
|
||||
`browser_version` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览器版本',
|
||||
`os` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '终端系统',
|
||||
`create_by` bigint NULL DEFAULT NULL COMMENT '创建人ID',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`is_deleted` tinyint NOT NULL DEFAULT 0 COMMENT '逻辑删除标识(1-已删除 0-未删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统日志表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_log
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_dict_item` VALUES (1, 1, '男', '1', 1, 1, NULL, '2019-05-05 13:07:52', '2022-06-12 23:20:39');
|
||||
INSERT INTO `sys_dict_item` VALUES (2, 1, '女', '2', 1, 2, NULL, '2019-04-19 11:33:00', '2019-07-02 14:23:05');
|
||||
INSERT INTO `sys_dict_item` VALUES (3, 1, '保密', '0', 1, 3, NULL, '2020-10-17 08:09:31', '2020-10-17 08:09:31');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_menu
|
||||
@ -83,7 +147,8 @@ CREATE TABLE `sys_menu` (
|
||||
`parent_id` bigint NULL DEFAULT NULL COMMENT '父菜单ID',
|
||||
`type` tinyint NULL DEFAULT NULL COMMENT '菜单类型(1:菜单;2:目录;3:外链;4:按钮)',
|
||||
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '菜单名称',
|
||||
`path` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '路由路径(浏览器地址栏路径)',
|
||||
`route_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '路由名称',
|
||||
`route_path` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '路由路径',
|
||||
`component` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组件路径(vue页面完整路径,省略.vue后缀)',
|
||||
`perm` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '按钮权限标识',
|
||||
`icon` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '菜单图标',
|
||||
@ -97,63 +162,105 @@ CREATE TABLE `sys_menu` (
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 102 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单管理' ROW_FORMAT = DYNAMIC;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 139 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单管理' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_menu
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_menu` VALUES (1, 0, 2, '系统管理', '/system', 'Layout', NULL, 'system', 1, 1, '/system/user', NULL, NULL, NULL, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (2, 1, 1, '用户管理', 'user', 'system/user/index', NULL, 'user', 1, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (3, 1, 1, '角色管理', 'role', 'system/role/index', NULL, 'role', 2, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (4, 1, 1, '菜单管理', 'cmenu', 'system/menu/index', NULL, 'menu', 3, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (5, 1, 1, '部门管理', 'dept', 'system/dept/index', NULL, 'tree', 4, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (6, 1, 1, '字典管理', 'dict', 'system/dict/index', NULL, 'dict', 5, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (9, 0, 2, '营销管理', '/sms', 'Layout', NULL, 'number', 5, 1, NULL, NULL, NULL, NULL, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (10, 9, 1, '广告列表', 'advert', 'sms/advert/index', NULL, 'advert', 1, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (11, 0, 1, '商品管理', '/product', 'Layout', NULL, 'el-icon-Goods', 2, 1, '/product/goods', '0', NULL, 1, NULL, '2021-08-28 09:12:21', '2024-03-03 23:54:35');
|
||||
INSERT INTO `sys_menu` VALUES (12, 11, 1, '商品列表', 'spu', 'product/spu/index', NULL, 'goods-list', 1, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (13, 0, 2, '订单管理', '/oms', 'Layout', NULL, 'el-icon-ShoppingCart', 3, 1, '/oms/order', '0', 1, 1, NULL, '2021-08-28 09:12:21', '2024-03-03 23:52:32');
|
||||
INSERT INTO `sys_menu` VALUES (14, 13, 1, '订单列表', 'order', 'oms/order/index', NULL, 'el-icon-Document', 1, 1, NULL, 'null,13', NULL, 1, NULL, '2021-08-28 09:12:21', '2024-03-03 23:45:09');
|
||||
INSERT INTO `sys_menu` VALUES (15, 0, 1, '会员管理', '/ums', 'Layout', NULL, 'user', 4, 1, '/ums/member', NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (16, 15, 1, '会员列表', 'member', 'ums/member/index', NULL, 'peoples', 1, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (17, 11, 1, '品牌管理', 'brand', 'product/brand/index', NULL, 'brand', 5, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (18, 11, 1, '商品分类', 'category', 'product/category/index', NULL, 'menu', 3, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (20, 0, 2, '多级菜单', '/multi-level', 'Layout', NULL, 'nested', 7, 1, '/nested/level1/level2', NULL, NULL, NULL, NULL, '2022-02-16 23:11:00', '2022-02-16 23:11:00');
|
||||
INSERT INTO `sys_menu` VALUES (21, 20, 1, '菜单一级', 'level1', 'demo/multi-level/level1', NULL, '', 1, 1, '/nested/level1/level2', NULL, NULL, NULL, NULL, '2022-02-16 23:13:38', '2022-02-16 23:13:38');
|
||||
INSERT INTO `sys_menu` VALUES (22, 21, 1, '菜单二级', 'level2', 'demo/multi-level/children/level2', NULL, '', 1, 1, '/nested/level1/level2/level3', NULL, NULL, NULL, NULL, '2022-02-16 23:14:23', '2022-02-16 23:14:23');
|
||||
INSERT INTO `sys_menu` VALUES (23, 22, 1, '菜单三级-1', 'level3-1', 'demo/multi-level/children/children/level3-1', NULL, '', 1, 1, '', NULL, NULL, NULL, NULL, '2022-02-16 23:14:51', '2022-02-16 23:14:51');
|
||||
INSERT INTO `sys_menu` VALUES (24, 22, 1, '菜单三级-2', 'level3-2', 'demo/multi-level/children/children/level3-2', NULL, '', 2, 1, '', NULL, NULL, NULL, NULL, '2022-02-16 23:15:08', '2022-02-16 23:15:08');
|
||||
INSERT INTO `sys_menu` VALUES (26, 0, 1, '外部链接', '/external-link', 'Layout', NULL, 'link', 9, 1, 'noredirect', NULL, NULL, NULL, NULL, '2022-02-17 22:51:20', '2022-02-17 22:51:20');
|
||||
INSERT INTO `sys_menu` VALUES (30, 26, 3, '项目文档', 'https://juejin.cn/post/7228990409909108793', '', NULL, 'link', 1, 1, '', NULL, NULL, NULL, NULL, '2022-02-18 00:01:40', '2022-02-18 00:01:40');
|
||||
INSERT INTO `sys_menu` VALUES (37, 9, 1, '优惠券列表', 'coupon', 'sms/coupon/index', NULL, 'menu', 2, 1, '', NULL, NULL, NULL, NULL, '2022-05-29 00:24:07', '2022-05-29 00:24:07');
|
||||
INSERT INTO `sys_menu` VALUES (40, 2, 4, '新增用户', '', NULL, 'sys:user:add', '', 1, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (41, 2, 4, '修改用户', '', NULL, 'sys:user:edit', '', 2, 1, '', NULL, NULL, NULL, NULL, '2022-11-05 01:26:44', '2022-11-05 01:26:44');
|
||||
INSERT INTO `sys_menu` VALUES (42, 2, 4, '删除用户', '', NULL, 'sys:user:del', '', 3, 1, '', NULL, NULL, NULL, NULL, '2022-11-05 01:27:13', '2022-11-05 01:27:13');
|
||||
INSERT INTO `sys_menu` VALUES (70, 3, 4, '角色新增', '', NULL, 'sys:role:add', '', 1, 1, NULL, '0,1,3', NULL, NULL, NULL, '2023-05-20 23:39:09', '2023-05-20 23:39:09');
|
||||
INSERT INTO `sys_menu` VALUES (71, 3, 4, '角色编辑', '', NULL, 'sys:role:edit', '', 2, 1, NULL, '0,1,3', NULL, NULL, NULL, '2023-05-20 23:40:31', '2023-05-20 23:40:31');
|
||||
INSERT INTO `sys_menu` VALUES (72, 3, 4, '角色删除', '', NULL, 'sys:role:delete', '', 3, 1, NULL, '0,1,3', NULL, NULL, NULL, '2023-05-20 23:41:08', '2023-05-20 23:41:08');
|
||||
INSERT INTO `sys_menu` VALUES (73, 4, 4, '菜单新增', '', NULL, 'sys:menu:add', '', 1, 1, NULL, '0,1,4', NULL, NULL, NULL, '2023-05-20 23:41:35', '2023-05-20 23:41:35');
|
||||
INSERT INTO `sys_menu` VALUES (74, 4, 4, '菜单编辑', '', NULL, 'sys:menu:edit', '', 3, 1, NULL, '0,1,4', NULL, NULL, NULL, '2023-05-20 23:41:58', '2023-05-20 23:41:58');
|
||||
INSERT INTO `sys_menu` VALUES (75, 4, 4, '菜单删除', '', NULL, 'sys:menu:delete', '', 3, 1, NULL, '0,1,4', NULL, NULL, NULL, '2023-05-20 23:44:18', '2023-05-20 23:44:18');
|
||||
INSERT INTO `sys_menu` VALUES (76, 5, 4, '部门新增', '', NULL, 'sys:dept:add', '', 1, 1, NULL, '0,1,5', NULL, NULL, NULL, '2023-05-20 23:45:00', '2023-05-20 23:45:00');
|
||||
INSERT INTO `sys_menu` VALUES (77, 5, 4, '部门编辑', '', NULL, 'sys:dept:edit', '', 2, 1, NULL, '0,1,5', NULL, NULL, NULL, '2023-05-20 23:46:16', '2023-05-20 23:46:16');
|
||||
INSERT INTO `sys_menu` VALUES (78, 5, 4, '部门删除', '', NULL, 'sys:dept:delete', '', 3, 1, NULL, '0,1,5', NULL, NULL, NULL, '2023-05-20 23:46:36', '2023-05-20 23:46:36');
|
||||
INSERT INTO `sys_menu` VALUES (79, 6, 4, '字典类型新增', '', NULL, 'sys:dict_type:add', '', 1, 1, NULL, '0,1,6', NULL, NULL, NULL, '2023-05-21 00:16:06', '2023-05-21 00:16:06');
|
||||
INSERT INTO `sys_menu` VALUES (81, 6, 4, '字典类型编辑', '', NULL, 'sys:dict_type:edit', '', 2, 1, NULL, '0,1,6', NULL, NULL, NULL, '2023-05-21 00:27:37', '2023-05-21 00:27:37');
|
||||
INSERT INTO `sys_menu` VALUES (84, 6, 4, '字典类型删除', '', NULL, 'sys:dict_type:delete', '', 3, 1, NULL, '0,1,6', NULL, NULL, NULL, '2023-05-21 00:29:39', '2023-05-21 00:29:39');
|
||||
INSERT INTO `sys_menu` VALUES (85, 6, 4, '字典数据新增', '', NULL, 'sys:dict:add', '', 4, 1, NULL, '0,1,6', NULL, NULL, NULL, '2023-05-21 00:46:56', '2023-05-21 00:47:06');
|
||||
INSERT INTO `sys_menu` VALUES (86, 6, 4, '字典数据编辑', '', NULL, 'sys:dict:edit', '', 5, 1, NULL, '0,1,6', NULL, NULL, NULL, '2023-05-21 00:47:36', '2023-05-21 00:47:36');
|
||||
INSERT INTO `sys_menu` VALUES (87, 6, 4, '字典数据删除', '', NULL, 'sys:dict:delete', '', 6, 1, NULL, '0,1,6', NULL, NULL, NULL, '2023-05-21 00:48:10', '2023-05-21 00:48:20');
|
||||
INSERT INTO `sys_menu` VALUES (88, 2, 4, '重置密码', '', NULL, 'sys:user:reset_pwd', '', 4, 1, NULL, '0,1,2', NULL, NULL, NULL, '2023-05-21 00:49:18', '2023-05-21 00:49:18');
|
||||
INSERT INTO `sys_menu` VALUES (89, 2, 4, '用户查询', '', NULL, 'sys:user:query', '', 0, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (90, 17, 4, '品牌查询', '', NULL, 'pms:brand:query', '', 1, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (91, 17, 4, '品牌新增', '', NULL, 'pms:brand:add', '', 2, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (92, 17, 4, '品牌修改', '', NULL, 'pms:brand:edit', '', 3, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (93, 17, 4, '品牌删除', '', NULL, 'pms:brand:delete', '', 4, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (94, 18, 4, '分类查询', '', NULL, 'pms:category:query', '', 1, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (95, 18, 4, '分类新增', '', NULL, 'pms:category:add', '', 2, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (96, 18, 4, '分类修改', '', NULL, 'pms:category:edit', '', 3, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (97, 18, 4, '分类删除', '', NULL, 'pms:category:delete', '', 4, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (1, 0, 2, '系统管理', NULL, '/system', 'Layout', NULL, 'system', 1, 1, '/system/user', NULL, NULL, NULL, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (2, 1, 1, '用户管理', 'User', 'user', 'system/user/index', NULL, 'el-icon-User', 1, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (3, 1, 1, '角色管理', 'Role', 'role', 'system/role/index', NULL, 'role', 2, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (4, 1, 1, '菜单管理', 'Menu', 'menu', 'system/menu/index', NULL, 'menu', 3, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (5, 1, 1, '部门管理', 'Dept', 'dept', 'system/dept/index', NULL, 'tree', 4, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (6, 1, 1, '字典管理', 'Dict', 'dict', 'system/dict/index', NULL, 'dict', 5, 1, NULL, '0,1', NULL, 1, NULL, '2024-10-05 23:36:02', '2024-10-05 23:36:02');
|
||||
INSERT INTO `sys_menu` VALUES (9, 0, 2, '营销管理', NULL, '/sale', 'Layout', NULL, 'number', 5, 1, NULL, NULL, NULL, NULL, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (10, 9, 1, '广告列表', NULL, 'advert', 'sale/advert/index', NULL, 'advert', 1, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (11, 0, 1, '商品管理', NULL, '/product', 'Layout', NULL, 'el-icon-Goods', 2, 1, '/product/goods', '0', NULL, 1, NULL, '2021-08-28 09:12:21', '2024-03-03 23:54:35');
|
||||
INSERT INTO `sys_menu` VALUES (12, 11, 1, '商品列表', NULL, 'spu', 'product/spu/index', NULL, 'goods-list', 1, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (13, 0, 2, '订单管理', NULL, '/order', 'Layout', NULL, 'el-icon-ShoppingCart', 3, 1, '/oms/order', '0', 1, 1, NULL, '2021-08-28 09:12:21', '2024-03-03 23:52:32');
|
||||
INSERT INTO `sys_menu` VALUES (14, 13, 1, '订单列表', NULL, 'order', 'order/index', NULL, 'el-icon-Document', 1, 1, NULL, 'null,13', NULL, 1, NULL, '2021-08-28 09:12:21', '2024-03-03 23:45:09');
|
||||
INSERT INTO `sys_menu` VALUES (15, 0, 1, '会员管理', NULL, '/member', 'Layout', NULL, 'user', 4, 1, '/ums/member', NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (16, 15, 1, '会员列表', NULL, 'member', 'member/index', NULL, 'peoples', 1, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (17, 11, 1, '品牌管理', NULL, 'brand', 'product/brand/index', NULL, 'brand', 5, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (18, 11, 1, '商品分类', NULL, 'category', 'product/category/index', NULL, 'menu', 3, 1, NULL, NULL, NULL, 1, NULL, '2021-08-28 09:12:21', '2021-08-28 09:12:21');
|
||||
INSERT INTO `sys_menu` VALUES (20, 0, 2, '多级菜单', NULL, '/multi-level', 'Layout', NULL, 'nested', 7, 1, '/nested/level1/level2', NULL, NULL, NULL, NULL, '2022-02-16 23:11:00', '2022-02-16 23:11:00');
|
||||
INSERT INTO `sys_menu` VALUES (21, 20, 1, '菜单一级', NULL, 'level1', 'demo/multi-level/level1', NULL, '', 1, 1, '/nested/level1/level2', NULL, NULL, NULL, NULL, '2022-02-16 23:13:38', '2022-02-16 23:13:38');
|
||||
INSERT INTO `sys_menu` VALUES (22, 21, 1, '菜单二级', NULL, 'level2', 'demo/multi-level/children/level2', NULL, '', 1, 1, '/nested/level1/level2/level3', NULL, NULL, NULL, NULL, '2022-02-16 23:14:23', '2022-02-16 23:14:23');
|
||||
INSERT INTO `sys_menu` VALUES (23, 22, 1, '菜单三级-1', NULL, 'level3-1', 'demo/multi-level/children/children/level3-1', NULL, '', 1, 1, '', NULL, NULL, NULL, NULL, '2022-02-16 23:14:51', '2022-02-16 23:14:51');
|
||||
INSERT INTO `sys_menu` VALUES (24, 22, 1, '菜单三级-2', NULL, 'level3-2', 'demo/multi-level/children/children/level3-2', NULL, '', 2, 1, '', NULL, NULL, NULL, NULL, '2022-02-16 23:15:08', '2022-02-16 23:15:08');
|
||||
INSERT INTO `sys_menu` VALUES (26, 0, 1, '外部链接', NULL, '/external-link', 'Layout', NULL, 'link', 9, 1, 'noredirect', NULL, NULL, NULL, NULL, '2022-02-17 22:51:20', '2022-02-17 22:51:20');
|
||||
INSERT INTO `sys_menu` VALUES (30, 26, 3, '项目文档', NULL, 'https://juejin.cn/post/7228990409909108793', '', NULL, 'link', 1, 1, '', NULL, NULL, NULL, NULL, '2022-02-18 00:01:40', '2022-02-18 00:01:40');
|
||||
INSERT INTO `sys_menu` VALUES (37, 9, 1, '优惠券列表', NULL, 'coupon', 'sale/coupon/index', NULL, 'menu', 2, 1, '', NULL, NULL, NULL, NULL, '2022-05-29 00:24:07', '2022-05-29 00:24:07');
|
||||
INSERT INTO `sys_menu` VALUES (40, 2, 4, '新增用户', NULL, '', NULL, 'sys:user:add', '', 1, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (41, 2, 4, '修改用户', NULL, '', NULL, 'sys:user:edit', '', 2, 1, '', NULL, NULL, NULL, NULL, '2022-11-05 01:26:44', '2022-11-05 01:26:44');
|
||||
INSERT INTO `sys_menu` VALUES (42, 2, 4, '删除用户', NULL, '', NULL, 'sys:user:del', '', 3, 1, '', NULL, NULL, NULL, NULL, '2022-11-05 01:27:13', '2022-11-05 01:27:13');
|
||||
INSERT INTO `sys_menu` VALUES (70, 3, 4, '角色新增', NULL, '', NULL, 'sys:role:add', '', 1, 1, NULL, '0,1,3', NULL, NULL, NULL, '2023-05-20 23:39:09', '2023-05-20 23:39:09');
|
||||
INSERT INTO `sys_menu` VALUES (71, 3, 4, '角色编辑', NULL, '', NULL, 'sys:role:edit', '', 2, 1, NULL, '0,1,3', NULL, NULL, NULL, '2023-05-20 23:40:31', '2023-05-20 23:40:31');
|
||||
INSERT INTO `sys_menu` VALUES (72, 3, 4, '角色删除', NULL, '', NULL, 'sys:role:delete', '', 3, 1, NULL, '0,1,3', NULL, NULL, NULL, '2023-05-20 23:41:08', '2023-05-20 23:41:08');
|
||||
INSERT INTO `sys_menu` VALUES (73, 4, 4, '菜单新增', NULL, '', NULL, 'sys:menu:add', '', 1, 1, NULL, '0,1,4', NULL, NULL, NULL, '2023-05-20 23:41:35', '2023-05-20 23:41:35');
|
||||
INSERT INTO `sys_menu` VALUES (74, 4, 4, '菜单编辑', NULL, '', NULL, 'sys:menu:edit', '', 3, 1, NULL, '0,1,4', NULL, NULL, NULL, '2023-05-20 23:41:58', '2023-05-20 23:41:58');
|
||||
INSERT INTO `sys_menu` VALUES (75, 4, 4, '菜单删除', NULL, '', NULL, 'sys:menu:delete', '', 3, 1, NULL, '0,1,4', NULL, NULL, NULL, '2023-05-20 23:44:18', '2023-05-20 23:44:18');
|
||||
INSERT INTO `sys_menu` VALUES (76, 5, 4, '部门新增', NULL, '', NULL, 'sys:dept:add', '', 1, 1, NULL, '0,1,5', NULL, NULL, NULL, '2023-05-20 23:45:00', '2023-05-20 23:45:00');
|
||||
INSERT INTO `sys_menu` VALUES (77, 5, 4, '部门编辑', NULL, '', NULL, 'sys:dept:edit', '', 2, 1, NULL, '0,1,5', NULL, NULL, NULL, '2023-05-20 23:46:16', '2023-05-20 23:46:16');
|
||||
INSERT INTO `sys_menu` VALUES (78, 5, 4, '部门删除', NULL, '', NULL, 'sys:dept:delete', '', 3, 1, NULL, '0,1,5', NULL, NULL, NULL, '2023-05-20 23:46:36', '2023-05-20 23:46:36');
|
||||
INSERT INTO `sys_menu` VALUES (79, 6, 4, '字典新增', NULL, '', NULL, 'sys:dict:add', '', 1, 1, NULL, '0,1,6', NULL, NULL, NULL, '2024-10-05 23:36:04', '2024-10-05 23:36:04');
|
||||
INSERT INTO `sys_menu` VALUES (81, 6, 4, '字典编辑', NULL, '', NULL, 'sys:dict_type:edit', '', 2, 1, NULL, '0,1,6', NULL, NULL, NULL, '2024-10-05 23:36:04', '2024-10-05 23:36:04');
|
||||
INSERT INTO `sys_menu` VALUES (84, 6, 4, '字典删除', NULL, '', NULL, 'sys:dict_type:delete', '', 3, 1, NULL, '0,1,6', NULL, NULL, NULL, '2024-10-05 23:36:04', '2024-10-05 23:36:04');
|
||||
INSERT INTO `sys_menu` VALUES (88, 2, 4, '重置密码', NULL, '', NULL, 'sys:user:reset_pwd', '', 4, 1, NULL, '0,1,2', NULL, NULL, NULL, '2023-05-21 00:49:18', '2023-05-21 00:49:18');
|
||||
INSERT INTO `sys_menu` VALUES (89, 2, 4, '用户查询', NULL, '', NULL, 'sys:user:query', '', 0, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (90, 17, 4, '品牌查询', NULL, '', NULL, 'pms:brand:query', '', 1, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (91, 17, 4, '品牌新增', NULL, '', NULL, 'pms:brand:add', '', 2, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (92, 17, 4, '品牌修改', NULL, '', NULL, 'pms:brand:edit', '', 3, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (93, 17, 4, '品牌删除', NULL, '', NULL, 'pms:brand:delete', '', 4, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (94, 18, 4, '分类查询', NULL, '', NULL, 'pms:category:query', '', 1, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (95, 18, 4, '分类新增', NULL, '', NULL, 'pms:category:add', '', 2, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (96, 18, 4, '分类修改', NULL, '', NULL, 'pms:category:edit', '', 3, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (97, 18, 4, '分类删除', NULL, '', NULL, 'pms:category:delete', '', 4, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_menu` VALUES (98, 0, 2, '系统工具', NULL, '/tool', 'Layout', NULL, 'menu', 2, 1, NULL, '0', 1, 1, NULL, '2024-07-13 08:41:07', '2024-07-30 16:27:05');
|
||||
INSERT INTO `sys_menu` VALUES (99, 98, 1, '代码生成', 'Codegen', 'codegen', 'codegen/index', NULL, 'code', 1, 1, NULL, '0,118', 0, 1, NULL, '2024-07-13 08:44:51', '2024-07-13 08:44:51');
|
||||
INSERT INTO `sys_menu` VALUES (120, 11, 1, '规格属性', 'Attribute', 'attribute', 'product/attribute/index', NULL, 'menu', 4, 0, '', '0,11', 0, 1, NULL, NULL, '2024-10-27 23:04:30');
|
||||
INSERT INTO `sys_menu` VALUES (135, 1, 1, '字典数据', 'DictData', 'dict-data', 'system/dict/data', NULL, '', 6, 0, NULL, '0,1', 0, 1, NULL, '2024-10-05 23:36:08', '2024-10-05 23:36:08');
|
||||
INSERT INTO `sys_menu` VALUES (136, 135, 4, '字典数据新增', NULL, '', NULL, 'sys:dict-data:add', '', 4, 1, NULL, '0,1,135', NULL, NULL, NULL, '2024-10-05 23:36:08', '2024-10-05 23:36:08');
|
||||
INSERT INTO `sys_menu` VALUES (137, 135, 4, '字典数据编辑', NULL, '', NULL, 'sys:dict-data:edit', '', 5, 1, NULL, '0,1,135', NULL, NULL, NULL, '2024-10-05 23:36:09', '2024-10-05 23:36:09');
|
||||
INSERT INTO `sys_menu` VALUES (138, 135, 4, '字典数据删除', NULL, '', NULL, 'sys:dict-data:delete', '', 6, 1, NULL, '0,1,135', NULL, NULL, NULL, '2024-10-05 23:36:09', '2024-10-05 23:36:09');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_notice
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_notice`;
|
||||
CREATE TABLE `sys_notice` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '通知标题',
|
||||
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '通知内容',
|
||||
`type` tinyint NOT NULL COMMENT '通知类型(关联字典编码:notice_type)',
|
||||
`level` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '通知等级(字典code:notice_level)',
|
||||
`target_type` tinyint NOT NULL COMMENT '目标类型(1: 全体, 2: 指定)',
|
||||
`target_user_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '目标人ID集合(多个使用英文逗号,分割)',
|
||||
`publisher_id` bigint NULL DEFAULT NULL COMMENT '发布人ID',
|
||||
`publish_status` tinyint NOT NULL DEFAULT 0 COMMENT '发布状态(0: 未发布, 1: 已发布, -1: 已撤回)',
|
||||
`publish_time` datetime NULL DEFAULT NULL COMMENT '发布时间',
|
||||
`revoke_time` datetime NULL DEFAULT NULL COMMENT '撤回时间',
|
||||
`create_by` bigint NOT NULL COMMENT '创建人ID',
|
||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||
`update_by` bigint NULL DEFAULT NULL COMMENT '更新人ID',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除(0: 未删除, 1: 已删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通知公告表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_notice
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_notice` VALUES (1, 'v2.12.0 新增系统日志,访问趋势统计功能。', '<p>1. 消息通知</p><p>2. 字典重构</p><p>3. 代码生成</p>', 1, 'L', 1, '2', 2, 1, '2024-09-30 17:21:41', '2024-09-30 17:21:04', 2, '2024-09-28 11:21:06', 2, '2024-09-29 14:47:07', 0);
|
||||
INSERT INTO `sys_notice` VALUES (2, 'v2.13.0 新增菜单搜索。', '<p>1. 消息通知</p><p>2. 字典重构</p><p>3. 代码生成</p>', 1, 'L', 1, '2', 2, 1, '2024-09-30 17:22:41', '2024-09-30 17:21:04', 2, '2024-09-28 11:21:06', 2, '2024-09-29 14:47:07', 0);
|
||||
INSERT INTO `sys_notice` VALUES (3, '\r\nv2.14.0 新增个人中心。', '<p>1. 消息通知</p><p>2. 字典重构</p><p>3. 代码生成</p>', 1, 'L', 1, '2', 2, 1, '2024-09-30 17:23:41', '2024-09-30 17:21:04', 2, '2024-09-28 11:21:06', 2, '2024-09-29 14:47:07', 0);
|
||||
INSERT INTO `sys_notice` VALUES (4, 'v2.15.0 登录页面改造。', '<p>1. 消息通知</p><p>2. 字典重构</p><p>3. 代码生成</p>', 1, 'L', 1, '2', 2, 1, '2024-09-30 17:24:41', '2024-09-30 17:21:04', 2, '2024-09-28 11:21:06', 2, '2024-09-29 14:47:07', 0);
|
||||
INSERT INTO `sys_notice` VALUES (5, 'v2.16.0 通知公告、字典翻译组件。', '<p>1. 消息通知</p><p>2. 字典重构</p><p>3. 代码生成</p>', 1, 'L', 1, '2', 2, 1, '2024-09-30 17:25:41', '2024-09-30 17:21:04', 2, '2024-09-28 11:21:06', 2, '2024-09-29 14:47:07', 0);
|
||||
INSERT INTO `sys_notice` VALUES (6, '系统将于本周六凌晨 2 点进行维护,预计维护时间为 2 小时。', '<p>1. 消息通知</p><p>2. 字典重构</p><p>3. 代码生成</p>', 2, 'H', 1, '2', 2, 1, '2024-09-30 17:26:41', '2024-09-30 17:21:04', 2, '2024-09-28 11:21:06', 2, '2024-09-29 14:47:07', 0);
|
||||
INSERT INTO `sys_notice` VALUES (7, '最近发现一些钓鱼邮件,请大家提高警惕,不要点击陌生链接。', '<p>1. 消息通知</p><p>2. 字典重构</p><p>3. 代码生成</p>', 3, 'L', 1, '2', 2, 1, '2024-09-30 17:27:41', '2024-09-30 17:21:04', 2, '2024-09-28 11:21:06', 2, '2024-09-29 14:47:07', 0);
|
||||
INSERT INTO `sys_notice` VALUES (8, '国庆假期从 10 月 1 日至 10 月 7 日放假,共 7 天。', '<p>1. 消息通知</p><p>2. 字典重构</p><p>3. 代码生成</p>', 4, 'L', 1, '2', 2, 1, '2024-09-30 17:28:41', '2024-09-30 17:21:04', 2, '2024-09-28 11:21:06', 2, '2024-09-29 14:47:07', 0);
|
||||
INSERT INTO `sys_notice` VALUES (9, '公司将在 10 月 15 日举办新产品发布会,敬请期待。', '<p>1. 消息通知</p><p>2. 字典重构</p><p>3. 代码生成</p>', 5, 'H', 1, '2', 2, 1, '2024-09-30 17:29:41', '2024-09-30 17:21:04', 2, '2024-09-28 11:21:06', 2, '2024-09-29 14:47:07', 0);
|
||||
INSERT INTO `sys_notice` VALUES (10, 'v2.16.1 版本修复了 WebSocket 重复连接导致的后台线程阻塞问题,优化了通知公告。', '<p>1. 消息通知</p><p>2. 字典重构</p><p>3. 代码生成</p>', 1, 'M', 1, '2', 2, 1, '2024-09-30 17:30:41', '2024-09-30 17:21:04', 2, '2024-09-28 11:21:06', 2, '2024-09-29 14:47:07', 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_role
|
||||
@ -170,7 +277,7 @@ CREATE TABLE `sys_role` (
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`is_deleted` tinyint NOT NULL DEFAULT 0 COMMENT '逻辑删除标识(0-未删除;1-已删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `name`(`name`) USING BTREE
|
||||
UNIQUE INDEX `name`(`name` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
@ -209,7 +316,6 @@ INSERT INTO `sys_role_menu` VALUES (2, 15);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 16);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 17);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 18);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 19);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 20);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 21);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 22);
|
||||
@ -233,9 +339,6 @@ INSERT INTO `sys_role_menu` VALUES (2, 78);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 79);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 81);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 84);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 85);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 86);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 87);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 88);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 89);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 90);
|
||||
@ -248,8 +351,10 @@ INSERT INTO `sys_role_menu` VALUES (2, 96);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 97);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 98);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 99);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 100);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 101);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 135);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 136);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 137);
|
||||
INSERT INTO `sys_role_menu` VALUES (2, 138);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_user
|
||||
@ -272,7 +377,7 @@ CREATE TABLE `sys_user` (
|
||||
`update_by` bigint NULL DEFAULT NULL COMMENT '更新人ID',
|
||||
`is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除标识(0:未删除;1:已删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `login_name`(`username`) USING BTREE
|
||||
UNIQUE INDEX `login_name`(`username` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
@ -282,6 +387,26 @@ INSERT INTO `sys_user` VALUES (1, 'root', '有来技术', 0, '$2a$10$xVWsNOhHrCx
|
||||
INSERT INTO `sys_user` VALUES (2, 'admin', '系统管理员', 1, '$2a$10$8/8PxGHA.30EeWg8x4/4BuWuCUJubFbGJXyUYRs7RaJEdVvEMRbWe', 2, 'https://s2.loli.net/2022/04/07/gw1L2Z5sPtS8GIl.gif', '17621210123', 1, 'youlaitech@163.com', '2023-04-12 01:31:29', '2023-04-12 01:31:29', 1, 1, 0);
|
||||
INSERT INTO `sys_user` VALUES (3, 'test', '测试小用户', 1, '$2a$10$MPJkNw.hKT/fZOgwYP8q9eu/rFJJDsNov697AmdkHNJkpjIpVSw2q', 3, 'https://s2.loli.net/2022/04/07/gw1L2Z5sPtS8GIl.gif', '17621210123', 1, 'youlaitech@163.com', '2023-04-12 01:31:29', '2023-04-12 01:31:29', 1, 1, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_user_notice
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_user_notice`;
|
||||
CREATE TABLE `sys_user_notice` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`notice_id` bigint NOT NULL COMMENT '公共通知id',
|
||||
`user_id` bigint NOT NULL COMMENT '用户id',
|
||||
`is_read` bigint NOT NULL DEFAULT 0 COMMENT '读取状态(0: 未读, 1: 已读)',
|
||||
`read_time` datetime NULL DEFAULT NULL COMMENT '阅读时间',
|
||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`is_deleted` tinyint NOT NULL DEFAULT 0 COMMENT '逻辑删除(0: 未删除, 1: 已删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户通知公告表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_user_notice
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_user_role
|
||||
-- ----------------------------
|
||||
@ -299,27 +424,4 @@ INSERT INTO `sys_user_role` VALUES (1, 1);
|
||||
INSERT INTO `sys_user_role` VALUES (2, 2);
|
||||
INSERT INTO `sys_user_role` VALUES (3, 3);
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_log
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_log`;
|
||||
CREATE TABLE `sys_log` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`module` enum('LOGIN','USER','ROLE','DEPT','MENU','DICT','OTHER') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '日志模块',
|
||||
`content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '日志内容',
|
||||
`request_uri` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '请求路径',
|
||||
`ip` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'IP地址',
|
||||
`province` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '省份',
|
||||
`city` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '城市',
|
||||
`execution_time` bigint DEFAULT NULL COMMENT '执行时间(ms)',
|
||||
`browser` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '浏览器',
|
||||
`browser_version` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '浏览器版本',
|
||||
`os` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '终端系统',
|
||||
`create_by` bigint DEFAULT NULL COMMENT '创建人ID',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`is_deleted` tinyint NOT NULL DEFAULT '0' COMMENT '逻辑删除标识(1-已删除 0-未删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统日志表';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user