wangliang преди 2 години
родител
ревизия
4cd12cfa44
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      distributed-print-business/src/main/resources/db/4、delete-data.sql

+ 1 - 1
distributed-print-business/src/main/resources/db/4、delete-data.sql

@@ -53,7 +53,7 @@ DELETE t FROM grade_paper_dimension t where t.school_id = #{schoolId};
 DELETE t FROM grade_paper_struct t where t.school_id = #{schoolId};
 
 DELETE t FROM sys_config t where t.school_id = #{schoolId};
-DELETE t FROM sys_org t where t.school_id = #{schoolId};
+DELETE t FROM sys_org t where t.school_id = #{schoolId} and (t.`type` <> 'SCHOOL' or t.`type` is null);
 DELETE t FROM sys_role_group_member t where exists(select temp.* from(select sr.id from sys_role sr where sr.school_id = #{schoolId}) temp where t.role_id = temp.id);
 DELETE t FROM sys_role_privilege t where exists(select temp.* from(select sr.id from sys_role sr where sr.school_id = #{schoolId}) temp where t.role_id = temp.id);
 DELETE t FROM sys_user_role t where exists(select temp.* from(select sr.id from sys_role sr where sr.school_id = #{schoolId}) temp where t.role_id = temp.id);