From 48e2fd7d616e02f47616c3a8520b342ee1985fec Mon Sep 17 00:00:00 2001 From: Mlxa0324 Date: Fri, 14 Apr 2023 01:03:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=20=E6=B8=85=E7=A9=BA?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=95=B0=E6=8D=AEsql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/sql/mysql/clean.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/sql/mysql/clean.sql b/doc/sql/mysql/clean.sql index afafd232..4068561d 100644 --- a/doc/sql/mysql/clean.sql +++ b/doc/sql/mysql/clean.sql @@ -2,6 +2,14 @@ delete from core_user t where not find_in_set(t.code, 'admin,超级管理员') or t.code is null; update core_user t set t.login_count = 0; +-- 菜单role和用户关系表 +delete from core_user_role t where t.user_id not in ( + select id from core_user t where find_in_set(t.code, 'admin,超级管理员') +); + +-- 机构表 +delete from core_org t where not (t.id = 1 or t.`name` = '金融虚拟仿真实验平台'); + -- 课程标签 truncate table course_label; INSERT INTO `course_label` (`course_label_id`, `course_label_type`, `course_label_name`, `course_label_status`, `org_id`, `user_id`, `add_type`) VALUES (3, '应用课程类', '财会大数据', 1, 1, 1, 'ADMIN_ADD');