From 40d516b27fac06e47edcd710d07b9c50dea632b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Sat, 4 Feb 2023 21:25:47 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0sql=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/sql/oracle/oracle_ry_vue_5.X.sql | 38 ++++++------ script/sql/postgres/postgres_ry_vue_5.X.sql | 38 ++++++------ script/sql/ry_vue_5.X.sql | 58 +++++++++---------- script/sql/sqlserver/sqlserver_ry_vue_5.X.sql | 25 ++++---- 4 files changed, 80 insertions(+), 79 deletions(-) diff --git a/script/sql/oracle/oracle_ry_vue_5.X.sql b/script/sql/oracle/oracle_ry_vue_5.X.sql index 388e31a5d..072a78713 100644 --- a/script/sql/oracle/oracle_ry_vue_5.X.sql +++ b/script/sql/oracle/oracle_ry_vue_5.X.sql @@ -1,6 +1,6 @@ -/*==============================================================*/ -/* Table: sys_tenant 租户表 */ -/*==============================================================*/ +-- ---------------------------- +-- 租户表 +-- ---------------------------- create table sys_tenant ( id number(20) not null, tenant_id varchar2(20) not null, @@ -13,7 +13,7 @@ create table sys_tenant ( remark varchar2(200) default '', package_id number(20) default null, expire_time date default null, - account_count number(4) default 0, + account_count number(4) default -1, status char(1) default '0', del_flag char(1) default '0', create_dept number(20) default null, @@ -36,7 +36,7 @@ comment on column sys_tenant.intro is '企业简介'; comment on column sys_tenant.remark is '备注'; comment on column sys_tenant.package_id is '租户套餐编号'; comment on column sys_tenant.expire_time is '过期时间'; -comment on column sys_tenant.account_count is '用户数量'; +comment on column sys_tenant.account_count is '用户数量(-1不限制)'; comment on column sys_tenant.status is '租户状态(0正常 1停用)'; comment on column sys_tenant.del_flag is '删除标志(0代表存在 2代表删除)'; comment on column sys_tenant.create_dept is '创建部门'; @@ -49,12 +49,12 @@ comment on column sys_tenant.update_time is '更新时间'; -- 初始化-租户表数据 -- ---------------------------- -insert into sys_tenant values (1, '000000', '张三', '13912345678', 'xxx有限公司', 'xxx', 'xxx', 'xxx', 'xxx', null, null, 10, '0', '0', 103, 1, sysdate, null, null); +insert into sys_tenant values(1, '000000', '管理组', '15888888888', 'XXX有限公司', null, null, '多租户通用后台管理管理系统', null, null, null, -1, '0', '0', 103, 1, sysdate, null, null); -/*==============================================================*/ -/* Table: sys_tenant_package 租户套餐表 */ -/*==============================================================*/ +-- ---------------------------- +-- 租户套餐表 +-- ---------------------------- create table sys_tenant_package ( package_id number(20) not null, package_name varchar2(20) default '', @@ -128,16 +128,16 @@ comment on column sys_dept.update_time is '更新时间'; -- ---------------------------- -- 初始化-部门表数据 -- ---------------------------- -insert into sys_dept values(100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null); +insert into sys_dept values(100, 0, '0', 'XXX科技', 0, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); +insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); +insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); +insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); +insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); +insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); +insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); +insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); +insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); +insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); -- ---------------------------- diff --git a/script/sql/postgres/postgres_ry_vue_5.X.sql b/script/sql/postgres/postgres_ry_vue_5.X.sql index aabdde7fd..bb165aece 100644 --- a/script/sql/postgres/postgres_ry_vue_5.X.sql +++ b/script/sql/postgres/postgres_ry_vue_5.X.sql @@ -1,6 +1,6 @@ -/*==============================================================*/ -/* Table: sys_tenant 租户表 */ -/*==============================================================*/ +-- ---------------------------- +-- 租户表 +-- ---------------------------- drop table if exists sys_tenant; create table if not exists sys_tenant ( @@ -15,7 +15,7 @@ create table if not exists sys_tenant remark varchar(200) default null::varchar, package_id int8, expire_time timestamp, - account_count int4 default 0, + account_count int4 default -1, status char default '0'::bpchar, del_flag char default '0'::bpchar, create_dept int8, @@ -38,7 +38,7 @@ comment on column sys_tenant.intro is '企业简介'; comment on column sys_tenant.remark is '备注'; comment on column sys_tenant.package_id is '租户套餐编号'; comment on column sys_tenant.expire_time is '过期时间'; -comment on column sys_tenant.account_count is '用户数量'; +comment on column sys_tenant.account_count is '用户数量(-1不限制)'; comment on column sys_tenant.status is '租户状态(0正常 1停用)'; comment on column sys_tenant.del_flag is '删除标志(0代表存在 2代表删除)'; comment on column sys_tenant.create_dept is '创建部门'; @@ -52,12 +52,12 @@ comment on column sys_tenant.update_time is '更新时间'; -- 初始化-租户表数据 -- ---------------------------- -insert into sys_tenant values (1, '000000', '张三', '13912345678', 'xxx有限公司', 'xxx', 'xxx', 'xxx', 'xxx', null, null, 10, '0', '0', 103, 1, now(), null, null); +insert into sys_tenant values(1, '000000', '管理组', '15888888888', 'XXX有限公司', null, null, '多租户通用后台管理管理系统', null, null, null, -1, '0', '0', 103, 1, now(), null, null); -/*==============================================================*/ -/* Table: sys_tenant_package 租户套餐表 */ -/*==============================================================*/ +-- ---------------------------- +-- 租户套餐表 +-- ---------------------------- drop table if exists sys_tenant_package; create table if not exists sys_tenant_package ( @@ -134,16 +134,16 @@ comment on column sys_dept.update_time is '更新时间'; -- ---------------------------- -- 初始化-部门表数据 -- ---------------------------- -insert into sys_dept values(100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null); +insert into sys_dept values(100, 0, '0', 'XXX科技', 0, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); +insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); +insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); +insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); +insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); +insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); +insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); +insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); +insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); +insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); -- ---------------------------- -- 2、用户信息表 diff --git a/script/sql/ry_vue_5.X.sql b/script/sql/ry_vue_5.X.sql index 7fc6aa69e..03b7bced6 100644 --- a/script/sql/ry_vue_5.X.sql +++ b/script/sql/ry_vue_5.X.sql @@ -1,11 +1,11 @@ -/*==============================================================*/ -/* Table: sys_tenant 租户表 */ -/*==============================================================*/ +-- ---------------------------- +-- 租户表 +-- ---------------------------- drop table if exists sys_tenant; create table sys_tenant ( - id bigint(20) NOT NULL comment 'id', - tenant_id varchar(20) NOT NULL comment '租户编号', + id bigint(20) not null comment 'id', + tenant_id varchar(20) not null comment '租户编号', contact_user_name varchar(20) comment '联系人', contact_phone varchar(20) comment '联系电话', company_name varchar(50) comment '企业名称', @@ -15,15 +15,15 @@ create table sys_tenant remark varchar(200) comment '备注', package_id bigint(20) comment '租户套餐编号', expire_time datetime comment '过期时间', - account_count int comment '用户数量', - status char(1) DEFAULT '0' comment '租户状态(0正常 1停用)', - del_flag char(1) DEFAULT '0' comment '删除标志(0代表存在 2代表删除)', + account_count int default -1 comment '用户数量(-1不限制)', + status char(1) default '0' comment '租户状态(0正常 1停用)', + del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', create_dept bigint(20) comment '创建部门', create_by bigint(20) comment '创建者', create_time datetime comment '创建时间', update_by bigint(20) comment '更新者', update_time datetime comment '更新时间', - PRIMARY KEY (id) + primary key (id) ) engine=innodb comment = '租户表'; @@ -31,26 +31,26 @@ create table sys_tenant -- 初始化-租户表数据 -- ---------------------------- -INSERT INTO sys_tenant VALUES (1, '000000', '张三', '13912345678', 'XXX有限公司', 'XXX', 'XXX', 'XXX', 'XXX', NULL, NULL, 10, '0', '0', 103, 1, SYSDATE(), NULL, NULL); +insert into sys_tenant values(1, '000000', '管理组', '15888888888', 'XXX有限公司', NULL, NULL, '多租户通用后台管理管理系统', NULL, NULL, NULL, -1, '0', '0', 103, 1, sysdate(), NULL, NULL); -/*==============================================================*/ -/* Table: sys_tenant_package 租户套餐表 */ -/*==============================================================*/ +-- ---------------------------- +-- 租户套餐表 +-- ---------------------------- drop table if exists sys_tenant_package; -CREATE TABLE sys_tenant_package ( - package_id bigint(20) NOT NULL comment '租户套餐id', +create table sys_tenant_package ( + package_id bigint(20) not null comment '租户套餐id', package_name varchar(20) comment '套餐名称', menu_ids varchar(3000) comment '关联菜单id', remark varchar(200) comment '备注', - status char(1) DEFAULT '0' comment '状态(0正常 1停用)', - del_flag char(1) DEFAULT '0' comment '删除标志(0代表存在 2代表删除)', + status char(1) default '0' comment '状态(0正常 1停用)', + del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', create_dept bigint(20) comment '创建部门', create_by bigint(20) comment '创建者', create_time datetime comment '创建时间', update_by bigint(20) comment '更新者', update_time datetime comment '更新时间', - PRIMARY KEY (package_id) + primary key (package_id) ) engine=innodb comment = '租户套餐表'; @@ -82,16 +82,16 @@ create table sys_dept ( -- ---------------------------- -insert into sys_dept values(100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null); -insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null); -insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null); -insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null); -insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null); -insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null); -insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null); -insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null); -insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null); -insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null); +insert into sys_dept values(100, 0, '0', 'XXX科技', 0, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null); +insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null); +insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null); +insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null); +insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null); +insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null); +insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null); +insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null); +insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null); +insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null); -- ---------------------------- @@ -99,7 +99,7 @@ insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '若 -- ---------------------------- drop table if exists sys_user; create table sys_user ( - user_id bigint(20) not null comment '用户ID', + user_id bigint(20) not null comment '用户ID', dept_id bigint(20) default null comment '部门ID', user_name varchar(30) not null comment '用户账号', nick_name varchar(30) not null comment '用户昵称', diff --git a/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql b/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql index f310c685e..9a17617a0 100644 --- a/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql +++ b/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql @@ -11,6 +11,7 @@ CREATE TABLE [sys_tenant] [remark] nvarchar(200) NULL, [package_id] bigint NULL, [expire_time] datetime2(7) NULL, + [account_count] int DEFAULT ((-1)) NULL, [status] nchar(1) DEFAULT ('0') NULL, [del_flag] nchar(1) DEFAULT ('0') NULL, [create_dept] bigint NULL, @@ -92,7 +93,7 @@ EXEC sys.sp_addextendedproperty 'COLUMN', N'expire_time' GO EXEC sys.sp_addextendedproperty - 'MS_Description', N'用户数量' , + 'MS_Description', N'用户数量(-1不限制)' , 'SCHEMA', N'dbo', 'TABLE', N'sys_tenant', 'COLUMN', N'account_count' @@ -145,7 +146,7 @@ EXEC sys.sp_addextendedproperty 'TABLE', N'sys_tenant' GO -INSERT [sys_tenant] ([id], [tenant_id], [contact_user_name], [contact_phone], [company_name], [license_number], [address], [intro], [remark], [package_id], [expire_time], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (1, '000000', '张三', '13912345678', 'xxx有限公司', 'xxx', 'xxx', 'xxx', 'xxx', NULL, NULL, 10, '0', '0', 103, 1, getdate(), NULL, NULL) +INSERT [sys_tenant] ([id], [tenant_id], [contact_user_name], [contact_phone], [company_name], [license_number], [address], [intro], [remark], [package_id], [expire_time], [account_count], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (1, N'000000', N'管理组', N'15888888888', N'XXX有限公司', NULL, NULL, N'多租户通用后台管理管理系统', NULL, NULL, NULL, -1, N'0', N'0', 103, 1, getdate(), NULL, NULL) GO @@ -805,25 +806,25 @@ EXEC sys.sp_addextendedproperty 'TABLE', N'sys_dept' GO -INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (100, 0, N'0', N'若依科技', 0, N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) +INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (100, 0, N'0', N'XXX科技', 0, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) GO -INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (101, 100, N'0,100', N'深圳总公司', 1, N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) +INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (101, 100, N'0,100', N'深圳总公司', 1, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) GO -INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (102, 100, N'0,100', N'长沙分公司', 2, N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) +INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (102, 100, N'0,100', N'长沙分公司', 2, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) GO -INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (103, 101, N'0,100,101', N'研发部门', 1, N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) +INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (103, 101, N'0,100,101', N'研发部门', 1, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) GO -INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (104, 101, N'0,100,101', N'市场部门', 2, N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) +INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (104, 101, N'0,100,101', N'市场部门', 2, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) GO -INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (105, 101, N'0,100,101', N'测试部门', 3, N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) +INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (105, 101, N'0,100,101', N'测试部门', 3, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) GO -INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (106, 101, N'0,100,101', N'财务部门', 4, N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) +INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (106, 101, N'0,100,101', N'财务部门', 4, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) GO -INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (107, 101, N'0,100,101', N'运维部门', 5, N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) +INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (107, 101, N'0,100,101', N'运维部门', 5, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) GO -INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (108, 102, N'0,100,102', N'市场部门', 1, N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) +INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (108, 102, N'0,100,102', N'市场部门', 1, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) GO -INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (109, 102, N'0,100,102', N'财务部门', 2, N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) +INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (109, 102, N'0,100,102', N'财务部门', 2, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL) GO CREATE TABLE [sys_dict_data]