This commit is contained in:
zhaohu
2026-06-12 16:14:58 +08:00
parent cf71897528
commit a7ba0f21e5
235 changed files with 33574 additions and 0 deletions
+84
View File
@@ -0,0 +1,84 @@
#spring配置
spring:
data:
redis:
##redis 单机环境配置
host: 172.16.92.89
port: 6379
password:
database: 0
ssl:
enabled: false
##redis 集群环境配置
#cluster:
# nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
# commandTimeout: 5000
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
#driver-class-name: org.postgresql.Driver
#driver-class-name: oracle.jdbc.OracleDriver
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#driver-class-name: dm.jdbc.driver.DmDriver
#driver-class-name: com.yashandb.jdbc.Driver
#driver-class-name: com.kingbase8.Driver
druid:
# MySql、PostgreSQL、SqlServer、DaMeng校验
validation-query: select 1
# Oracle、YashanDB校验
#oracle: true
#validation-query: select 1 from dual
#项目模块集中配置
blade:
#分布式锁配置
lock:
enabled: false
address: redis://127.0.0.1:6379
#多团队协作服务配置
loadbalancer:
#开启配置
enabled: true
#负载均衡优先调用的ip段
prior-ip-pattern:
- 192.168.0.*
- 127.0.0.1
#通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖)
datasource:
dev:
# MySql
url: jdbc:mysql://172.19.2.126:30306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: sypm6666
zhaocai:
master:
url: jdbc:mysql://172.19.2.126:30306/bladex-zhaocai?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: sypm6666
slave:
url: jdbc:mysql://172.19.2.126:30306/bladex-zhaocai?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: sypm6666
# PostgreSQL
#url: jdbc:postgresql://127.0.0.1:5432/bladex
#username: postgres
#password: 123456
# Oracle
#url: jdbc:oracle:thin:@//127.0.0.1:1521/ORCLPDB
#username: BLADEX
#password: BLADEX
# SqlServer
#url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=bladex
#username: bladex
#password: bladex
# DaMeng
#url: jdbc:dm://127.0.0.1:5236/BLADEX?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
#username: BLADEX
#password: BLADEX
# YashanDB
#url: jdbc:yasdb://127.0.0.1:1688/BLADEX
#username: BLADEX
#password: BLADEX
# KingbaseES
#url: jdbc:kingbase8://localhost:4321/bladex
#username: kingbase
#password: 123456
+56
View File
@@ -0,0 +1,56 @@
#spring配置
spring:
data:
redis:
##redis 单机环境配置
##将docker脚本部署的redis服务映射为宿主机ip
##生产环境推荐使用阿里云高可用redis服务并设置密码
host: 192.168.0.188
port: 3379
password:
database: 0
ssl:
enabled: false
##redis 集群环境配置
#cluster:
# nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
# commandTimeout: 5000
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
#driver-class-name: org.postgresql.Driver
#driver-class-name: oracle.jdbc.OracleDriver
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#driver-class-name: dm.jdbc.driver.DmDriver
#driver-class-name: com.yashandb.jdbc.Driver
#driver-class-name: com.kingbase8.Driver
druid:
# MySql、PostgreSQL、SqlServer、DaMeng校验
validation-query: select 1
# Oracle、YashanDB校验
#oracle: true
#validation-query: select 1 from dual
#项目模块集中配置
blade:
#分布式锁配置
lock:
##是否启用分布式锁
enabled: false
##将docker脚本部署的redis服务映射为宿主机ip
##生产环境推荐使用阿里云高可用redis服务并设置密码
address: redis://192.168.0.188:3379
#通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖)
datasource:
prod:
url: jdbc:mysql://192.168.0.188:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: root
zhaocai:
master:
url: jdbc:mysql://192.168.0.188:3306/bladex-zhaocai?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: root
slave:
url: jdbc:mysql://192.168.0.188:3306/bladex-zhaocai?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: root
+54
View File
@@ -0,0 +1,54 @@
#spring配置
spring:
data:
redis:
##redis 单机环境配置
##将docker脚本部署的redis服务映射为宿主机ip
host: 192.168.0.188
port: 3379
password:
database: 0
ssl:
enabled: false
##redis 集群环境配置
#cluster:
# nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
# commandTimeout: 5000
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
#driver-class-name: org.postgresql.Driver
#driver-class-name: oracle.jdbc.OracleDriver
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#driver-class-name: dm.jdbc.driver.DmDriver
#driver-class-name: com.yashandb.jdbc.Driver
#driver-class-name: com.kingbase8.Driver
druid:
# MySql、PostgreSQL、SqlServer、DaMeng校验
validation-query: select 1
# Oracle、YashanDB校验
#oracle: true
#validation-query: select 1 from dual
#项目模块集中配置
blade:
#分布式锁配置
lock:
##是否启用分布式锁
enabled: false
##将docker脚本部署的redis服务映射为宿主机ip
address: redis://192.168.0.188:3379
#通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖)
datasource:
test:
url: jdbc:mysql://172.19.2.126:30306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: sypm6666
zhaocai:
master:
url: jdbc:mysql://172.19.2.126:30306/bladex-zhaocai?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: sypm6666
slave:
url: jdbc:mysql://172.19.2.126:30306/bladex-zhaocai?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: sypm6666
+249
View File
@@ -0,0 +1,249 @@
#服务器配置
server:
undertow:
threads:
# 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
io: 16
# 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
worker: 400
# 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
buffer-size: 1024
# 是否分配的直接内存
direct-buffers: true
#spring配置
spring:
cloud:
nacos:
discovery:
# 禁用云命名空间解析,防止和云平台环境变量冲突
isUseCloudNamespaceParsing: false
config:
# 禁用云命名空间解析,防止和云平台环境变量冲突
isUseCloudNamespaceParsing: false
sentinel:
eager: true
devtools:
restart:
log-condition-evaluation-delta: false
livereload:
port: 23333
#feign配置
feign:
sentinel:
enabled: true
okhttp:
enabled: true
httpclient:
enabled: false
#对外暴露端口
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: always
# mybatis
mybatis-plus:
mapper-locations: classpath:org/springblade/**/mapper/*Mapper.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: org.springblade.**.entity
#typeEnumsPackage: org.springblade.dashboard.entity.enums
global-config:
# 关闭MP3.0自带的banner
banner: false
db-config:
#主键类型 0:"数据库ID自增", 1:"不操作", 2:"用户输入ID",3:"数字型snowflake", 4:"全局唯一ID UUID", 5:"字符串型snowflake";
id-type: assign_id
#字段策略
insert-strategy: not_null
update-strategy: not_null
where-strategy: not_null
#驼峰下划线转换
table-underline: true
# 逻辑删除配置
# 逻辑删除全局值(1表示已删除,这也是Mybatis Plus的默认配置)
logic-delete-value: 1
# 逻辑未删除全局值(0表示未删除,这也是Mybatis Plus的默认配置)
logic-not-delete-value: 0
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
jdbc-type-for-null: 'null'
#springdoc-openapi配置
springdoc:
default-flat-param-object: true
#knife4j配置
knife4j:
#基础认证
basic:
enable: false
username: blade
password: blade
#增强配置
setting:
enableSwaggerModels: true
enableDocumentManage: true
enableHost: false
enableHostText: http://localhost
enableRequestCache: true
enableFilterMultipartApis: false
enableFilterMultipartApiMethodType: POST
language: zh_cn
enableFooter: false
enableFooterCustom: true
footerCustomContent: Copyright © 2026 BladeX All Rights Reserved
#swagger公共信息
swagger:
title: BladeX 接口文档系统
description: BladeX 接口文档系统
version: 4.9.0.RELEASE
license: Powered By BladeX
license-url: https://bladex.cn
terms-of-service-url: https://bladex.cn
contact:
name: 翼宿
email: bladejava@qq.com
url: https://gitee.com/smallc
#blade配置
blade:
#oauth2配置
oauth2:
#启用 oauth2
enabled: true
#使用 @org.springblade.test.Sm2KeyGenerator 获取,用于国密sm2验签,需和前端保持一致
public-key: ${BLADE_OAUTH2_PUBLIC_KEY}
#使用 @org.springblade.test.Sm2KeyGenerator 获取,用于国密sm2解密,前端无需配置
private-key: ${BLADE_OAUTH2_PRIVATE_KEY}
#token配置
token:
#是否有状态
state: false
#是否单用户登录
single: false
#单用户登录范围
single-level: all
#token签名 使用blade-auth服务 @org.springblade.test.SignKeyGenerator 获取
sign-key: ${BLADE_TOKEN_SIGN_KEY}
#token加密 使用blade-auth服务 @org.springblade.test.CryptoKeyGenerator 获取
crypto-key: ${BLADE_TOKEN_CRYPTO_KEY}
#超级密钥配置
key:
#启用超级密钥
enabled: false
#密钥加密 使用 @org.springblade.test.CryptoKeyGenerator 获取
crypto-key: ${BLADE_KEY_CRYPTO_KEY}
#接口配置
api:
#报文加密配置
crypto:
#启用报文加密配置
enabled: false
#使用blade-auth服务 @org.springblade.test.CryptoKeyGenerator 获取,需和前端保持一致
aes-key: ${BLADE_API_CRYPTO_AES_KEY}
#使用blade-auth服务 @org.springblade.test.CryptoKeyGenerator 获取,需和前端保持一致
des-key: ${BLADE_API_CRYPTO_DES_KEY}
#jackson配置
jackson:
#null自动转空值
null-to-empty: true
#大数字自动转字符串
big-num-to-string: true
#支持text文本请求,与报文加密同时开启
support-text-plain: false
#redis序列化方式
redis:
serializer-type: protostuff
#日志配置
log:
request:
#开启控制台请求日志
enabled: true
#控制台请求日志忽略
skip-url:
- /notice/list
- /wechat/**
#开启错误日志入库
error-log: true
#xss配置
xss:
enabled: true
skip-url:
- /wechat
- /qq
#安全框架配置
secure:
#严格模式
#缺失令牌字段则取消授权
strict-token: true
#缺失请求头则取消授权
strict-header: true
#接口放行
skip-url:
- /test/**
#授权认证配置
auth:
- method: ALL
pattern: /chat/wechat/**
expression: "hasAuth()"
- method: ALL
pattern: /chat/qq/**
expression: "hasStrictToken()"
- method: ALL
pattern: /chat/ding/**
expression: "hasStrictHeader()"
- method: ALL
pattern: /dashboard/notice
expression: "hasMenu('notice')"
- method: POST
pattern: /dashboard/upload
expression: "hasTimeAuth(9, 17)"
- method: POST
pattern: /dashboard/submit
expression: "hasAnyRole('administrator', 'admin', 'user')"
#基础认证配置
basic:
- method: ALL
pattern: /dashboard/info
username: "blade"
password: "blade"
#动态签名认证配置
sign:
- method: ALL
pattern: /dashboard/sign
crypto: "sha1"
#多终端认证配置
client:
- client-id: sword
path-patterns:
- /sword/**
- client-id: saber
path-patterns:
- /saber/**
#多租户配置
tenant:
#多租户增强
enhance: true
#多租户授权保护
license: false
#动态数据源功能
dynamic-datasource: false
#动态数据源全局扫描
dynamic-global: false
#多租户字段名
column: tenant_id
#排除多租户逻辑
exclude-tables:
- blade_user
#分库分表配置
sharding:
enabled: false
+28
View File
@@ -0,0 +1,28 @@
[
{
"id": "desk-route",
"order": 0,
"predicates": [
{
"name": "Path",
"args": {
"pattern": "/blade-desk/**"
}
}
],
"filters": [],
"uri": "lb://blade-desk-me"
},
{
"id": "example-route",
"order": 0,
"predicates": [{
"name": "Path",
"args": {
"pattern": "/example"
}
}],
"filters": [],
"uri": "http://www.example.com"
}
]
+67
View File
@@ -0,0 +1,67 @@
-- ----------------------------
-- 招采计划模块 MySQL 建表语句
-- ----------------------------
-- ----------------------------
-- Table structure for blade_procurement_plan
-- ----------------------------
DROP TABLE IF EXISTS `blade_procurement_plan`;
CREATE TABLE `blade_procurement_plan` (
`id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
`applicant` varchar(64) DEFAULT NULL COMMENT '申请人',
`apply_time` datetime DEFAULT NULL COMMENT '申请时间',
`phone` varchar(32) DEFAULT NULL COMMENT '联系电话',
`company` varchar(128) DEFAULT NULL COMMENT '所属公司',
`bill_no` varchar(64) DEFAULT NULL COMMENT '单据号',
`year` varchar(4) DEFAULT NULL COMMENT '年度',
`dept` varchar(128) DEFAULT NULL COMMENT '所属部门',
`apply_company` varchar(128) DEFAULT NULL COMMENT '申请所属公司',
`estimated_amount` decimal(18,2) DEFAULT '0.00' COMMENT '预估总金额(万元)',
`amount_upper` varchar(256) DEFAULT NULL COMMENT '预估总金额大写',
`remark` text COMMENT '备注',
`status` int(2) DEFAULT '1' COMMENT '状态',
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_user` bigint(20) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`is_deleted` int(2) DEFAULT '0' COMMENT '是否已删除',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `uk_bill_no` (`bill_no`) USING BTREE,
KEY `idx_year` (`year`) USING BTREE,
KEY `idx_applicant` (`applicant`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='招采计划主表';
-- ----------------------------
-- Table structure for blade_procurement_plan_detail
-- ----------------------------
DROP TABLE IF EXISTS `blade_procurement_plan_detail`;
CREATE TABLE `blade_procurement_plan_detail` (
`id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
`plan_id` bigint(20) NOT NULL COMMENT '主表ID',
`year` varchar(4) DEFAULT NULL COMMENT '年度',
`plan` varchar(128) DEFAULT NULL COMMENT '计划',
`plan_type` varchar(64) DEFAULT NULL COMMENT '计划类型',
`sort_no` int(11) DEFAULT '0' COMMENT '序号',
`project_name` varchar(256) DEFAULT NULL COMMENT '项目名称',
`project_type` varchar(64) DEFAULT NULL COMMENT '项目类型',
`contact_person` varchar(64) DEFAULT NULL COMMENT '项目对接人',
`apply_date` date DEFAULT NULL COMMENT '计划申请日期',
`expect_date` date DEFAULT NULL COMMENT '期望使用/完成日期',
`project_attr` varchar(64) DEFAULT NULL COMMENT '项目属性',
`material_detail` varchar(512) DEFAULT NULL COMMENT '采购物料明细',
`status` int(2) DEFAULT '1' COMMENT '状态',
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_user` bigint(20) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`is_deleted` int(2) DEFAULT '0' COMMENT '是否已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_plan_id` (`plan_id`) USING BTREE,
KEY `idx_year` (`year`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='招采计划明细表';
+79
View File
@@ -0,0 +1,79 @@
/*
Navicat Premium Data Transfer
Source Server : mysql_localhost
Source Server Type : MySQL
Source Server Version : 50723
Source Host : localhost:3306
Source Schema : seata
Target Server Type : MySQL
Target Server Version : 50723
File Encoding : 65001
Date: 10/02/2020 23:42:58
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for branch_table
-- ----------------------------
DROP TABLE IF EXISTS `branch_table`;
CREATE TABLE `branch_table` (
`branch_id` bigint(20) NOT NULL,
`xid` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`transaction_id` bigint(20) NULL DEFAULT NULL,
`resource_group_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`resource_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`branch_type` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`status` tinyint(4) NULL DEFAULT NULL,
`client_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`application_data` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`gmt_create` datetime(6) NULL DEFAULT NULL,
`gmt_modified` datetime(6) NULL DEFAULT NULL,
PRIMARY KEY (`branch_id`) USING BTREE,
INDEX `idx_xid`(`xid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci;
-- ----------------------------
-- Table structure for global_table
-- ----------------------------
DROP TABLE IF EXISTS `global_table`;
CREATE TABLE `global_table` (
`xid` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`transaction_id` bigint(20) NULL DEFAULT NULL,
`status` tinyint(4) NOT NULL,
`application_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`transaction_service_group` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`transaction_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`timeout` int(11) NULL DEFAULT NULL,
`begin_time` bigint(20) NULL DEFAULT NULL,
`application_data` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`gmt_create` datetime(0) NULL DEFAULT NULL,
`gmt_modified` datetime(0) NULL DEFAULT NULL,
PRIMARY KEY (`xid`) USING BTREE,
INDEX `idx_gmt_modified_status`(`gmt_modified`, `status`) USING BTREE,
INDEX `idx_transaction_id`(`transaction_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci;
-- ----------------------------
-- Table structure for lock_table
-- ----------------------------
DROP TABLE IF EXISTS `lock_table`;
CREATE TABLE `lock_table` (
`row_key` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`xid` varchar(96) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`transaction_id` bigint(20) NULL DEFAULT NULL,
`branch_id` bigint(20) NOT NULL,
`resource_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`table_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`pk` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`gmt_create` datetime(0) NULL DEFAULT NULL,
`gmt_modified` datetime(0) NULL DEFAULT NULL,
PRIMARY KEY (`row_key`) USING BTREE,
INDEX `idx_branch_id`(`branch_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci;
SET FOREIGN_KEY_CHECKS = 1;
+51
View File
@@ -0,0 +1,51 @@
/*
Navicat Premium Data Transfer
Source Server : mysql_localhost
Source Server Type : MySQL
Source Server Version : 50723
Source Host : localhost:3306
Source Schema : seata_order
Target Server Type : MySQL
Target Server Version : 50723
File Encoding : 65001
Date: 13/11/2019 18:12:16
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for tb_order
-- ----------------------------
DROP TABLE IF EXISTS `tb_order`;
CREATE TABLE `tb_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`commodity_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`count` int(11) NULL DEFAULT 0,
`money` int(11) NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci;
-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP TABLE IF EXISTS `undo_log`;
CREATE TABLE `undo_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`branch_id` bigint(20) NOT NULL,
`xid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`context` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`rollback_info` longblob NOT NULL,
`log_status` int(11) NOT NULL,
`log_created` datetime(0) NOT NULL,
`log_modified` datetime(0) NOT NULL,
`ext` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `ux_undo_log`(`xid`, `branch_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci;
SET FOREIGN_KEY_CHECKS = 1;
+57
View File
@@ -0,0 +1,57 @@
/*
Navicat Premium Data Transfer
Source Server : mysql_localhost
Source Server Type : MySQL
Source Server Version : 50723
Source Host : localhost:3306
Source Schema : seata_storage
Target Server Type : MySQL
Target Server Version : 50723
File Encoding : 65001
Date: 13/11/2019 18:12:33
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for tb_storage
-- ----------------------------
DROP TABLE IF EXISTS `tb_storage`;
CREATE TABLE `tb_storage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`commodity_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`count` int(11) NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `commodity_code`(`commodity_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci;
-- ----------------------------
-- Records of tb_storage
-- ----------------------------
BEGIN;
INSERT INTO `tb_storage` VALUES (1, 'product-1', 9999999), (2, 'product-2', 0);
COMMIT;
-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP TABLE IF EXISTS `undo_log`;
CREATE TABLE `undo_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`branch_id` bigint(20) NOT NULL,
`xid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`context` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`rollback_info` longblob NOT NULL,
`log_status` int(11) NOT NULL,
`log_created` datetime(0) NOT NULL,
`log_modified` datetime(0) NOT NULL,
`ext` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `ux_undo_log`(`xid`, `branch_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci;
SET FOREIGN_KEY_CHECKS = 1;