diff --git a/doc/sql/mysql/clean.sql b/doc/sql/mysql/clean.sql new file mode 100644 index 00000000..afafd232 --- /dev/null +++ b/doc/sql/mysql/clean.sql @@ -0,0 +1,132 @@ +-- 系统用户 +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; + +-- 课程标签 +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'); +INSERT INTO `course_label` (`course_label_id`, `course_label_type`, `course_label_name`, `course_label_status`, `org_id`, `user_id`, `add_type`) VALUES (4, '应用课程类', '商业大数据', 1, 1, 1, 'ADMIN_ADD'); +INSERT INTO `course_label` (`course_label_id`, `course_label_type`, `course_label_name`, `course_label_status`, `org_id`, `user_id`, `add_type`) VALUES (5, '应用课程类', '营销大数据 ', 1, 1, 1, 'ADMIN_ADD'); +INSERT INTO `course_label` (`course_label_id`, `course_label_type`, `course_label_name`, `course_label_status`, `org_id`, `user_id`, `add_type`) VALUES (8, '理论课程类', '传统金融', 1, 1, 1, 'ADMIN_ADD'); +INSERT INTO `course_label` (`course_label_id`, `course_label_type`, `course_label_name`, `course_label_status`, `org_id`, `user_id`, `add_type`) VALUES (9, '理论课程类', '金融风险', 1, 1, 1, 'ADMIN_ADD'); +INSERT INTO `course_label` (`course_label_id`, `course_label_type`, `course_label_name`, `course_label_status`, `org_id`, `user_id`, `add_type`) VALUES (10, '理论课程类', '证券投资', 1, 1, 1, 'ADMIN_ADD'); +INSERT INTO `course_label` (`course_label_id`, `course_label_type`, `course_label_name`, `course_label_status`, `org_id`, `user_id`, `add_type`) VALUES (16, '应用课程类', '金融区块链', 1, 1, 100, 'ADMIN_ADD'); +INSERT INTO `course_label` (`course_label_id`, `course_label_type`, `course_label_name`, `course_label_status`, `org_id`, `user_id`, `add_type`) VALUES (17, '考证课程类', '证券从业资格考试', 1, 1, 100, 'ADMIN_ADD'); +INSERT INTO `course_label` (`course_label_id`, `course_label_type`, `course_label_name`, `course_label_status`, `org_id`, `user_id`, `add_type`) VALUES (18, '理论课程类', '金融科技', 1, 1, 100, 'ADMIN_ADD'); +INSERT INTO `course_label` (`course_label_id`, `course_label_type`, `course_label_name`, `course_label_status`, `org_id`, `user_id`, `add_type`) VALUES (19, '理论课程类', '金融风险管理', 1, 1, 100, 'ADMIN_ADD'); + + +-- 其他表非系统表全清空 +truncate table application_merge_teacher_open_course; +truncate table attribute; +truncate table attribute_grouping; +truncate table attribute_relation; +truncate table cms_blog; +truncate table competition; +truncate table competition_academy_style; +truncate table competition_news; +truncate table competition_students; +truncate table competition_task_main; +truncate table competition_task_one_question; +truncate table competition_task_second_question; +truncate table competition_task_second_question_step; +truncate table competition_teacher_evaluation; +truncate table core_user_wx; +truncate table course_homework_question; +truncate table course_info; +truncate table exam; +truncate table exam_students; +truncate table exam_task_one_question; +truncate table exam_task_second_question; +truncate table exam_task_second_question_step; +truncate table exam_task_three_question; +truncate table exam_task_three_question_step; +truncate table general_question_log; +truncate table general_question_setting; +truncate table general_resources_question_snapshot; +truncate table hands_on; +truncate table hands_on_achievement; +truncate table hands_on_simulation_tasks; +truncate table hands_on_simulation_tasks_assessment; +truncate table hands_on_simulation_tasks_file; +truncate table notice_read; +truncate table question_log_summary; +truncate table resources_application; +truncate table resources_application_course; +truncate table resources_competition; +truncate table resources_competition_step; +truncate table resources_info; +truncate table resources_question; +truncate table resources_question_snapshot; +truncate table resources_training; +truncate table resources_training_step; +truncate table school_class; +truncate table student; +truncate table student_account_asset_allocation; +truncate table student_account_trading_record_sheet; +truncate table student_client_link; +truncate table student_defence_log; +truncate table student_defence_log_info; +truncate table student_defence_log_note; +truncate table student_direct_messages; +truncate table student_hands_on_task_log; +truncate table student_hands_on_task_ppt; +truncate table student_hands_on_task_report; +truncate table student_hands_on_task_step; +truncate table student_hands_on_task_theory; +truncate table student_hands_on_task_video; +truncate table student_merge_application; +truncate table student_question_log; +truncate table student_question_log_answer; +truncate table student_question_log_info; +truncate table student_teacher_system_use_log_analysis; +truncate table sys_log; +truncate table sys_log_longtext; +truncate table sys_log_mediumtext; +truncate table sys_log_text; +truncate table teacher; +truncate table teacher_merge_application; +truncate table teacher_open_course; +truncate table teacher_open_course_chat_log; +truncate table teacher_open_course_hands_on; +truncate table teacher_open_course_hands_on_simulation_tasks; +truncate table teacher_open_course_hands_on_simulation_tasks_assessment; +truncate table teacher_open_course_hands_on_simulation_tasks_file; +truncate table teacher_open_course_knowledge_point; +truncate table teacher_open_course_knowledge_point_relation; +truncate table teacher_open_course_merge_course_info; +truncate table teacher_open_course_merge_resources_info; +truncate table teacher_open_course_merge_resources_question; +truncate table teacher_open_course_merge_schedule_session; +truncate table teacher_open_course_merge_school_class; +truncate table teacher_open_course_merge_student; +truncate table teacher_open_course_merge_teacher; +truncate table teacher_open_course_notice; +truncate table teacher_open_course_notice_student; +truncate table teacher_open_course_question_log; +truncate table teacher_open_course_question_log_wrong; +truncate table teacher_open_course_question_setting; +truncate table teacher_open_course_real_operation; +truncate table teacher_open_course_real_operation_review_report; +truncate table teacher_open_course_real_operation_task; +truncate table teacher_open_course_real_operation_task_ppt; +truncate table teacher_open_course_real_operation_task_report_writing; +truncate table teacher_open_course_real_operation_task_step; +truncate table teacher_open_course_real_operation_task_theory; +truncate table teacher_open_course_real_operation_task_video; +truncate table teacher_open_course_schedule; +truncate table teacher_open_course_schedule_session; +truncate table teacher_open_course_schedule_session_class; +truncate table teacher_open_course_schedule_session_snap; +truncate table teacher_open_course_schedule_session_tag; +truncate table teacher_open_course_score_dashboard; +truncate table teacher_open_course_score_weight; +truncate table teacher_open_course_student_signin_log; +truncate table teacher_open_course_student_signin_setting; +truncate table teaching_management; +truncate table universities_colleges; +truncate table universities_colleges_jurisdiction_curriculum_resources; +truncate table universities_colleges_jurisdiction_experimental_system; +truncate table university_faculty; +truncate table university_system; +truncate table wrong_question; \ No newline at end of file