From 1ed1752f678f769e43e9faa34809701850c7f727 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期四, 30 三月 2023 19:14:38 +0800
Subject: [PATCH] update 优化 验证码有效期 迁移到数据库 参数管理内

---
 script/sql/ry_vue_5.X.sql |   45 +++++++++++++++++++++++++--------------------
 1 files changed, 25 insertions(+), 20 deletions(-)

diff --git a/script/sql/ry_vue_5.X.sql b/script/sql/ry_vue_5.X.sql
index 430e882..ca4fe11 100644
--- a/script/sql/ry_vue_5.X.sql
+++ b/script/sql/ry_vue_5.X.sql
@@ -62,7 +62,7 @@
 drop table if exists sys_dept;
 create table sys_dept (
   dept_id           bigint(20)      not null                   comment '閮ㄩ棬id',
-  tenant_id         varchar(20)     not null                   comment '绉熸埛缂栧彿',
+  tenant_id         varchar(20)     default '000000'           comment '绉熸埛缂栧彿',
   parent_id         bigint(20)      default 0                  comment '鐖堕儴闂╥d',
   ancestors         varchar(500)    default ''                 comment '绁栫骇鍒楄〃',
   dept_name         varchar(30)     default ''                 comment '閮ㄩ棬鍚嶇О',
@@ -103,7 +103,7 @@
 drop table if exists sys_user;
 create table sys_user (
   user_id           bigint(20)      not null                   comment '鐢ㄦ埛ID',
-  tenant_id         varchar(20)     not null                   comment '绉熸埛缂栧彿',
+  tenant_id         varchar(20)     default '000000'           comment '绉熸埛缂栧彿',
   dept_id           bigint(20)      default null               comment '閮ㄩ棬ID',
   user_name         varchar(30)     not null                   comment '鐢ㄦ埛璐﹀彿',
   nick_name         varchar(30)     not null                   comment '鐢ㄦ埛鏄电О',
@@ -140,7 +140,7 @@
 create table sys_post
 (
   post_id       bigint(20)      not null                   comment '宀椾綅ID',
-  tenant_id     varchar(20)     not null                   comment '绉熸埛缂栧彿',
+  tenant_id     varchar(20)     default '000000'           comment '绉熸埛缂栧彿',
   post_code     varchar(64)     not null                   comment '宀椾綅缂栫爜',
   post_name     varchar(50)     not null                   comment '宀椾綅鍚嶇О',
   post_sort     int(4)          not null                   comment '鏄剧ず椤哄簭',
@@ -169,7 +169,7 @@
 drop table if exists sys_role;
 create table sys_role (
   role_id              bigint(20)      not null                   comment '瑙掕壊ID',
-  tenant_id            varchar(20)     not null                   comment '绉熸埛缂栧彿',
+  tenant_id            varchar(20)     default '000000'           comment '绉熸埛缂栧彿',
   role_name            varchar(30)     not null                   comment '瑙掕壊鍚嶇О',
   role_key             varchar(100)    not null                   comment '瑙掕壊鏉冮檺瀛楃涓�',
   role_sort            int(4)          not null                   comment '鏄剧ず椤哄簭',
@@ -230,7 +230,7 @@
 insert into sys_menu values('6', '绉熸埛绠$悊', '0', '2', 'tenant',           null, '', 1, 0, 'M', '0', '0', '', 'chart',    103, 1, sysdate(), null, null, '绉熸埛绠$悊鐩綍');
 insert into sys_menu values('2', '绯荤粺鐩戞帶', '0', '3', 'monitor',          null, '', 1, 0, 'M', '0', '0', '', 'monitor',  103, 1, sysdate(), null, null, '绯荤粺鐩戞帶鐩綍');
 insert into sys_menu values('3', '绯荤粺宸ュ叿', '0', '4', 'tool',             null, '', 1, 0, 'M', '0', '0', '', 'tool',     103, 1, sysdate(), null, null, '绯荤粺宸ュ叿鐩綍');
-insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '5', 'https://gitee.com/JavaLionLi/RuoYi-Vue-Plus', null, '', 0, 0, 'M', '0', '0', '', 'guide',    103, 1, sysdate(), null, null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃');
+insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '5', 'https://gitee.com/dromara/RuoYi-Vue-Plus', null, '', 0, 0, 'M', '0', '0', '', 'guide',    103, 1, sysdate(), null, null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃');
 -- 浜岀骇鑿滃崟
 insert into sys_menu values('100',  '鐢ㄦ埛绠$悊',     '1',   '1', 'user',             'system/user/index',            '', 1, 0, 'C', '0', '0', 'system:user:list',            'user',          103, 1, sysdate(), null, null, '鐢ㄦ埛绠$悊鑿滃崟');
 insert into sys_menu values('101',  '瑙掕壊绠$悊',     '1',   '2', 'role',             'system/role/index',            '', 1, 0, 'C', '0', '0', 'system:role:list',            'peoples',       103, 1, sysdate(), null, null, '瑙掕壊绠$悊鑿滃崟');
@@ -498,7 +498,7 @@
 drop table if exists sys_oper_log;
 create table sys_oper_log (
   oper_id           bigint(20)      not null                   comment '鏃ュ織涓婚敭',
-  tenant_id         varchar(20)     not null                   comment '绉熸埛缂栧彿',
+  tenant_id         varchar(20)     default '000000'           comment '绉熸埛缂栧彿',
   title             varchar(50)     default ''                 comment '妯″潡鏍囬',
   business_type     int(2)          default 0                  comment '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�',
   method            varchar(100)    default ''                 comment '鏂规硶鍚嶇О',
@@ -529,7 +529,7 @@
 create table sys_dict_type
 (
   dict_id          bigint(20)      not null                   comment '瀛楀吀涓婚敭',
-  tenant_id        varchar(20)     not null                   comment '绉熸埛缂栧彿',
+  tenant_id        varchar(20)     default '000000'           comment '绉熸埛缂栧彿',
   dict_name        varchar(100)    default ''                 comment '瀛楀吀鍚嶇О',
   dict_type        varchar(100)    default ''                 comment '瀛楀吀绫诲瀷',
   status           char(1)         default '0'                comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�',
@@ -560,7 +560,7 @@
 create table sys_dict_data
 (
   dict_code        bigint(20)      not null                   comment '瀛楀吀缂栫爜',
-  tenant_id        varchar(20)     not null                   comment '绉熸埛缂栧彿',
+  tenant_id        varchar(20)     default '000000'           comment '绉熸埛缂栧彿',
   dict_sort        int(4)          default 0                  comment '瀛楀吀鎺掑簭',
   dict_label       varchar(100)    default ''                 comment '瀛楀吀鏍囩',
   dict_value       varchar(100)    default ''                 comment '瀛楀吀閿��',
@@ -611,7 +611,7 @@
 drop table if exists sys_config;
 create table sys_config (
   config_id         bigint(20)      not null                   comment '鍙傛暟涓婚敭',
-  tenant_id         varchar(20)    not null                    comment '绉熸埛缂栧彿',
+  tenant_id         varchar(20)     default '000000'           comment '绉熸埛缂栧彿',
   config_name       varchar(100)    default ''                 comment '鍙傛暟鍚嶇О',
   config_key        varchar(100)    default ''                 comment '鍙傛暟閿悕',
   config_value      varchar(500)    default ''                 comment '鍙傛暟閿��',
@@ -625,12 +625,17 @@
   primary key (config_id)
 ) engine=innodb comment = '鍙傛暟閰嶇疆琛�';
 
-insert into sys_config values(1, '000000', '涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О',     'sys.index.skinName',            'skin-blue',     'Y', 103, 1, sysdate(), null, null, '钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow' );
-insert into sys_config values(2, '000000', '鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜',        'sys.user.initPassword',         '123456',        'Y', 103, 1, sysdate(), null, null, '鍒濆鍖栧瘑鐮� 123456' );
-insert into sys_config values(3, '000000', '涓绘鏋堕〉-渚ц竟鏍忎富棰�',          'sys.index.sideTheme',           'theme-dark',    'Y', 103, 1, sysdate(), null, null, '娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light' );
-insert into sys_config values(5, '000000', '璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�',  'sys.account.registerUser',      'false',         'Y', 103, 1, sysdate(), null, null, '鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�');
-insert into sys_config values(11, '000000', 'OSS棰勮鍒楄〃璧勬簮寮�鍏�',         'sys.oss.previewListResource',   'true',          'Y', 103, 1, sysdate(), null, null, 'true:寮�鍚�, false:鍏抽棴');
-
+insert into sys_config values(1, '000000', '涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О',    'sys.index.skinName',         'skin-blue',   'Y', 103, 1, sysdate(), null, NULL, '钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow');
+insert into sys_config values(2, '000000', '鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜',       'sys.user.initPassword',      '123456',      'Y', 103, 1, sysdate(), null, NULL, '鍒濆鍖栧瘑鐮� 123456');
+insert into sys_config values(3, '000000', '涓绘鏋堕〉-渚ц竟鏍忎富棰�',         'sys.index.sideTheme',        'theme-dark',  'Y', 103, 1, sysdate(), null, NULL, '娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light');
+insert into sys_config values(4, '000000', '鐢ㄦ埛閰嶇疆-楠岃瘉鐮佹湁鏁堟湡',        'sys.account.captchaExpired',  '2',         'Y', 103, 1, sysdate(), null, NULL, '楠岃瘉鐮佹湁鏁堟湡锛堝垎閽燂級');
+insert into sys_config values(5, '000000', '璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�', 'sys.account.registerUser',   'false',       'Y', 103, 1, sysdate(), null, NULL, '鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�');
+insert into sys_config values(6, '000000', '鐢ㄦ埛閰嶇疆-瀵嗙爜鏈�澶ч敊璇鏁�',    'sys.user.maxRetryCount',      '5',          'Y', 103, 1, sysdate(), null, NULL, '瀵嗙爜鏈�澶ч敊璇鏁�');
+insert into sys_config values(7, '000000', '鐢ㄦ埛閰嶇疆-瀵嗙爜閿佸畾鏃堕棿',        'sys.user.lockTime',          '10',         'Y', 103, 1, sysdate(), null, NULL, '瀵嗙爜閿佸畾鏃堕棿锛堝垎閽燂級');
+insert into sys_config values(8, '000000', '璐﹀彿鑷姪-鐭俊寮�鍏�',           'sys.account.smsEnabled',      'false',      'Y', 103, 1, sysdate(), null, NULL, '鏄惁寮�鍚煭淇″姛鑳斤紙true寮�鍚紝false鍏抽棴锛�');
+insert into sys_config values(9, '000000', '璐﹀彿鑷姪-鐭俊楠岃瘉鐮佹ā鏉縤d',     'sys.account.templateId',     '',           'Y', 103, 1, sysdate(), null, NULL, '楠岃瘉鐮佹ā鏉縤d');
+insert into sys_config values(10, '000000', '璐﹀彿鑷姪-閭欢寮�鍏�',           'sys.account.emailEnabled',    'false',     'Y', 103, 1, sysdate(), null, NULL, '鏄惁寮�鍚偖浠跺姛鑳斤紙true寮�鍚紝false鍏抽棴锛�');
+insert into sys_config values(11,'000000', 'OSS棰勮鍒楄〃璧勬簮寮�鍏�',          'sys.oss.previewListResource', 'true',      'Y', 103, 1, sysdate(), null, NULL, 'true:寮�鍚�, false:鍏抽棴');
 
 -- ----------------------------
 -- 14銆佺郴缁熻闂褰�
@@ -638,7 +643,7 @@
 drop table if exists sys_logininfor;
 create table sys_logininfor (
   info_id        bigint(20)     not null                  comment '璁块棶ID',
-  tenant_id      varchar(20)    not null                  comment '绉熸埛缂栧彿',
+  tenant_id      varchar(20)    default '000000'          comment '绉熸埛缂栧彿',
   user_name      varchar(50)    default ''                comment '鐢ㄦ埛璐﹀彿',
   ipaddr         varchar(128)   default ''                comment '鐧诲綍IP鍦板潃',
   login_location varchar(255)   default ''                comment '鐧诲綍鍦扮偣',
@@ -659,7 +664,7 @@
 drop table if exists sys_notice;
 create table sys_notice (
   notice_id         bigint(20)      not null                   comment '鍏憡ID',
-  tenant_id         varchar(20)     not null                   comment '绉熸埛缂栧彿',
+  tenant_id         varchar(20)     default '000000'           comment '绉熸埛缂栧彿',
   notice_title      varchar(50)     not null                   comment '鍏憡鏍囬',
   notice_type       char(1)         not null                   comment '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�',
   notice_content    longblob        default null               comment '鍏憡鍐呭',
@@ -747,7 +752,7 @@
 drop table if exists sys_oss;
 create table sys_oss (
   oss_id          bigint(20)   not null                   comment '瀵硅薄瀛樺偍涓婚敭',
-  tenant_id       varchar(20)  not null                   comment '绉熸埛缂栧彿',
+  tenant_id       varchar(20)           default '000000'  comment '绉熸埛缂栧彿',
   file_name       varchar(255) not null default ''        comment '鏂囦欢鍚�',
   original_name   varchar(255) not null default ''        comment '鍘熷悕',
   file_suffix     varchar(10)  not null default ''        comment '鏂囦欢鍚庣紑鍚�',
@@ -767,7 +772,7 @@
 drop table if exists sys_oss_config;
 create table sys_oss_config (
   oss_config_id   bigint(20)    not null                  comment '涓诲缓',
-  tenant_id       varchar(20)   not null                  comment '绉熸埛缂栧彿',
+  tenant_id       varchar(20)             default '000000'comment '绉熸埛缂栧彿',
   config_key      varchar(20)   not null  default ''      comment '閰嶇疆key',
   access_key      varchar(255)            default ''      comment 'accessKey',
   secret_key      varchar(255)            default ''      comment '绉橀挜',
@@ -778,7 +783,7 @@
   is_https        char(1)                 default 'N'     comment '鏄惁https锛圷=鏄�,N=鍚︼級',
   region          varchar(255)            default ''      comment '鍩�',
   access_policy   char(1)       not null  default '1'     comment '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)',
-  status          char(1)                 default '1'     comment '鐘舵�侊紙0=姝e父,1=鍋滅敤锛�',
+  status          char(1)                 default '1'     comment '鏄惁榛樿锛�0=鏄�,1=鍚︼級',
   ext1            varchar(255)            default ''      comment '鎵╁睍瀛楁',
   create_dept     bigint(20)              default null    comment '鍒涘缓閮ㄩ棬',
   create_by       bigint(20)              default null    comment '鍒涘缓鑰�',

--
Gitblit v1.9.3