├── .gitignore ├── .idea ├── compiler.xml ├── encodings.xml ├── libraries │ ├── Maven__ch_qos_logback_logback_classic_1_1_11.xml │ ├── Maven__ch_qos_logback_logback_core_1_1_11.xml │ ├── Maven__com_fasterxml_classmate_1_3_4.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_8_0.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_8_10.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_8_10.xml │ ├── Maven__com_github_axet_kaptcha_0_0_9.xml │ ├── Maven__com_jayway_jsonpath_json_path_2_2_0.xml │ ├── Maven__com_jhlabs_filters_2_0_235.xml │ ├── Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml │ ├── Maven__javax_validation_validation_api_1_1_0_Final.xml │ ├── Maven__junit_junit_4_12.xml │ ├── Maven__mysql_mysql_connector_java_5_1_44.xml │ ├── Maven__net_minidev_accessors_smart_1_1.xml │ ├── Maven__net_minidev_json_smart_2_2_1.xml │ ├── Maven__nz_net_ultraq_thymeleaf_thymeleaf_layout_dialect_1_4_0.xml │ ├── Maven__ognl_ognl_3_0_8.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_core_8_5_23.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_el_8_5_23.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_websocket_8_5_23.xml │ ├── Maven__org_apache_tomcat_tomcat_annotations_api_8_5_23.xml │ ├── Maven__org_apache_tomcat_tomcat_jdbc_8_5_23.xml │ ├── Maven__org_apache_tomcat_tomcat_juli_8_5_23.xml │ ├── Maven__org_assertj_assertj_core_2_6_0.xml │ ├── Maven__org_codehaus_groovy_groovy_2_4_12.xml │ ├── Maven__org_hamcrest_hamcrest_core_1_3.xml │ ├── Maven__org_hamcrest_hamcrest_library_1_3.xml │ ├── Maven__org_hibernate_hibernate_validator_5_3_5_Final.xml │ ├── Maven__org_javassist_javassist_3_21_0_GA.xml │ ├── Maven__org_jboss_logging_jboss_logging_3_3_1_Final.xml │ ├── Maven__org_mockito_mockito_core_1_10_19.xml │ ├── Maven__org_mybatis_mybatis_3_4_5.xml │ ├── Maven__org_mybatis_mybatis_spring_1_3_1.xml │ ├── Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_1_3_1.xml │ ├── Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_1_3_1.xml │ ├── Maven__org_objenesis_objenesis_2_1.xml │ ├── Maven__org_ow2_asm_asm_5_0_3.xml │ ├── Maven__org_skyscreamer_jsonassert_1_4_0.xml │ ├── Maven__org_slf4j_jcl_over_slf4j_1_7_25.xml │ ├── Maven__org_slf4j_jul_to_slf4j_1_7_25.xml │ ├── Maven__org_slf4j_log4j_over_slf4j_1_7_25.xml │ ├── Maven__org_slf4j_slf4j_api_1_7_25.xml │ ├── Maven__org_springframework_boot_spring_boot_1_5_8_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_autoconfigure_1_5_8_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_devtools_1_5_8_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_1_5_8_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_jdbc_1_5_8_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_logging_1_5_8_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_test_1_5_8_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_thymeleaf_1_5_8_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_tomcat_1_5_8_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_web_1_5_8_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_test_1_5_8_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_test_autoconfigure_1_5_8_RELEASE.xml │ ├── Maven__org_springframework_spring_aop_4_3_12_RELEASE.xml │ ├── Maven__org_springframework_spring_beans_4_3_12_RELEASE.xml │ ├── Maven__org_springframework_spring_context_4_3_12_RELEASE.xml │ ├── Maven__org_springframework_spring_core_4_3_12_RELEASE.xml │ ├── Maven__org_springframework_spring_expression_4_3_12_RELEASE.xml │ ├── Maven__org_springframework_spring_jdbc_4_3_12_RELEASE.xml │ ├── Maven__org_springframework_spring_test_4_3_12_RELEASE.xml │ ├── Maven__org_springframework_spring_tx_4_3_12_RELEASE.xml │ ├── Maven__org_springframework_spring_web_4_3_12_RELEASE.xml │ ├── Maven__org_springframework_spring_webmvc_4_3_12_RELEASE.xml │ ├── Maven__org_thymeleaf_thymeleaf_2_1_5_RELEASE.xml │ ├── Maven__org_thymeleaf_thymeleaf_spring4_2_1_5_RELEASE.xml │ ├── Maven__org_unbescape_unbescape_1_1_0_RELEASE.xml │ └── Maven__org_yaml_snakeyaml_1_17.xml ├── misc.xml ├── modules.xml ├── uiDesigner.xml └── vcs.xml ├── ExaminationSystem.iml ├── LICENSE ├── airing_lastCheck.sql ├── dbtest1.sql ├── dbtest2.sql ├── pom.xml └── src └── main ├── java └── examination │ ├── ExaminationApplication.java │ ├── config │ ├── KaptchaConfig.java │ └── MyWebAppConfigurer.java │ ├── controller │ ├── AdminController.java │ ├── CaptchaController.java │ ├── LoginController.java │ ├── StudentController.java │ └── TeacherController.java │ ├── dao │ ├── AdminDao.java │ ├── ChartDao.java │ ├── ChoiceDao.java │ ├── ClassDao.java │ ├── EvaluateDao.java │ ├── ExamDao.java │ ├── JudgeDao.java │ ├── PaperDao.java │ ├── QuestionDao.java │ ├── StudentDao.java │ ├── SubjectDao.java │ └── TeacherDao.java │ ├── entity │ ├── Admin.java │ ├── ChoiceQuestion.java │ ├── Class.java │ ├── JudgeQuestion.java │ ├── Page.java │ ├── Paper.java │ ├── Question │ │ ├── Choicedba.java │ │ ├── Evadba.java │ │ ├── Judgedba.java │ │ └── Subdba.java │ ├── Record.java │ ├── Status.java │ ├── Student.java │ ├── SubjectQuestion.java │ ├── Teacher.java │ └── User.java │ ├── interceptor │ ├── AdminInterceptor.java │ ├── CaptchaInterceptor.java │ ├── LoginInterceptor.java │ ├── StudentInterceptor.java │ └── TeacherInterceptor.java │ └── service │ ├── AdminService.java │ ├── ChartService.java │ ├── CompareSQLService.java │ ├── EvaluatingService.java │ ├── ExamService.java │ ├── ExerciseService.java │ ├── LoginService.java │ ├── PaperService.java │ └── TeacherService.java └── resources ├── application.properties ├── mapper ├── AdminDaoMapper.xml ├── ChartDaoMapper.xml ├── ChoiceDaoMapper.xml ├── ClassDaoMapper.xml ├── EvaluateDaoMapper.xml ├── ExamDaoMapper.xml ├── JudgeDaoMapper.xml ├── PaperDaoMapper.xml ├── QuestionDaoMapper.xml ├── StudentDaoMapper.xml ├── SubjectDaoMapper.xml └── TeacherDaoMapper.xml ├── static ├── css │ ├── 1.css │ ├── aaa.css │ ├── all.css │ ├── bbb.css │ ├── bootstrap-responsive.css │ ├── bootstrap-responsive.min.css │ ├── bootstrap.css │ └── bootstrap.min.css └── images │ ├── add_emoticons.png │ ├── assd.png │ ├── background_1.png │ ├── backgroung_scut.png │ ├── btn.gif │ ├── btn01.gif │ ├── btn02.gif │ ├── btn03.gif │ ├── btn04.gif │ ├── btn05.gif │ ├── btn06.gif │ ├── btn07.gif │ ├── btn07g.gif │ ├── btn10.gif │ ├── btn11.gif │ ├── graybg.jpg │ ├── icon.png │ ├── login_1.png │ ├── login_icon.png │ ├── logout_1.png │ ├── option_correct.png │ ├── option_default.png │ ├── option_wrong.png │ ├── page.gif │ ├── page_be.gif │ ├── scut.png │ ├── talk_recordtext.png │ ├── talk_recordtextme.png │ ├── talk_send_btn.png │ └── three_choice2.png └── templates ├── _ ├── _adminpage.html ├── _index.html ├── _login.html ├── _logout.html ├── _student_exercise.html ├── _student_exercise_choice.html ├── _student_exercise_sub.html ├── _student_exercise_truefalse.html ├── _studentpage.html └── _teacherpage.html ├── admin ├── add_student.html ├── add_teacher.html ├── admin_info.html ├── adminpage.html ├── student_manage.html └── teacher_manage.html ├── change_info.html ├── error.html ├── excel ├── choice_template.xlsx ├── judge_template.xlsx ├── student_template.xlsx ├── sub_template.xlsx └── teacher_template.xlsx ├── login.html ├── logout.html ├── notlogin.html ├── notpermission.html ├── session.html ├── student ├── student_chart.html ├── student_evaluating_list_delete.html ├── student_evaluating_list_insert.html ├── student_evaluating_list_select.html ├── student_evaluating_list_update.html ├── student_evaluating_question.html ├── student_exercise.html ├── student_exercise_choice.html ├── student_exercise_sub.html ├── student_exercise_truefalse.html ├── student_grade.html ├── student_info.html ├── student_status.html ├── student_test.html ├── student_test_ing.html └── studentpage.html ├── teacher ├── choice_combine.html ├── judge_combine.html ├── other_config.html ├── pigai_test_ing.html ├── question_list.html ├── see_test_ing.html ├── student_chart.html ├── student_grade.html ├── student_grade_list.html ├── sub_combine.html ├── sub_list.html ├── teacher_info.html ├── teacher_test_list.html ├── teacherpage.html └── truefalse_list.html └── wrongpassword.html /.gitignore: -------------------------------------------------------------------------------- 1 | # 忽略生成的target 2 | target 3 | 4 | # 忽略idea的自动文件修改 5 | .idea/workspace.xml 6 | */vcs.xml 7 | .idea 8 | .idea/ 9 | .idea* 10 | .idea/* -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_classmate_1_3_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_8_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_8_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_8_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_github_axet_kaptcha_0_0_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_jhlabs_filters_2_0_235.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_validation_validation_api_1_1_0_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__junit_junit_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__mysql_mysql_connector_java_5_1_44.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_minidev_accessors_smart_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_minidev_json_smart_2_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__nz_net_ultraq_thymeleaf_thymeleaf_layout_dialect_1_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__ognl_ognl_3_0_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_8_5_23.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_8_5_23.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_8_5_23.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tomcat_tomcat_annotations_api_8_5_23.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tomcat_tomcat_jdbc_8_5_23.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tomcat_tomcat_juli_8_5_23.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_assertj_assertj_core_2_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_groovy_groovy_2_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hibernate_hibernate_validator_5_3_5_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_javassist_javassist_3_21_0_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_1_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mockito_mockito_core_1_10_19.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mybatis_mybatis_3_4_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mybatis_mybatis_spring_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_objenesis_objenesis_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_ow2_asm_asm_5_0_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_skyscreamer_jsonassert_1_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_25.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_25.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_log4j_over_slf4j_1_7_25.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_1_5_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_1_5_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_devtools_1_5_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_1_5_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_1_5_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_1_5_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_1_5_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_thymeleaf_1_5_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_1_5_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_1_5_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_test_1_5_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_1_5_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_aop_4_3_12_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_beans_4_3_12_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_context_4_3_12_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_core_4_3_12_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_expression_4_3_12_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_jdbc_4_3_12_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_test_4_3_12_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_tx_4_3_12_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_web_4_3_12_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_webmvc_4_3_12_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_thymeleaf_thymeleaf_2_1_5_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_thymeleaf_thymeleaf_spring4_2_1_5_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_unbescape_unbescape_1_1_0_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_yaml_snakeyaml_1_17.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 ACJ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.scut 8 | examination 9 | 1.0-SNAPSHOT 10 | 11 | 12 | org.springframework.boot 13 | spring-boot-starter-parent 14 | 1.5.8.RELEASE 15 | 16 | 17 | 18 | 1.8 19 | 1.8 20 | 21 | 22 | 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter-web 32 | 33 | 34 | 35 | org.springframework.boot 36 | spring-boot-starter-test 37 | test 38 | 39 | 40 | 41 | org.springframework.boot 42 | spring-boot-starter-thymeleaf 43 | 44 | 45 | 46 | org.springframework.boot 47 | spring-boot-devtools 48 | true 49 | 50 | 51 | 52 | mysql 53 | mysql-connector-java 54 | 55 | 56 | 57 | org.mybatis.spring.boot 58 | mybatis-spring-boot-starter 59 | 1.3.1 60 | 61 | 62 | 63 | com.github.axet 64 | kaptcha 65 | 0.0.9 66 | 67 | 68 | 69 | org.apache.poi 70 | poi-ooxml 71 | 3.16 72 | 73 | 74 | 75 | com.github.abel533 76 | ECharts 77 | 3.0.0.2 78 | 79 | 80 | 81 | com.google.code.gson 82 | gson 83 | 2.8.1 84 | 85 | 86 | 87 | 88 | 89 | 90 | org.apache.maven.plugins 91 | maven-compiler-plugin 92 | 93 | 1.8 94 | 1.8 95 | 96 | 97 | 98 | org.springframework.boot 99 | spring-boot-maven-plugin 100 | 101 | 102 | 103 | repackage 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /src/main/java/examination/ExaminationApplication.java: -------------------------------------------------------------------------------- 1 | package examination; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class ExaminationApplication { 8 | public static void main(String[] args) { 9 | SpringApplication.run(ExaminationApplication.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/examination/config/KaptchaConfig.java: -------------------------------------------------------------------------------- 1 | package examination.config; 2 | 3 | import com.google.code.kaptcha.impl.DefaultKaptcha; 4 | import com.google.code.kaptcha.util.Config; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | import java.util.Properties; 9 | 10 | @Configuration 11 | public class KaptchaConfig { 12 | @Bean 13 | public DefaultKaptcha getDefaultKaptcha(){ 14 | DefaultKaptcha captchaProducer =new DefaultKaptcha(); 15 | Properties properties =new Properties(); 16 | properties.setProperty("kaptcha.border","yes"); 17 | properties.setProperty("kaptcha.border.color","105,179,90"); 18 | properties.setProperty("kaptcha.textproducer.font.color","red"); 19 | properties.setProperty("kaptcha.image.width","125"); 20 | properties.setProperty("kaptcha.image.height","45"); 21 | properties.setProperty("kaptcha.textproducer.font.size","40"); 22 | properties.setProperty("kaptcha.session.key","code"); 23 | properties.setProperty("kaptcha.textproducer.char.length","4"); 24 | properties.setProperty("kaptcha.textproducer.font.names","宋体,楷体,微软雅黑"); 25 | Config config=new Config(properties); 26 | captchaProducer.setConfig(config); 27 | return captchaProducer; 28 | } 29 | } -------------------------------------------------------------------------------- /src/main/java/examination/config/MyWebAppConfigurer.java: -------------------------------------------------------------------------------- 1 | package examination.config; 2 | 3 | import examination.interceptor.*; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 6 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 7 | 8 | @Configuration 9 | public class MyWebAppConfigurer 10 | extends WebMvcConfigurerAdapter { 11 | 12 | @Override 13 | public void addInterceptors(InterceptorRegistry registry) { 14 | 15 | registry.addInterceptor(new CaptchaInterceptor()).addPathPatterns("/doLogin"); 16 | registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/**").excludePathPatterns("/login","/","/defaultKaptcha","/doLogin","/wrongpassword"); 17 | registry.addInterceptor(new StudentInterceptor()).addPathPatterns("/student/**"); 18 | registry.addInterceptor(new TeacherInterceptor()).addPathPatterns("/teacher/**"); 19 | registry.addInterceptor(new AdminInterceptor()).addPathPatterns("/admin/**"); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/examination/controller/CaptchaController.java: -------------------------------------------------------------------------------- 1 | package examination.controller; 2 | 3 | import com.google.code.kaptcha.Constants; 4 | import com.google.code.kaptcha.impl.DefaultKaptcha; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.servlet.ModelAndView; 9 | 10 | import javax.imageio.ImageIO; 11 | import javax.servlet.ServletOutputStream; 12 | import javax.servlet.http.HttpServletResponse; 13 | import javax.servlet.http.HttpSession; 14 | import java.awt.image.BufferedImage; 15 | 16 | @Controller 17 | public class CaptchaController { 18 | 19 | @Autowired 20 | DefaultKaptcha defaultKaptcha; 21 | 22 | @RequestMapping("/defaultKaptcha") 23 | public ModelAndView getKaptchaImage(HttpSession session, HttpServletResponse response) throws Exception { 24 | response.setDateHeader("Expires", 0); 25 | // Set standard HTTP/1.1 no-cache headers. 26 | response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate"); 27 | // Set IE extended HTTP/1.1 no-cache headers (use addHeader). 28 | response.addHeader("Cache-Control", "post-check=0, pre-check=0"); 29 | // Set standard HTTP/1.0 no-cache header. 30 | response.setHeader("Pragma", "no-cache"); 31 | // return a jpeg 32 | response.setContentType("image/jpeg"); 33 | // create the text for the image 34 | String capText = defaultKaptcha.createText(); 35 | // store the text in the session 36 | session.setAttribute(Constants.KAPTCHA_SESSION_KEY, capText); 37 | String code = (String)session.getAttribute(Constants.KAPTCHA_SESSION_KEY); 38 | System.out.println("******************验证码是: " + code + "******************"); 39 | // create the image with the text 40 | BufferedImage bi = defaultKaptcha.createImage(capText); 41 | ServletOutputStream out = response.getOutputStream(); 42 | 43 | // write the data out 44 | ImageIO.write(bi, "jpg", out); 45 | try { 46 | out.flush(); 47 | } finally { 48 | out.close(); 49 | } 50 | return null; 51 | } 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/examination/controller/LoginController.java: -------------------------------------------------------------------------------- 1 | package examination.controller; 2 | 3 | import examination.entity.User; 4 | import examination.service.LoginService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.ui.Model; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RequestMethod; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | import sun.misc.BASE64Encoder; 12 | 13 | import javax.servlet.http.HttpSession; 14 | import java.io.UnsupportedEncodingException; 15 | import java.security.MessageDigest; 16 | import java.security.NoSuchAlgorithmException; 17 | 18 | @Controller 19 | public class LoginController { 20 | 21 | @Autowired 22 | LoginService loginService; 23 | 24 | 25 | @ResponseBody 26 | @RequestMapping("/hello") 27 | public String hello() { 28 | return "Hello World"; 29 | } 30 | @RequestMapping("/change_info") 31 | public String changeInfo() { 32 | return "change_info"; 33 | } 34 | 35 | @RequestMapping(value = "/doLogin",method = RequestMethod.POST) 36 | @ResponseBody 37 | String doLogin(String account, String password,HttpSession httpSession) { 38 | User user = null; 39 | try{ 40 | user = loginService.doLogin(account, password); 41 | }catch (Exception e){ 42 | e.printStackTrace(); 43 | System.out.println("笨!你又忘开数据库了"); 44 | } 45 | 46 | if (null != user) { 47 | 48 | httpSession.setAttribute("userid", user.getId()); 49 | httpSession.setAttribute("name", user.getName()); 50 | httpSession.setAttribute("permission", user.getPermission()); 51 | 52 | String pageName = user.getPermission().toLowerCase(); 53 | return "/"+pageName; 54 | } 55 | return "wrongpassword"; 56 | } 57 | 58 | 59 | @RequestMapping(value = "/") 60 | String index() { 61 | return "redirect:/login"; 62 | } 63 | @RequestMapping(value = "/login") 64 | String login() { 65 | return "login"; 66 | } 67 | 68 | @RequestMapping(value = "/session") 69 | String session(Model model,HttpSession httpSession) { 70 | 71 | model.addAttribute("permission", httpSession); 72 | return "session"; 73 | } 74 | @RequestMapping(value = "/logout") 75 | String logout(Model model,HttpSession httpSession) { 76 | 77 | httpSession.removeAttribute("userid"); 78 | httpSession.removeAttribute("name"); 79 | httpSession.removeAttribute("permission"); 80 | 81 | return "logout"; 82 | } 83 | @RequestMapping(value = "/notpermission") 84 | String notlogin(Model model) { 85 | return "notpermission"; 86 | } 87 | 88 | @RequestMapping(value = "/wrongpassword") 89 | String wrongpassword(Model model) { 90 | return "wrongpassword"; 91 | } 92 | 93 | @RequestMapping("/change_info_submit") 94 | public String changeInfoSubmit(HttpSession httpSession,String name, String pw) { 95 | 96 | long uid = (long) httpSession.getAttribute("userid"); 97 | String s = (String) httpSession.getAttribute("permission"); 98 | 99 | loginService.chageInfo(uid,s,name,pw); 100 | String pageName = s.toLowerCase(); 101 | return "redirect:/"+pageName+"/"+pageName+"page"; 102 | } 103 | 104 | 105 | } 106 | -------------------------------------------------------------------------------- /src/main/java/examination/dao/AdminDao.java: -------------------------------------------------------------------------------- 1 | package examination.dao; 2 | 3 | import examination.entity.Admin; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | @Mapper 8 | public interface AdminDao { 9 | Admin findByLogin(@Param("account") String account, @Param("password") String password); 10 | 11 | void updateInfo( @Param("id")long id, @Param("name") String name,@Param("pw") String pw); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/examination/dao/ChartDao.java: -------------------------------------------------------------------------------- 1 | package examination.dao; 2 | 3 | import org.apache.ibatis.annotations.Mapper; 4 | 5 | import java.util.List; 6 | 7 | @Mapper 8 | public interface ChartDao { 9 | List getPaperName(long studentId); 10 | 11 | List getScore(long studentId); 12 | 13 | List getScoreByPId(long pId); 14 | } -------------------------------------------------------------------------------- /src/main/java/examination/dao/ChoiceDao.java: -------------------------------------------------------------------------------- 1 | package examination.dao; 2 | 3 | import examination.entity.ChoiceQuestion; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | @Mapper 10 | public interface ChoiceDao { 11 | int getCount(); 12 | 13 | List getChoiceQuestion(@Param("offset") int offset, @Param("limit") int limit); 14 | 15 | int delete(long id); 16 | 17 | int deleteByList(List ids); 18 | 19 | int update(ChoiceQuestion choiceQuestion); 20 | 21 | int addByList(List teachers); 22 | 23 | List queryAll(); 24 | } -------------------------------------------------------------------------------- /src/main/java/examination/dao/ClassDao.java: -------------------------------------------------------------------------------- 1 | package examination.dao; 2 | 3 | import org.apache.ibatis.annotations.Mapper; 4 | 5 | @Mapper 6 | public interface ClassDao { 7 | String getIdByName(String name); 8 | String getNameById(String id); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/examination/dao/EvaluateDao.java: -------------------------------------------------------------------------------- 1 | package examination.dao; 2 | 3 | import examination.entity.Status; 4 | import examination.entity.Teacher; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | @Mapper 12 | public interface EvaluateDao { 13 | 14 | long submit(Status status); 15 | 16 | long update(Status status); 17 | 18 | List getList(@Param("off") long off, @Param("n") long n); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/examination/dao/ExamDao.java: -------------------------------------------------------------------------------- 1 | package examination.dao; 2 | 3 | 4 | import examination.entity.Paper; 5 | import examination.entity.Record; 6 | import org.apache.ibatis.annotations.Mapper; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.List; 10 | import java.util.Map; 11 | 12 | @Mapper 13 | public interface ExamDao { 14 | Paper findPaperById(@Param("id") Long id); 15 | 16 | List listPaperByClass(@Param("classid") Long classid); 17 | 18 | List listGradeBySid(@Param("sid") Long sid); 19 | 20 | void submit(Record record); 21 | 22 | List listExamByTid(@Param("tid") long tid); 23 | 24 | List listStudentGrade(@Param("pid") long pid); 25 | 26 | void calcGrade(Record record); 27 | 28 | long paperTested(@Param("sid") Long sid,@Param("pid") Long pid); 29 | 30 | List listPaper(); 31 | 32 | Map getOnePaperRecord(@Param("pid") Long pid); 33 | 34 | Record getRecordBySidPid(@Param("sid") Long sid,@Param("pid") Long pid); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/examination/dao/JudgeDao.java: -------------------------------------------------------------------------------- 1 | package examination.dao; 2 | 3 | import examination.entity.JudgeQuestion; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | @Mapper 10 | public interface JudgeDao { 11 | int getCount(); 12 | 13 | List getJudgeQuestion(@Param("offset") int offset, @Param("limit") int limit); 14 | 15 | int delete(long id); 16 | 17 | int deleteByList(List ids); 18 | 19 | int update(JudgeQuestion judgeQuestion); 20 | 21 | int addByList(List teachers); 22 | 23 | List queryAll(); 24 | } -------------------------------------------------------------------------------- /src/main/java/examination/dao/PaperDao.java: -------------------------------------------------------------------------------- 1 | package examination.dao; 2 | 3 | 4 | import examination.entity.Paper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | @Mapper 8 | public interface PaperDao { 9 | int add(Paper paper); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/examination/dao/QuestionDao.java: -------------------------------------------------------------------------------- 1 | package examination.dao; 2 | 3 | 4 | import examination.entity.Question.Choicedba; 5 | import examination.entity.Question.Evadba; 6 | import examination.entity.Question.Judgedba; 7 | import examination.entity.Question.Subdba; 8 | import org.apache.ibatis.annotations.Mapper; 9 | import org.apache.ibatis.annotations.Param; 10 | 11 | import java.util.List; 12 | 13 | @Mapper 14 | public interface QuestionDao { 15 | Choicedba findChoicedbaById_Ans(@Param("id") Long id); 16 | Choicedba findChoicedbaById_noAns( @Param("id") Long id); 17 | 18 | 19 | Judgedba findJudgedbaById_Ans(@Param("id") Long id); 20 | Judgedba findJudgedbaById_noAns( @Param("id") Long id); 21 | 22 | Subdba findSubdbaById_Ans(@Param("id") Long id); 23 | Subdba findSubdbaById_noAns( @Param("id") Long id); 24 | 25 | Evadba findEvadbaById_Ans(@Param("id") Long id); 26 | Evadba findEvadbaById_noAns( @Param("id") Long id); 27 | 28 | List findEvadbaByType(@Param("type") String type); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/examination/dao/StudentDao.java: -------------------------------------------------------------------------------- 1 | package examination.dao; 2 | 3 | import examination.entity.Student; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | @Mapper 10 | public interface StudentDao { 11 | Student findByLogin(@Param("account") String account, @Param("password") String password); 12 | 13 | int add(Student student); 14 | 15 | Student findById(@Param("id") long id); 16 | 17 | int update(Student student); 18 | 19 | int delete(long id); 20 | 21 | int deleteByList(List ids); 22 | 23 | int addByList(List students); 24 | 25 | List queryAll(); 26 | 27 | int resetPassword(long id); 28 | 29 | void updateInfo(@Param("id")long id, @Param("name")String name, @Param("pw")String pw); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/examination/dao/SubjectDao.java: -------------------------------------------------------------------------------- 1 | package examination.dao; 2 | 3 | import examination.entity.SubjectQuestion; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | @Mapper 10 | public interface SubjectDao { 11 | int getCount(); 12 | 13 | List getSubjectQuestion(@Param("offset") int offset, @Param("limit") int limit); 14 | 15 | int delete(long id); 16 | 17 | int deleteByList(List ids); 18 | 19 | int update(SubjectQuestion subjectQuestion); 20 | 21 | int addByList(List teachers); 22 | 23 | List queryAll(); 24 | } -------------------------------------------------------------------------------- /src/main/java/examination/dao/TeacherDao.java: -------------------------------------------------------------------------------- 1 | package examination.dao; 2 | 3 | import examination.entity.Teacher; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | @Mapper 10 | public interface TeacherDao { 11 | Teacher findByLogin(@Param("account") String account, @Param("password") String password); 12 | 13 | int add(@Param("account") String account, @Param("name") String name); 14 | 15 | Teacher findById(@Param("id") long id); 16 | 17 | int update(Teacher teacher); 18 | 19 | int delete(long id); 20 | 21 | int deleteByList(List ids); 22 | 23 | int addByList(List teachers); 24 | 25 | List queryAll(); 26 | 27 | int resetPassword(long id); 28 | 29 | void updateInfo(@Param("id") long id,@Param("name") String name,@Param("pw") String pw); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/Admin.java: -------------------------------------------------------------------------------- 1 | package examination.entity; 2 | 3 | public class Admin extends User { 4 | long id; 5 | String account; 6 | String password; 7 | String name; 8 | 9 | final String permission = "Admin"; 10 | 11 | public long getId() { 12 | return id; 13 | } 14 | 15 | public void setId(long id) { 16 | this.id = id; 17 | } 18 | 19 | public String getAccount() { 20 | return account; 21 | } 22 | 23 | public void setAccount(String account) { 24 | this.account = account; 25 | } 26 | 27 | public String getPassword() { 28 | return password; 29 | } 30 | 31 | public void setPassword(String password) { 32 | this.password = password; 33 | } 34 | 35 | public String getName() { 36 | return name; 37 | } 38 | 39 | public void setName(String name) { 40 | this.name = name; 41 | } 42 | 43 | public String getPermission() { 44 | return permission; 45 | } 46 | 47 | @Override 48 | public String toString() { 49 | return "Admin{" + 50 | "id=" + id + 51 | ", account='" + account + '\'' + 52 | ", password='" + password + '\'' + 53 | ", name='" + name + '\'' + 54 | ", permission='" + permission + '\'' + 55 | '}'; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/ChoiceQuestion.java: -------------------------------------------------------------------------------- 1 | package examination.entity; 2 | 3 | public class ChoiceQuestion { 4 | long id; 5 | String question; 6 | String option1; 7 | String option2; 8 | String option3; 9 | String option4; 10 | String rightAnswer; 11 | byte secrecy; 12 | short chapters = 1; 13 | 14 | public ChoiceQuestion(String question, String option1, String option2, String option3, String option4, String rightAnswer) { 15 | this.question = question; 16 | this.option1 = option1; 17 | this.option2 = option2; 18 | this.option3 = option3; 19 | this.option4 = option4; 20 | this.rightAnswer = rightAnswer; 21 | } 22 | 23 | public ChoiceQuestion() { 24 | } 25 | 26 | public long getId() { 27 | return id; 28 | } 29 | 30 | public void setId(long id) { 31 | this.id = id; 32 | } 33 | 34 | public String getQuestion() { 35 | return question; 36 | } 37 | 38 | public void setQuestion(String question) { 39 | this.question = question; 40 | } 41 | 42 | public String getOption1() { 43 | return option1; 44 | } 45 | 46 | public void setOption1(String option1) { 47 | this.option1 = option1; 48 | } 49 | 50 | public String getOption2() { 51 | return option2; 52 | } 53 | 54 | public void setOption2(String option2) { 55 | this.option2 = option2; 56 | } 57 | 58 | public String getOption3() { 59 | return option3; 60 | } 61 | 62 | public void setOption3(String option3) { 63 | this.option3 = option3; 64 | } 65 | 66 | public String getOption4() { 67 | return option4; 68 | } 69 | 70 | public void setOption4(String option4) { 71 | this.option4 = option4; 72 | } 73 | 74 | public String getRightAnswer() { 75 | return rightAnswer; 76 | } 77 | 78 | public void setRightAnswer(String rightAnswer) { 79 | this.rightAnswer = rightAnswer; 80 | } 81 | 82 | public byte getSecrecy() { 83 | return secrecy; 84 | } 85 | 86 | public void setSecrecy(byte secrecy) { 87 | this.secrecy = secrecy; 88 | } 89 | 90 | public short getChapters() { 91 | return chapters; 92 | } 93 | 94 | public void setChapters(short chapters) { 95 | this.chapters = chapters; 96 | } 97 | 98 | @Override 99 | public String toString() { 100 | return "ChoiceQuestion{" + 101 | "id=" + id + 102 | ", question='" + question + '\'' + 103 | ", option1='" + option1 + '\'' + 104 | ", option2='" + option2 + '\'' + 105 | ", option3='" + option3 + '\'' + 106 | ", option4='" + option4 + '\'' + 107 | ", rightAnswer='" + rightAnswer + '\'' + 108 | ", secrecy=" + secrecy + 109 | ", chapters=" + chapters + 110 | '}'; 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/Class.java: -------------------------------------------------------------------------------- 1 | package examination.entity; 2 | 3 | public class Class { 4 | long classid; 5 | long teacherid; 6 | long classname; 7 | 8 | public long getClassid() { 9 | return classid; 10 | } 11 | 12 | public void setClassid(long classid) { 13 | this.classid = classid; 14 | } 15 | 16 | public long getTeacherid() { 17 | return teacherid; 18 | } 19 | 20 | public void setTeacherid(long teacherid) { 21 | this.teacherid = teacherid; 22 | } 23 | 24 | public long getClassname() { 25 | return classname; 26 | } 27 | 28 | public void setClassname(long classname) { 29 | this.classname = classname; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/JudgeQuestion.java: -------------------------------------------------------------------------------- 1 | package examination.entity; 2 | 3 | public class JudgeQuestion { 4 | long id; 5 | String question; 6 | String rightAnswer; 7 | byte secrecy; 8 | 9 | public JudgeQuestion() { 10 | } 11 | 12 | public JudgeQuestion(String question, String rightAnswer) { 13 | this.question = question; 14 | this.rightAnswer = rightAnswer; 15 | } 16 | 17 | public long getId() { 18 | return id; 19 | } 20 | 21 | public void setId(long id) { 22 | this.id = id; 23 | } 24 | 25 | public String getQuestion() { 26 | return question; 27 | } 28 | 29 | public void setQuestion(String question) { 30 | this.question = question; 31 | } 32 | 33 | public String getRightAnswer() { 34 | return rightAnswer; 35 | } 36 | 37 | public void setRightAnswer(String rightAnswer) { 38 | this.rightAnswer = rightAnswer; 39 | } 40 | 41 | public byte getSecrecy() { 42 | return secrecy; 43 | } 44 | 45 | public void setSecrecy(byte secrecy) { 46 | this.secrecy = secrecy; 47 | } 48 | 49 | @Override 50 | public String toString() { 51 | return "JudgeQuestion{" + 52 | "id=" + id + 53 | ", question='" + question + '\'' + 54 | ", rightAnswer='" + rightAnswer + '\'' + 55 | ", secrecy=" + secrecy + 56 | '}'; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/Page.java: -------------------------------------------------------------------------------- 1 | package examination.entity; 2 | 3 | 4 | public class Page { 5 | int pageNumber =7; 6 | int count; 7 | int currentPage =1; 8 | int totalPage; 9 | 10 | public int getPageNumber() { 11 | return pageNumber; 12 | } 13 | 14 | public void setPageNumber(int pageNumber) { 15 | this.pageNumber = pageNumber; 16 | } 17 | 18 | public int getCount() { 19 | return count; 20 | } 21 | 22 | public void setCount(int count) { 23 | this.count = count; 24 | } 25 | 26 | public int getCurrentPage() { 27 | return currentPage; 28 | } 29 | 30 | public void setCurrentPage(int currentPage) { 31 | this.currentPage = currentPage; 32 | } 33 | 34 | public int getTotalPage() { 35 | return totalPage; 36 | } 37 | 38 | public void setTotalPage(int totalPage) { 39 | this.totalPage = totalPage; 40 | } 41 | 42 | @Override 43 | public String toString() { 44 | return "Page{" + 45 | "pageNumber=" + pageNumber + 46 | ", count=" + count + 47 | ", currentPage=" + currentPage + 48 | ", totalPage=" + totalPage + 49 | '}'; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/Paper.java: -------------------------------------------------------------------------------- 1 | package examination.entity; 2 | 3 | public class Paper { 4 | private Long id; 5 | private String name; 6 | private String begintime; 7 | private String finishtime; 8 | private String choi; 9 | private String judg; 10 | private String sub; 11 | 12 | private String choiscore; 13 | private String judgscore; 14 | private String subscore; 15 | 16 | private long tid; 17 | private String classid; 18 | 19 | public Paper() { 20 | } 21 | 22 | public Paper(String name, String begintime, String finishtime, String choi, String judg, String sub, String choiscore, String judgscore, String subscore, long tid, String classid) { 23 | this.name = name; 24 | this.begintime = begintime; 25 | this.finishtime = finishtime; 26 | this.choi = choi; 27 | this.judg = judg; 28 | this.sub = sub; 29 | this.choiscore = choiscore; 30 | this.judgscore = judgscore; 31 | this.subscore = subscore; 32 | this.tid = tid; 33 | this.classid = classid; 34 | } 35 | 36 | public Long getId() { 37 | return id; 38 | } 39 | 40 | public void setId(Long id) { 41 | this.id = id; 42 | } 43 | 44 | public String getName() { 45 | return name; 46 | } 47 | 48 | public void setName(String name) { 49 | this.name = name; 50 | } 51 | 52 | public String getBegintime() { 53 | return begintime; 54 | } 55 | 56 | public void setBegintime(String begintime) { 57 | this.begintime = begintime; 58 | } 59 | 60 | public String getFinishtime() { 61 | return finishtime; 62 | } 63 | 64 | public void setFinishtime(String finishtime) { 65 | this.finishtime = finishtime; 66 | } 67 | 68 | public String getChoi() { 69 | return choi; 70 | } 71 | 72 | public void setChoi(String choi) { 73 | this.choi = choi; 74 | } 75 | 76 | public String getJudg() { 77 | return judg; 78 | } 79 | 80 | public void setJudg(String judg) { 81 | this.judg = judg; 82 | } 83 | 84 | public String getSub() { 85 | return sub; 86 | } 87 | 88 | public void setSub(String sub) { 89 | this.sub = sub; 90 | } 91 | 92 | public long getTid() { 93 | return tid; 94 | } 95 | 96 | public void setTid(long tid) { 97 | this.tid = tid; 98 | } 99 | 100 | public String getClassid() { 101 | return classid; 102 | } 103 | 104 | public void setClassid(String classid) { 105 | this.classid = classid; 106 | } 107 | 108 | public String getChoiscore() { 109 | return choiscore; 110 | } 111 | 112 | public void setChoiscore(String choiscore) { 113 | this.choiscore = choiscore; 114 | } 115 | 116 | public String getJudgscore() { 117 | return judgscore; 118 | } 119 | 120 | public void setJudgscore(String judgscore) { 121 | this.judgscore = judgscore; 122 | } 123 | 124 | public String getSubscore() { 125 | return subscore; 126 | } 127 | 128 | public void setSubscore(String subscore) { 129 | this.subscore = subscore; 130 | } 131 | 132 | @Override 133 | public String toString() { 134 | return "Paper{" + 135 | "id=" + id + 136 | ", name='" + name + '\'' + 137 | ", begintime='" + begintime + '\'' + 138 | ", finishtime='" + finishtime + '\'' + 139 | ", choi='" + choi + '\'' + 140 | ", judg='" + judg + '\'' + 141 | ", sub='" + sub + '\'' + 142 | ", choiscore='" + choiscore + '\'' + 143 | ", judgscore='" + judgscore + '\'' + 144 | ", subscore='" + subscore + '\'' + 145 | ", tid=" + tid + 146 | ", classid='" + classid + '\'' + 147 | '}'; 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/Question/Choicedba.java: -------------------------------------------------------------------------------- 1 | package examination.entity.Question; 2 | 3 | public class Choicedba { 4 | private Long id; 5 | private String question; 6 | private String option1; 7 | private String option2; 8 | private String option3; 9 | private String option4; 10 | private String rightanswer; 11 | 12 | public Long getId() { 13 | return id; 14 | } 15 | 16 | public void setId(Long id) { 17 | this.id = id; 18 | } 19 | 20 | public String getQuestion() { 21 | return question; 22 | } 23 | 24 | public void setQuestion(String question) { 25 | this.question = question; 26 | } 27 | 28 | 29 | public String getOption1() { 30 | return option1; 31 | } 32 | 33 | public void setOption1(String option1) { 34 | this.option1 = option1; 35 | } 36 | 37 | public String getOption2() { 38 | return option2; 39 | } 40 | 41 | public void setOption2(String option2) { 42 | this.option2 = option2; 43 | } 44 | 45 | public String getOption3() { 46 | return option3; 47 | } 48 | 49 | public void setOption3(String option3) { 50 | this.option3 = option3; 51 | } 52 | 53 | public String getOption4() { 54 | return option4; 55 | } 56 | 57 | public void setOption4(String option4) { 58 | this.option4 = option4; 59 | } 60 | 61 | public String getRightanswer() { 62 | return rightanswer; 63 | } 64 | 65 | public void setRightanswer(String rightanswer) { 66 | this.rightanswer = rightanswer; 67 | } 68 | 69 | @Override 70 | public String toString() { 71 | return "Choicedba{" + 72 | "id=" + id + 73 | ", question='" + question + '\'' + 74 | ", option1='" + option1 + '\'' + 75 | ", option2='" + option2 + '\'' + 76 | ", option3='" + option3 + '\'' + 77 | ", option4='" + option4 + '\'' + 78 | ", rightanswer='" + rightanswer + '\'' + 79 | '}'; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/Question/Evadba.java: -------------------------------------------------------------------------------- 1 | package examination.entity.Question; 2 | 3 | public class Evadba { 4 | private Long id; 5 | private String question; 6 | private String type; 7 | private String intable; 8 | private String rightanswer; 9 | private String title; 10 | 11 | public String getTitle() { 12 | return title; 13 | } 14 | 15 | public void setTitle(String title) { 16 | this.title = title; 17 | } 18 | 19 | public Long getId() { 20 | return id; 21 | } 22 | 23 | public void setId(Long id) { 24 | this.id = id; 25 | } 26 | 27 | public String getQuestion() { 28 | return question; 29 | } 30 | 31 | public void setQuestion(String question) { 32 | this.question = question; 33 | } 34 | 35 | public String getType() { 36 | return type; 37 | } 38 | 39 | public void setType(String type) { 40 | this.type = type; 41 | } 42 | 43 | public String getIntable() { 44 | return intable; 45 | } 46 | 47 | public void setIntable(String intable) { 48 | this.intable = intable; 49 | } 50 | 51 | public String getRightanswer() { 52 | return rightanswer; 53 | } 54 | 55 | public void setRightanswer(String rightanswer) { 56 | this.rightanswer = rightanswer; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/Question/Judgedba.java: -------------------------------------------------------------------------------- 1 | package examination.entity.Question; 2 | 3 | public class Judgedba { 4 | private Long id; 5 | private String question; 6 | private String rightanswer; 7 | 8 | public Long getId() { 9 | return id; 10 | } 11 | 12 | public void setId(Long id) { 13 | this.id = id; 14 | } 15 | 16 | public String getQuestion() { 17 | return question; 18 | } 19 | 20 | public void setQuestion(String question) { 21 | this.question = question; 22 | } 23 | 24 | public String getRightanswer() { 25 | return rightanswer; 26 | } 27 | 28 | public void setRightanswer(String rightanswer) { 29 | this.rightanswer = rightanswer; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "Judgedba{" + 35 | "id=" + id + 36 | ", question='" + question + '\'' + 37 | ", rightanswer='" + rightanswer + '\'' + 38 | '}'; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/Question/Subdba.java: -------------------------------------------------------------------------------- 1 | package examination.entity.Question; 2 | 3 | public class Subdba { 4 | private Long id; 5 | private String question; 6 | private String refanswer; 7 | 8 | public Long getId() { 9 | return id; 10 | } 11 | 12 | public void setId(Long id) { 13 | this.id = id; 14 | } 15 | 16 | public String getQuestion() { 17 | return question; 18 | } 19 | 20 | public void setQuestion(String question) { 21 | this.question = question; 22 | } 23 | 24 | public String getRefanswer() { 25 | return refanswer; 26 | } 27 | 28 | public void setRefanswer(String refanswer) { 29 | this.refanswer = refanswer; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "Subdba{" + 35 | "id=" + id + 36 | ", question='" + question + '\'' + 37 | ", refanswer='" + refanswer + '\'' + 38 | '}'; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/Record.java: -------------------------------------------------------------------------------- 1 | package examination.entity; 2 | 3 | public class Record { 4 | long sid; 5 | long pid; 6 | String record; 7 | String status; 8 | long score; 9 | 10 | public long getSid() { 11 | return sid; 12 | } 13 | 14 | public void setSid(long sid) { 15 | this.sid = sid; 16 | } 17 | 18 | public long getPid() { 19 | return pid; 20 | } 21 | 22 | public void setPid(long pid) { 23 | this.pid = pid; 24 | } 25 | 26 | public String getRecord() { 27 | return record; 28 | } 29 | 30 | public void setRecord(String record) { 31 | this.record = record; 32 | } 33 | 34 | public String getStatus() { 35 | return status; 36 | } 37 | 38 | public void setStatus(String status) { 39 | this.status = status; 40 | } 41 | 42 | public long getScore() { 43 | return score; 44 | } 45 | 46 | public void setScore(long score) { 47 | this.score = score; 48 | } 49 | 50 | @Override 51 | public String toString() { 52 | return "Record{" + 53 | "sid=" + sid + 54 | ", pid=" + pid + 55 | ", record='" + record + '\'' + 56 | ", status='" + status + '\'' + 57 | ", score=" + score + 58 | '}'; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/Status.java: -------------------------------------------------------------------------------- 1 | package examination.entity; 2 | 3 | public class Status { 4 | long runid; 5 | long eid; 6 | long uid; 7 | String time; 8 | String sql2; 9 | String status; 10 | 11 | public long getRunid() { 12 | return runid; 13 | } 14 | 15 | public void setRunid(long runid) { 16 | this.runid = runid; 17 | } 18 | 19 | public long getEid() { 20 | return eid; 21 | } 22 | 23 | public void setEid(long eid) { 24 | this.eid = eid; 25 | } 26 | 27 | public long getUid() { 28 | return uid; 29 | } 30 | 31 | public void setUid(long uid) { 32 | this.uid = uid; 33 | } 34 | 35 | public String getTime() { 36 | return time; 37 | } 38 | 39 | public void setTime(String time) { 40 | this.time = time; 41 | } 42 | 43 | public String getStatus() { 44 | return status; 45 | } 46 | 47 | public void setStatus(String status) { 48 | this.status = status; 49 | } 50 | 51 | public String getSql2() { 52 | return sql2; 53 | } 54 | 55 | public void setSql2(String sql2) { 56 | this.sql2 = sql2; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/Student.java: -------------------------------------------------------------------------------- 1 | package examination.entity; 2 | 3 | public class Student extends User { 4 | long id; 5 | String account; 6 | String name; 7 | String sex; 8 | String password="123456"; 9 | String classid; 10 | 11 | public Student() { 12 | } 13 | 14 | public Student(String account, String name, String classid) { 15 | this.account = account; 16 | this.name = name; 17 | this.classid = classid; 18 | } 19 | 20 | public String getSex() { 21 | return sex; 22 | } 23 | 24 | public void setSex(String sex) { 25 | this.sex = sex; 26 | } 27 | 28 | public String getClassid() { 29 | return classid; 30 | } 31 | 32 | public void setClassid(String classid) { 33 | this.classid = classid; 34 | } 35 | 36 | final String permission = "Student"; 37 | 38 | public long getId() { 39 | return id; 40 | } 41 | 42 | public void setId(long id) { 43 | this.id = id; 44 | } 45 | 46 | public String getAccount() { 47 | return account; 48 | } 49 | 50 | public void setAccount(String account) { 51 | this.account = account; 52 | } 53 | 54 | public String getPassword() { 55 | return password; 56 | } 57 | 58 | public void setPassword(String password) { 59 | this.password = password; 60 | } 61 | 62 | public String getName() { 63 | return name; 64 | } 65 | 66 | public void setName(String name) { 67 | this.name = name; 68 | } 69 | 70 | public String getPermission() { 71 | return permission; 72 | } 73 | 74 | @Override 75 | public String toString() { 76 | return "Student{" + 77 | "id=" + id + 78 | ", account='" + account + '\'' + 79 | ", name='" + name + '\'' + 80 | ", sex='" + sex + '\'' + 81 | ", password='" + password + '\'' + 82 | ", classid='" + classid + '\'' + 83 | ", permission='" + permission + '\'' + 84 | '}'; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/SubjectQuestion.java: -------------------------------------------------------------------------------- 1 | package examination.entity; 2 | 3 | public class SubjectQuestion { 4 | long id; 5 | String question; 6 | String refAnswer; 7 | byte secrecy; 8 | 9 | public SubjectQuestion() { 10 | } 11 | 12 | public SubjectQuestion(String question, String refAnswer) { 13 | this.question = question; 14 | this.refAnswer = refAnswer; 15 | } 16 | 17 | public long getId() { 18 | return id; 19 | } 20 | 21 | public void setId(long id) { 22 | this.id = id; 23 | } 24 | 25 | public String getQuestion() { 26 | return question; 27 | } 28 | 29 | public void setQuestion(String question) { 30 | this.question = question; 31 | } 32 | 33 | public String getRefAnswer() { 34 | return refAnswer; 35 | } 36 | 37 | public void setRefAnswer(String rightAnswer) { 38 | this.refAnswer = rightAnswer; 39 | } 40 | 41 | public byte getSecrecy() { 42 | return secrecy; 43 | } 44 | 45 | public void setSecrecy(byte secrecy) { 46 | this.secrecy = secrecy; 47 | } 48 | 49 | @Override 50 | public String toString() { 51 | return "JudgeQuestion{" + 52 | "id=" + id + 53 | ", question='" + question + '\'' + 54 | ", rightAnswer='" + refAnswer + '\'' + 55 | ", secrecy=" + secrecy + 56 | '}'; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/Teacher.java: -------------------------------------------------------------------------------- 1 | package examination.entity; 2 | 3 | public class Teacher extends User { 4 | long id; 5 | String account; 6 | String password="123456"; 7 | String name; 8 | final String permission = "Teacher"; 9 | 10 | public Teacher(){} 11 | public Teacher(String account, String name) { 12 | this.account = account; 13 | this.name = name; 14 | } 15 | 16 | public long getId() { 17 | return id; 18 | } 19 | 20 | public void setId(long id) { 21 | this.id = id; 22 | } 23 | 24 | public String getAccount() { 25 | return account; 26 | } 27 | 28 | public void setAccount(String account) { 29 | this.account = account; 30 | } 31 | 32 | public String getPassword() { 33 | return password; 34 | } 35 | 36 | public void setPassword(String password) { 37 | this.password = password; 38 | } 39 | 40 | public String getName() { 41 | return name; 42 | } 43 | 44 | public void setName(String name) { 45 | this.name = name; 46 | } 47 | 48 | public String getPermission() { 49 | return permission; 50 | } 51 | 52 | @Override 53 | public String toString() { 54 | return "Student{" + 55 | "id=" + id + 56 | ", account='" + account + '\'' + 57 | ", password='" + password + '\'' + 58 | ", name='" + name + '\'' + 59 | '}'; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/examination/entity/User.java: -------------------------------------------------------------------------------- 1 | package examination.entity; 2 | 3 | public class User { 4 | long id; 5 | String account; 6 | String password; 7 | String name; 8 | String permission = "User"; 9 | 10 | public long getId() { 11 | return id; 12 | } 13 | 14 | public void setId(long id) { 15 | this.id = id; 16 | } 17 | 18 | public String getAccount() { 19 | return account; 20 | } 21 | 22 | public void setAccount(String account) { 23 | this.account = account; 24 | } 25 | 26 | public String getPassword() { 27 | return password; 28 | } 29 | 30 | public void setPassword(String password) { 31 | this.password = password; 32 | } 33 | 34 | public String getName() { 35 | return name; 36 | } 37 | 38 | public void setName(String name) { 39 | this.name = name; 40 | } 41 | 42 | public String getPermission() { 43 | return permission; 44 | } 45 | 46 | @Override 47 | public String toString() { 48 | return "User{" + 49 | "id=" + id + 50 | ", account='" + account + '\'' + 51 | ", password='" + password + '\'' + 52 | ", name='" + name + '\'' + 53 | ", permission='" + permission + '\'' + 54 | '}'; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/examination/interceptor/AdminInterceptor.java: -------------------------------------------------------------------------------- 1 | package examination.interceptor; 2 | 3 | import org.springframework.web.servlet.HandlerInterceptor; 4 | import org.springframework.web.servlet.ModelAndView; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import javax.servlet.http.HttpSession; 9 | 10 | public class AdminInterceptor implements HandlerInterceptor { 11 | @Override 12 | public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception { 13 | System.out.println("enter in AdminInterceptor"); 14 | HttpSession session = httpServletRequest.getSession(); 15 | if ( !"Admin".equals(session.getAttribute("permission"))) { 16 | httpServletResponse.sendRedirect("/notpermission"); 17 | return false; 18 | } 19 | return true; 20 | 21 | } 22 | 23 | @Override 24 | public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception { 25 | 26 | } 27 | 28 | @Override 29 | public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception { 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/examination/interceptor/CaptchaInterceptor.java: -------------------------------------------------------------------------------- 1 | package examination.interceptor; 2 | 3 | import com.google.code.kaptcha.Constants; 4 | import org.springframework.web.servlet.HandlerInterceptor; 5 | import org.springframework.web.servlet.ModelAndView; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | import java.io.PrintWriter; 10 | 11 | public class CaptchaInterceptor implements HandlerInterceptor { 12 | 13 | @Override 14 | public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception { 15 | String captchaId = (String) httpServletRequest.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY); 16 | String parameter = httpServletRequest.getParameter("verifyCode"); 17 | System.out.println("Session verifyCode " + captchaId + " form verifyCode " + parameter); 18 | 19 | if (httpServletRequest.getHeader("x-requested-with") != null && httpServletRequest.getHeader("x-requested-with").equalsIgnoreCase("XMLHttpRequest")) { 20 | if (captchaId!=null && !captchaId.equals(parameter)) { 21 | PrintWriter out = httpServletResponse.getWriter(); 22 | out.print("verifyCodeError");//session失效 23 | out.flush(); 24 | return false; 25 | } 26 | return true; 27 | } 28 | return false; 29 | } 30 | 31 | @Override 32 | public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception { 33 | 34 | } 35 | 36 | @Override 37 | public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception { 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/examination/interceptor/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package examination.interceptor; 2 | 3 | import org.springframework.web.servlet.HandlerInterceptor; 4 | import org.springframework.web.servlet.ModelAndView; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import javax.servlet.http.HttpSession; 9 | 10 | public class LoginInterceptor implements HandlerInterceptor { 11 | @Override 12 | public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception { 13 | // System.out.println("enter in LoginInterceptor"); 14 | HttpSession session = httpServletRequest.getSession(); 15 | if (session.getAttribute("permission") == null) { 16 | httpServletResponse.sendRedirect("/login"); 17 | return false; 18 | } 19 | return true; 20 | } 21 | 22 | @Override 23 | public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception { 24 | 25 | } 26 | 27 | @Override 28 | public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception { 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/examination/interceptor/StudentInterceptor.java: -------------------------------------------------------------------------------- 1 | package examination.interceptor; 2 | 3 | import org.springframework.web.servlet.HandlerInterceptor; 4 | import org.springframework.web.servlet.ModelAndView; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import javax.servlet.http.HttpSession; 9 | 10 | public class StudentInterceptor implements HandlerInterceptor { 11 | @Override 12 | public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception { 13 | // System.out.println("enter in StudentInterceptor"); 14 | HttpSession session = httpServletRequest.getSession(); 15 | if ( !"Student" .equals(session.getAttribute("permission")) ) { 16 | httpServletResponse.sendRedirect("/notpermission"); 17 | return false; 18 | } 19 | return true; 20 | 21 | } 22 | 23 | @Override 24 | public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception { 25 | 26 | } 27 | 28 | @Override 29 | public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception { 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/examination/interceptor/TeacherInterceptor.java: -------------------------------------------------------------------------------- 1 | package examination.interceptor; 2 | 3 | import org.springframework.web.servlet.HandlerInterceptor; 4 | import org.springframework.web.servlet.ModelAndView; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import javax.servlet.http.HttpSession; 9 | 10 | public class TeacherInterceptor implements HandlerInterceptor { 11 | @Override 12 | public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception { 13 | System.out.println("enter in TeacherInterceptor"); 14 | HttpSession session = httpServletRequest.getSession(); 15 | if ( !"Teacher".equals(session.getAttribute("permission"))) { 16 | httpServletResponse.sendRedirect("/notpermission"); 17 | return false; 18 | } 19 | return true; 20 | 21 | } 22 | 23 | @Override 24 | public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception { 25 | 26 | } 27 | 28 | @Override 29 | public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception { 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/examination/service/ChartService.java: -------------------------------------------------------------------------------- 1 | package examination.service; 2 | 3 | import com.github.abel533.echarts.Grid; 4 | import com.github.abel533.echarts.axis.CategoryAxis; 5 | import com.github.abel533.echarts.axis.ValueAxis; 6 | import com.github.abel533.echarts.code.Trigger; 7 | import com.github.abel533.echarts.feature.Feature; 8 | import com.github.abel533.echarts.json.GsonOption; 9 | import com.github.abel533.echarts.series.Line; 10 | import com.github.abel533.echarts.series.MarkLine; 11 | import com.github.abel533.echarts.series.MarkPoint; 12 | import examination.dao.ChartDao; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.stereotype.Service; 15 | 16 | import java.util.ArrayList; 17 | import java.util.List; 18 | 19 | class Data { 20 | 21 | String type; 22 | String name; 23 | 24 | public Data(String type, String name) { 25 | this.type = type; 26 | this.name = name; 27 | } 28 | } 29 | 30 | @Service 31 | public class ChartService { 32 | @Autowired 33 | ChartDao chartDao; 34 | public String studentGetChart(long studentId) { 35 | List name = chartDao.getPaperName(studentId) ; 36 | List data = chartDao.getScore(studentId) ; 37 | List reformatName = new ArrayList(); 38 | 39 | name.forEach((item -> reformatName.add(String.join("\n", item.split(""))))); 40 | GsonOption option = new GsonOption(); 41 | Grid grid = new Grid(); 42 | grid.setY2("30%"); 43 | option.title("成绩图").tooltip(Trigger.item).grid(grid).toolbox().feature(Feature.saveAsImage); 44 | 45 | CategoryAxis categoryAxis = new CategoryAxis(); 46 | categoryAxis.setBoundaryGap(false); 47 | categoryAxis.setData(reformatName); 48 | option.xAxis(categoryAxis); 49 | option.yAxis(new ValueAxis()); 50 | 51 | Line line = new Line(); 52 | line.setData(data); 53 | line.markPoint(new MarkPoint().data(new Data("max","最高分"),new Data("min","最低分"))); 54 | line.markLine(new MarkLine().data(new Data("average","平均分"))); 55 | 56 | option.series(line); 57 | return option.toPrettyString(); 58 | } 59 | 60 | public String teacherGetChart(long pid,String name1) { 61 | 62 | List data = chartDao.getScoreByPId(pid) ; 63 | List name = new ArrayList(); 64 | GsonOption option = new GsonOption(); 65 | 66 | option.title(name1).tooltip(Trigger.item).toolbox().feature(Feature.saveAsImage); 67 | 68 | CategoryAxis categoryAxis = new CategoryAxis(); 69 | categoryAxis.setBoundaryGap(false); 70 | categoryAxis.setData(name); 71 | option.xAxis(categoryAxis); 72 | option.yAxis(new ValueAxis()); 73 | 74 | Line line = new Line(); 75 | line.setData(data); 76 | line.markPoint(new MarkPoint().data(new Data("max","最高分"),new Data("min","最低分"))); 77 | line.markLine(new MarkLine().data(new Data("average","平均分"))); 78 | 79 | option.series(line); 80 | return option.toPrettyString(); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/examination/service/EvaluatingService.java: -------------------------------------------------------------------------------- 1 | package examination.service; 2 | 3 | import examination.dao.EvaluateDao; 4 | import examination.dao.ExamDao; 5 | import examination.dao.QuestionDao; 6 | import examination.entity.Paper; 7 | import examination.entity.Question.Evadba; 8 | import examination.entity.Status; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Service; 11 | 12 | import java.sql.SQLException; 13 | import java.util.List; 14 | import java.util.Map; 15 | 16 | @Service 17 | public class EvaluatingService { 18 | 19 | @Autowired 20 | EvaluateDao evaluateDao; 21 | @Autowired 22 | QuestionDao questionDao; 23 | @Autowired 24 | CompareSQLService compareSQLService; 25 | 26 | 27 | public void EvaluateSQL (Long uid, Long eid,String sql2){ 28 | System.out.println("执行评测服务"); 29 | 30 | Status status = new Status(); 31 | status.setUid(uid); 32 | status.setEid(eid); 33 | status.setSql2(sql2); 34 | evaluateDao.submit(status); 35 | 36 | Evadba evadba = questionDao.findEvadbaById_Ans(eid); 37 | String sql1 = evadba.getRightanswer(); 38 | String type = evadba.getType(); 39 | String[] tables = evadba.getIntable().split(","); 40 | String result ; 41 | 42 | System.out.println(type); 43 | try{ 44 | Boolean bool; 45 | if (type.equals("查找题")){ 46 | bool = compareSQLService.compareRS(sql1,sql2); 47 | }else{ 48 | bool = compareSQLService.compareChange(tables,sql1,sql2); 49 | } 50 | result = bool ? "答案正确,你真棒!": "答案错误,你真笨!"; 51 | 52 | } catch (SQLException e) { 53 | System.out.println(e.getMessage()); 54 | result = "SQL语句出错:"+e.getMessage(); 55 | } 56 | status.setStatus(result); 57 | evaluateDao.update(status); 58 | } 59 | 60 | public List get_Status(long off, long n){ 61 | return evaluateDao.getList(off, n); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/examination/service/ExerciseService.java: -------------------------------------------------------------------------------- 1 | package examination.service; 2 | 3 | import examination.dao.QuestionDao; 4 | import examination.entity.Question.Choicedba; 5 | import examination.entity.Question.Evadba; 6 | import examination.entity.Question.Judgedba; 7 | import examination.entity.Question.Subdba; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.List; 12 | 13 | @Service 14 | public class ExerciseService { 15 | @Autowired 16 | QuestionDao questionDao; 17 | 18 | public Choicedba getChoicedbaById_Ans (Long id){ 19 | return questionDao.findChoicedbaById_Ans(id); 20 | } 21 | 22 | public Choicedba getChoicedbaById_noAns (Long id){ 23 | return questionDao.findChoicedbaById_noAns(id); 24 | } 25 | 26 | public Judgedba getJudgedbaById_Ans (Long id){ 27 | return questionDao.findJudgedbaById_Ans(id); 28 | } 29 | 30 | public Judgedba getJudgedbaById_noAns (Long id){ 31 | return questionDao.findJudgedbaById_noAns(id); 32 | } 33 | 34 | public Subdba getSubdbaById_Ans (Long id){ 35 | return questionDao.findSubdbaById_Ans(id); 36 | } 37 | 38 | public Subdba getSubdbaById_noAns (Long id){ 39 | return questionDao.findSubdbaById_noAns(id); 40 | } 41 | 42 | public Evadba getEvadbaById_Ans (Long id){ 43 | return questionDao.findEvadbaById_Ans(id); 44 | } 45 | 46 | public Evadba getEvadbaById_noAns (Long id){ 47 | return questionDao.findEvadbaById_noAns(id); 48 | } 49 | 50 | public List getEvadbaByType (String type){ 51 | return questionDao.findEvadbaByType(type); 52 | } 53 | 54 | 55 | 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/examination/service/LoginService.java: -------------------------------------------------------------------------------- 1 | package examination.service; 2 | 3 | import examination.dao.AdminDao; 4 | import examination.dao.StudentDao; 5 | import examination.dao.TeacherDao; 6 | import examination.entity.Admin; 7 | import examination.entity.Student; 8 | import examination.entity.Teacher; 9 | import examination.entity.User; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | import sun.misc.BASE64Encoder; 13 | 14 | import java.security.MessageDigest; 15 | 16 | @Service 17 | public class LoginService { 18 | @Autowired 19 | StudentDao studentDao; 20 | @Autowired 21 | TeacherDao teacherDao; 22 | @Autowired 23 | AdminDao adminDao; 24 | 25 | public User doLogin(String account, String password){ 26 | password = EncoderByMd5(password); 27 | Student student=studentDao.findByLogin(account,password); 28 | if (student != null){ 29 | return student; 30 | } 31 | Teacher teacher=teacherDao.findByLogin(account,password); 32 | if (teacher != null){ 33 | return teacher; 34 | } 35 | Admin admin=adminDao.findByLogin(account,password); 36 | if (admin != null){ 37 | return admin; 38 | } 39 | 40 | return null; 41 | } 42 | 43 | public void chageInfo(long uid, String s, String name, String pw) { 44 | pw = EncoderByMd5(pw); 45 | System.out.println(s); 46 | if (s.equals("Teacher")){ 47 | System.out.println("Teacher change pswd"); 48 | teacherDao.updateInfo(uid,name,pw); 49 | }else if(s.equals("Admin")){ 50 | System.out.println("Admin change pswd"); 51 | adminDao.updateInfo(uid,name,pw); 52 | }else { 53 | System.out.println("Student change pswd"); 54 | studentDao.updateInfo(uid,name,pw); 55 | } 56 | } 57 | /**利用MD5进行加密 58 | * @param str 待加密的字符串 59 | * @return 加密后的字符串 60 | */ 61 | public String EncoderByMd5(String str) { 62 | //确定计算方法 63 | try { 64 | MessageDigest md5=MessageDigest.getInstance("MD5"); 65 | BASE64Encoder base64en = new BASE64Encoder(); 66 | //加密后的字符串 67 | String newstr=base64en.encode(md5.digest(str.getBytes("utf-8"))); 68 | return newstr; 69 | }catch (Exception e){ 70 | e.printStackTrace(); 71 | return null; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/examination/service/PaperService.java: -------------------------------------------------------------------------------- 1 | package examination.service; 2 | 3 | import examination.dao.*; 4 | import examination.entity.*; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import java.util.List; 9 | 10 | @Service 11 | public class PaperService { 12 | 13 | @Autowired 14 | ChoiceDao choiceDao; 15 | @Autowired 16 | JudgeDao judgeDao; 17 | @Autowired 18 | SubjectDao subjectDao; 19 | @Autowired 20 | PaperDao paperDao; 21 | 22 | @Autowired 23 | ClassDao classDao; 24 | 25 | Page page = new Page(); 26 | 27 | public Page getPage(String cp, String type) { 28 | page = new Page(); 29 | int pageNumber = page.getPageNumber(); 30 | int currentPage = cp != null ? Integer.parseInt(cp) : 1; 31 | int count=0; 32 | if ("choice".equals(type)) 33 | count = choiceDao.getCount(); 34 | else if ("judge".equals(type)) 35 | count = judgeDao.getCount(); 36 | else if ("sub".equals(type)) 37 | count = subjectDao.getCount(); 38 | int totalPage = count % pageNumber == 0 ? count / pageNumber : count / pageNumber + 1; 39 | 40 | page.setCount(count); 41 | page.setCurrentPage(currentPage); 42 | page.setTotalPage(totalPage); 43 | return page; 44 | } 45 | 46 | public List getChoiceQuestion() { 47 | int currentPage = page.getCurrentPage(); 48 | int pageNumber = page.getPageNumber(); 49 | return choiceDao.getChoiceQuestion((currentPage - 1) * pageNumber, pageNumber); 50 | } 51 | 52 | public List getJudgeQuestion() { 53 | int currentPage = page.getCurrentPage(); 54 | int pageNumber = page.getPageNumber(); 55 | return judgeDao.getJudgeQuestion((currentPage - 1) * pageNumber, pageNumber); 56 | } 57 | 58 | public List getSubjectQuestion() { 59 | int currentPage = page.getCurrentPage(); 60 | int pageNumber = page.getPageNumber(); 61 | return subjectDao.getSubjectQuestion((currentPage - 1) * pageNumber, pageNumber); 62 | } 63 | 64 | public int addPaper(Paper paper) { 65 | String classId = "[|"+classDao.getIdByName(paper.getClassid())+"|]"; 66 | paper.setClassid(classId); 67 | return paperDao.add(paper); 68 | } 69 | 70 | public List getAllSubjectQuestion() { 71 | return subjectDao.queryAll(); 72 | } 73 | 74 | public List getAllChoiceQuestion() { 75 | return choiceDao.queryAll(); 76 | } 77 | 78 | public List getAllJudgeQuestion() { 79 | return judgeDao.queryAll(); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | 3 | #mybatis启动别名,缩短类名 4 | mybatis.typeAliasesPackage=examination.entity 5 | #每个dao对应的xml文件 6 | mybatis.mapperLocations=classpath:mapper/*.xml 7 | 8 | #数据库相关配置 9 | spring.datasource.url=jdbc:mysql://localhost:3306/airing?useUnicode=true&characterEncoding=utf8 10 | spring.datasource.username=root 11 | spring.datasource.password= 12 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver -------------------------------------------------------------------------------- /src/main/resources/mapper/AdminDaoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SELECT * from admin where account=#{account} and password=#{password} 6 | 7 | 8 | 9 | UPDATE `admin` SET `name`=#{name},`password`=#{pw} where `id` =#{id} 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ChartDaoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SELECT name from paper,record where pid=id and sid=#{studentId} and `status`='已批改'; 6 | 7 | 8 | 9 | SELECT score from record where sid=#{studentId} and `status`='已批改'; 10 | 11 | 12 | 13 | SELECT score from record where pid=#{pId} and `status`='已批改'; 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ChoiceDaoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | SELECT count(*) from choicedba; 7 | 8 | 9 | 10 | select * from choicedba limit #{offset},#{limit} 11 | 12 | 13 | 14 | DELETE from choicedba WHERE id=#{id} 15 | 16 | 17 | 18 | DELETE from choicedba WHERE id in 19 | 20 | #{id} 21 | 22 | 23 | 24 | 25 | UPDATE choicedba set question=#{question},option1=#{option1},option2=#{option2}, 26 | option3=#{option3},option4=#{option4},rightanswer=#{rightAnswer} WHERE id=#{id} 27 | 28 | 29 | 30 | INSERT INTO choicedba(question,option1,option2,option3,option4,rightanswer,chapters) 31 | VALUE 32 | 33 | (#{choice.question},#{choice.option1},#{choice.option2},#{choice.option3},#{choice.option4},#{choice.rightAnswer},#{choice.chapters}) 34 | 35 | 36 | 37 | 38 | select * from choicedba 39 | 40 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ClassDaoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SELECT classid from class where classname=#{name} 6 | 7 | 8 | 9 | SELECT classname from class where classid=#{id} 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/resources/mapper/EvaluateDaoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | INSERT INTO `status`( `eid`, `uid`, `sql2`, `time`, `status`) 8 | VALUES (#{eid},#{uid},#{sql2},now(),'等待评测'); 9 | 10 | 11 | 12 | UPDATE `status` SET `status`= #{status} 13 | WHERE `runid`=#{runid}; 14 | 15 | 16 | 17 | SELECT`runid`, `eid`, `uid`, `sql2`, `time`, `status`,`name` FROM `status` 18 | INNER JOIN `student` WHERE `status`.uid = student.id 19 | ORDER BY `time` DESC 20 | LIMIT #{off},#{n}; 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ExamDaoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SELECT * FROM `paper` WHERE `id`=#{id} 6 | 7 | 8 | 9 | SELECT * FROM `paper` WHERE `classid` LIKE '%|${classid}|%' 10 | 11 | 12 | 13 | SELECT pid,paper.name as pname,teacher.name as tname,paper.begintime,paper.finishtime,record.score 14 | FROM `record` INNER JOIN `paper` on paper.id=record.pid 15 | inner JOIN `teacher` on teacher.id=paper.tid 16 | WHERE sid = #{sid} AND `status` = '已批改'; 17 | 18 | 19 | 20 | INSERT INTO `record`(`sid`, `pid`, `record`, `status`, `score`) 21 | VALUES (#{sid},#{pid},#{record},'等待批改',0); 22 | 23 | 24 | 25 | 26 | SELECT * FROM `paper` WHERE `tid`=#{tid} 27 | 28 | 29 | 30 | SELECT name,score 31 | FROM `record` INNER JOIN `student` on record.sid=student.id 32 | WHERE pid = #{pid} 33 | 34 | 35 | 36 | UPDATE `record`SET `status`=#{status},`score`=#{score} WHERE `sid`=#{sid} AND `pid` =#{pid}; 37 | 38 | 39 | 40 | SELECT COUNT(*) FROM `record` WHERE `sid`=#{sid} AND `pid`=#{pid} 41 | 42 | 43 | 44 | SELECT * FROM `paper` WHERE 1; 45 | 46 | 47 | 48 | SELECT * FROM `record`,`paper` 49 | WHERE `record`.pid=`paper`.id AND `record`.pid = #{pid} AND `status`='等待批改' LIMIT 1; 50 | 51 | 52 | 53 | SELECT * FROM `record` 54 | WHERE `record`.sid = #{sid} AND `record`.pid = #{pid} AND `status`='等待批改' LIMIT 1; 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/resources/mapper/JudgeDaoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | SELECT count(*) from judgedba; 7 | 8 | 9 | 10 | select * from judgedba limit #{offset},#{limit} 11 | 12 | 13 | 14 | DELETE from judgedba WHERE id=#{id} 15 | 16 | 17 | 18 | DELETE from judgedba WHERE id in 19 | 20 | #{id} 21 | 22 | 23 | 24 | 25 | UPDATE judgedba set question=#{question},rightanswer=#{rightAnswer} WHERE id=#{id} 26 | 27 | 28 | 29 | INSERT INTO judgedba(question,rightanswer) 30 | VALUE 31 | 32 | (#{choice.question},#{choice.rightAnswer}) 33 | 34 | 35 | 36 | 37 | select * from judgedba 38 | 39 | -------------------------------------------------------------------------------- /src/main/resources/mapper/PaperDaoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | INSERT INTO paper(name,begintime,finishtime,choi,judg,sub,choiscore,judgscore,subscore,tid,classid) 6 | VALUE(#{name},#{begintime},#{finishtime},#{choi},#{judg},#{sub},#{choiscore},#{judgscore},#{subscore},#{tid},#{classid}); 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/mapper/QuestionDaoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SELECT * FROM `choicedba` WHERE `id`=#{id} 6 | 7 | 8 | 9 | SELECT `id`, `question`, `option1`, `option2`, `option3`, `option4` FROM `choicedba` WHERE `id`=#{id} 10 | 11 | 12 | 13 | 14 | SELECT * FROM `judgedba` WHERE `id`=#{id} 15 | 16 | 17 | 18 | SELECT `id`, `question` FROM `judgedba` WHERE `id`=#{id} 19 | 20 | 21 | 22 | SELECT * FROM `subdba` WHERE `id`=#{id} 23 | 24 | 25 | 26 | SELECT `id`, `question` FROM `subdba` WHERE `id`=#{id} 27 | 28 | 29 | 30 | SELECT * FROM `evadba` WHERE `id`=#{id} 31 | 32 | 33 | 34 | SELECT `id`, `question`,`type` FROM `evadba` WHERE `id`=#{id} 35 | 36 | 37 | 38 | SELECT `id`, `title`, `question`, `type`, `intable` FROM `evadba` WHERE `type` = #{type}; 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/main/resources/mapper/StudentDaoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SELECT * from student where account=#{account} and password=#{password} 6 | 7 | 8 | 9 | INSERT INTO student(account,name,password,classid) 10 | VALUE(#{account},#{name},'4QrcOUm6Wau+VuBX8g+IPg==',#{classid}); 11 | 12 | 13 | 14 | SELECT * from student where id=#{id} 15 | 16 | 17 | 18 | UPDATE student set account=#{account},name=#{name} 19 | ,classid=#{classid} WHERE id=#{id} 20 | 21 | 22 | 23 | UPDATE student set `name`=#{name},`password`=#{pw} WHERE id=#{id} 24 | 25 | 26 | 27 | INSERT INTO student(account,name,password,classid) 28 | VALUE 29 | 30 | (#{student.account},#{student.name},'4QrcOUm6Wau+VuBX8g+IPg==',#{student.classid}) 31 | 32 | 33 | 34 | 35 | select * from student 36 | 37 | 38 | 39 | DELETE from student WHERE id=#{id} 40 | 41 | 42 | 43 | DELETE from student WHERE id in 44 | 45 | #{id} 46 | 47 | 48 | 49 | 50 | UPDATE student set password='4QrcOUm6Wau+VuBX8g+IPg==' WHERE id=#{id} 51 | 52 | -------------------------------------------------------------------------------- /src/main/resources/mapper/SubjectDaoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | SELECT count(*) from subdba; 7 | 8 | 9 | 10 | select * from subdba limit #{offset},#{limit} 11 | 12 | 13 | 14 | DELETE from subdba WHERE id=#{id} 15 | 16 | 17 | 18 | DELETE from subdba WHERE id in 19 | 20 | #{id} 21 | 22 | 23 | 24 | 25 | UPDATE subdba set question=#{question},refanswer=#{refAnswer} WHERE id=#{id} 26 | 27 | 28 | 29 | INSERT INTO subdba(question,refanswer) 30 | VALUE 31 | 32 | (#{choice.question},#{choice.refAnswer}) 33 | 34 | 35 | 36 | 37 | select * from subdba 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/main/resources/mapper/TeacherDaoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SELECT * from teacher where account=#{account} and password=#{password} 6 | 7 | 8 | 9 | INSERT INTO teacher(account,name,password) VALUE(#{account},#{name},'4QrcOUm6Wau+VuBX8g+IPg=='); 10 | 11 | 12 | 13 | SELECT * from teacher where id=#{id} 14 | 15 | 16 | 17 | UPDATE teacher set `account`=#{account},`name`=#{name} WHERE id=#{id} 18 | 19 | 20 | 21 | UPDATE teacher set `name`=#{name},`password`=#{pw} WHERE id=#{id} 22 | 23 | 24 | 25 | INSERT INTO teacher(account,name,password) 26 | VALUE 27 | 28 | (#{teacher.account},#{teacher.name},'4QrcOUm6Wau+VuBX8g+IPg==') 29 | 30 | 31 | 32 | 33 | 34 | select * from teacher 35 | 36 | 37 | 38 | DELETE from teacher WHERE id=#{id} 39 | 40 | 41 | 42 | DELETE from teacher WHERE id in 43 | 44 | #{id} 45 | 46 | 47 | 48 | 49 | UPDATE teacher set password="4QrcOUm6Wau+VuBX8g+IPg==" WHERE id=#{id} 50 | 51 | -------------------------------------------------------------------------------- /src/main/resources/static/css/1.css: -------------------------------------------------------------------------------- 1 | p { 2 | color: red; 3 | } -------------------------------------------------------------------------------- /src/main/resources/static/images/add_emoticons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/add_emoticons.png -------------------------------------------------------------------------------- /src/main/resources/static/images/assd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/assd.png -------------------------------------------------------------------------------- /src/main/resources/static/images/background_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/background_1.png -------------------------------------------------------------------------------- /src/main/resources/static/images/backgroung_scut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/backgroung_scut.png -------------------------------------------------------------------------------- /src/main/resources/static/images/btn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/btn.gif -------------------------------------------------------------------------------- /src/main/resources/static/images/btn01.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/btn01.gif -------------------------------------------------------------------------------- /src/main/resources/static/images/btn02.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/btn02.gif -------------------------------------------------------------------------------- /src/main/resources/static/images/btn03.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/btn03.gif -------------------------------------------------------------------------------- /src/main/resources/static/images/btn04.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/btn04.gif -------------------------------------------------------------------------------- /src/main/resources/static/images/btn05.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/btn05.gif -------------------------------------------------------------------------------- /src/main/resources/static/images/btn06.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/btn06.gif -------------------------------------------------------------------------------- /src/main/resources/static/images/btn07.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/btn07.gif -------------------------------------------------------------------------------- /src/main/resources/static/images/btn07g.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/btn07g.gif -------------------------------------------------------------------------------- /src/main/resources/static/images/btn10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/btn10.gif -------------------------------------------------------------------------------- /src/main/resources/static/images/btn11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/btn11.gif -------------------------------------------------------------------------------- /src/main/resources/static/images/graybg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/graybg.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/icon.png -------------------------------------------------------------------------------- /src/main/resources/static/images/login_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/login_1.png -------------------------------------------------------------------------------- /src/main/resources/static/images/login_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/login_icon.png -------------------------------------------------------------------------------- /src/main/resources/static/images/logout_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/logout_1.png -------------------------------------------------------------------------------- /src/main/resources/static/images/option_correct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/option_correct.png -------------------------------------------------------------------------------- /src/main/resources/static/images/option_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/option_default.png -------------------------------------------------------------------------------- /src/main/resources/static/images/option_wrong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/option_wrong.png -------------------------------------------------------------------------------- /src/main/resources/static/images/page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/page.gif -------------------------------------------------------------------------------- /src/main/resources/static/images/page_be.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/page_be.gif -------------------------------------------------------------------------------- /src/main/resources/static/images/scut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/scut.png -------------------------------------------------------------------------------- /src/main/resources/static/images/talk_recordtext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/talk_recordtext.png -------------------------------------------------------------------------------- /src/main/resources/static/images/talk_recordtextme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/talk_recordtextme.png -------------------------------------------------------------------------------- /src/main/resources/static/images/talk_send_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/talk_send_btn.png -------------------------------------------------------------------------------- /src/main/resources/static/images/three_choice2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/static/images/three_choice2.png -------------------------------------------------------------------------------- /src/main/resources/templates/_/_adminpage.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Title 8 | 9 | 10 | 11 | 欢迎管理员 12 | 你已经登录成功 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/templates/_/_index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 | 默认名字root,密码root 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/templates/_/_login.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | MY HTML 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | LOGIN 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 | 38 | 39 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 记住密码 54 | 55 | 56 | 登陆 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | WELCOME TO 66 | 华南理工大学数据库考试系统 67 | 68 | 69 | 70 | 71 | 72 | 73 | 76 | 77 | 78 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/main/resources/templates/_/_logout.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Title 8 | 9 | 10 | 11 | 您已安全退出 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/templates/_/_student_exercise.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 问题列表 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 华南理工大学数据库考试系统 32 | 33 | 34 | 35 | 36 | 退出 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 首页 45 | 在线考试 46 | 成绩查询 47 | 在线练习 48 | 状态查询 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 功能介绍 57 | 58 | 59 | 60 | 61 | 62 | 题目编号 63 | 标题 64 | 题型 65 | 66 | 67 | 68 | 69 | 1 70 | 课程问题 71 | 查找题 72 | 73 | 74 | 2 75 | 地点问题 76 | 查找题 77 | 78 | 79 | 3 80 | 工资问题 81 | 查找题 82 | 83 | 84 | 4 85 | 成绩问题 86 | 查找题 87 | 88 | 89 | 5 90 | 吃饭问题 91 | 查找题 92 | 93 | 94 | 6 95 | 教师问题 96 | 查找题 97 | 98 | 99 | 7 100 | 雨伞问题 101 | 查找题 102 | 103 | 104 | 8 105 | 学生问题 106 | 查找题 107 | 108 | 109 | 9 110 | 衣服问题 111 | 查找题 112 | 113 | 114 | 10 115 | 识别问题 116 | 插入题 117 | 118 | 119 | 11 120 | 课程问题 121 | 查找题 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /src/main/resources/templates/_/_student_exercise_sub.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 主观题随机练习 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 主观题随机练习 17 | 18 | 19 | 20 | 问题区 21 | 22 | 这里写内容 23 | 24 | 25 | 26 | 27 | 28 | 下一题 29 | 30 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/main/resources/templates/_/_student_exercise_truefalse.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 判断题随机练习 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 判断题随机练习 17 | 18 | 19 | 20 | 问题区 21 | 22 | True 23 | False 24 | 25 | 26 | 下一题 27 | 28 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/main/resources/templates/_/_studentpage.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Title 8 | 9 | 10 | 11 | 欢迎学生 12 | 你已经登录成功 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/templates/_/_teacherpage.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Title 8 | 9 | 10 | 11 | 欢迎老师 12 | 你已经登录成功 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/adminpage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 数据库在线系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | welcome to 华南理工大学 24 | 25 | 26 | 27 | 28 | 退出 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 首页 37 | 添加学生 38 | 添加教师 39 | 学生管理 40 | 教师管理 41 | 个人信息 42 | 43 | 44 | 45 | 46 | 功能介绍 47 | 欢迎来参加数据库考试 48 | 学生功能 49 | 1.在线考试:选择时限内的考试并作答 50 | 2.成绩查询:查询考试的成绩 51 | 3.考题提交状态查询:查询考试中提交的答案判题状态 52 | 4.在线练习:进行数据库在线练习 53 | 5.练习提交状态查询:查询在线练习中提交答案的判题状态 54 | 教师功能 55 | 1.添加考试:开展一次新的考试 56 | 2.考题管理:管理考试题目 57 | 3.题库管理:管理基本题库 58 | 59 | 60 | 61 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/main/resources/templates/change_info.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 数据库在线系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | welcome to 华南理工大学 24 | 25 | 26 | 27 | 退出 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 修改个人信息 36 | 37 | 昵称 38 | 39 | 密码 40 | 41 | 再次输入密码 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/main/resources/templates/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 统一异常处理 6 | 7 | 8 | Error 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/resources/templates/excel/choice_template.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/templates/excel/choice_template.xlsx -------------------------------------------------------------------------------- /src/main/resources/templates/excel/judge_template.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/templates/excel/judge_template.xlsx -------------------------------------------------------------------------------- /src/main/resources/templates/excel/student_template.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/templates/excel/student_template.xlsx -------------------------------------------------------------------------------- /src/main/resources/templates/excel/sub_template.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/templates/excel/sub_template.xlsx -------------------------------------------------------------------------------- /src/main/resources/templates/excel/teacher_template.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IACJ/SpringBoot_ExaminationSystem/bffaf7c2cb7809482bdc0a9ae7eea525ae757fb7/src/main/resources/templates/excel/teacher_template.xlsx -------------------------------------------------------------------------------- /src/main/resources/templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | 数据库在线系统 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | LOGIN 26 | 27 | 28 | 29 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 39 | 40 | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 登录 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | WELCOME TO 63 | 华南理工大学数据库考试系统 64 | 65 | 66 | 67 | 68 | 69 | 70 | 73 | 74 | 75 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /src/main/resources/templates/logout.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 登出 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 您已成功退出。 21 | 5秒后自动跳转至登陆界面,如未能跳转,请点击 22 | 23 | 24 | 25 | 26 | 29 | 30 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/main/resources/templates/notlogin.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Title 8 | 9 | 10 | 11 | 请先登陆账号 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/templates/notpermission.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Title 8 | 9 | 10 | 11 | 您没有权限访问该页面! 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/templates/session.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Title 8 | 9 | 10 | 11 | 打印session 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/templates/student/student_chart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 数据库在线系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | welcome to 华南理工大学 26 | 27 | 28 | 29 | 退出 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 首页 38 | 在线考试 39 | 成绩查询 40 | 随机练习 41 | SQL练习 42 | 状态查询 43 | 个人信息 44 | 45 | 46 | 47 | 48 | 考试信息 49 | 表格分析 --> 50 | 51 | 52 | 53 | 54 | 57 | 66 | 67 | -------------------------------------------------------------------------------- /src/main/resources/templates/student/student_evaluating_question.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 选择题练习 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | welcome to 华南理工大学 27 | 28 | 29 | 30 | 退出 31 | 32 | 33 | 34 | 35 | 36 | 评测题练习 37 | 38 | 39 | 40 | 41 | 42 | 43 | 题目描述: 44 | 哈 45 | 题目类型: 46 | 哈 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 61 | 62 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/main/resources/templates/student/student_exercise.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 数据库在线系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | welcome to 华南理工大学 23 | 24 | 25 | 26 | 退出 27 | 28 | 29 | 30 | 31 | 32 | 33 | 首页 34 | 在线考试 35 | 成绩查询 36 | 随机练习 37 | SQL练习 38 | 状态查询 39 | 个人信息 40 | 41 | 42 | 43 | 44 | 随机选择题练习 45 | 46 | 47 | 随机判断题练习 48 | 49 | 50 | 随机主观题练习 51 | 52 | 53 | 54 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/main/resources/templates/student/student_exercise_sub.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 选择题练习 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | welcome to 华南理工大学 27 | 28 | 29 | 30 | 退出 31 | 32 | 33 | 34 | 35 | 36 | 37 | 选择题练习 38 | 判断题练习 39 | 主观题练习 40 | 返回 41 | 42 | 43 | 44 | 主观题随机练习 45 | 问题区 46 | 47 | 48 | 49 | 查看答案 50 | 下一题 51 | 52 | 53 | 54 | 55 | 56 | 57 | 60 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/main/resources/templates/student/student_test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 数据库在线系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | welcome to 华南理工大学 25 | 26 | 27 | 28 | 退出 29 | 30 | 31 | 32 | 33 | 34 | 35 | 首页 36 | 在线考试 37 | 成绩查询 38 | 随机练习 39 | SQL练习 40 | 状态查询 41 | 个人信息 42 | 43 | 44 | 45 | 考试信息 46 | 47 | 48 | 49 | 试卷id 50 | 考试名称 51 | 开始时间 52 | 交卷时间 53 | 信息 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 68 | 69 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /src/main/resources/templates/student/studentpage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 数据库在线系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | welcome to 华南理工大学 24 | 25 | 26 | 27 | 退出 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 首页 36 | 在线考试 37 | 成绩查询 38 | 随机练习 39 | SQL练习 40 | 状态查询 41 | 个人信息 42 | 43 | 44 | 45 | 46 | 功能介绍 47 | 欢迎来参加数据库考试 48 | 学生功能 49 | 1.在线考试:选择时限内的考试并作答 50 | 2.成绩查询:查询考试的成绩 51 | 3.考题提交状态查询:查询考试中提交的答案判题状态 52 | 4.在线练习:进行数据库在线练习 53 | 5.练习提交状态查询:查询在线练习中提交答案的判题状态 54 | 教师功能 55 | 1.添加考试:开展一次新的考试 56 | 2.考题管理:管理考试题目 57 | 3.题库管理:管理基本题库 58 | 59 | 60 | 61 | 62 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/main/resources/templates/teacher/other_config.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 数据库在线系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | welcome to 华南理工大学 24 | 25 | 26 | 27 | 退出 28 | 29 | 30 | 31 | 32 | 33 | 34 | 其他配置 35 | 36 | 37 | 38 | 39 | 40 | 考试名字 41 | 开始时间 42 | 43 | 结束时间 44 | 45 | 班 级 46 | 47 | 15计科1 48 | 15计科2 49 | 15网工 50 | 15信安 51 | 15计创 52 | 15计联 53 | 54 | 提交 55 | 56 | 57 | 58 | 59 | 60 | 61 | 64 | 65 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/main/resources/templates/teacher/student_chart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 数据库在线系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | welcome to 华南理工大学 26 | 27 | 28 | 30 | 31 | 退出 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 首页 40 | 选择题题库 41 | 判断题题库 42 | 主观题题库 43 | 发布考试 44 | 查询学生成绩 45 | 试卷列表 46 | 个人信息 47 | 48 | 49 | 50 | 51 | 52 | 53 | 56 | 65 | 66 | -------------------------------------------------------------------------------- /src/main/resources/templates/teacher/student_grade_list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 数据库在线系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | welcome to 华南理工大学 26 | 27 | 28 | 30 | 退出 31 | 32 | 33 | 34 | 35 | 36 | 37 | 首页 38 | 选择题题库 39 | 判断题题库 40 | 主观题题库 41 | 发布考试 42 | 查询学生成绩 43 | 试卷列表 44 | 个人信息 45 | 46 | 47 | 48 | 学生成绩 49 | 50 | 51 | 52 | 姓名 53 | 分数 54 | 55 | 56 | 李四 57 | 80 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /src/main/resources/templates/teacher/teacher_test_list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 数据库在线系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | welcome to 华南理工大学 24 | 25 | 26 | 27 | 退出 28 | 29 | 30 | 31 | 32 | 33 | 34 | 首页 35 | 选择题题库 36 | 判断题题库 37 | 主观题题库 38 | 发布考试 39 | 查询学生成绩 40 | 试卷列表 41 | 个人信息 42 | 43 | 44 | 45 | 考试信息 46 | 47 | 48 | 49 | 试卷id 50 | 考试名称 51 | 开始时间 52 | 交卷时间 53 | 批改 54 | 查看 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 65 | 66 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /src/main/resources/templates/teacher/teacherpage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 数据库在线系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | welcome to 华南理工大学 24 | 25 | 26 | 27 | 退出 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 首页 36 | 选择题题库 37 | 判断题题库 38 | 主观题题库 39 | 发布考试 40 | 查询学生成绩 41 | 试卷列表 42 | 个人信息 43 | 44 | 45 | 46 | 47 | 功能介绍 48 | 欢迎来参加数据库考试 49 | 学生功能 50 | 1.在线考试:选择时限内的考试并作答 51 | 2.成绩查询:查询考试的成绩 52 | 3.考题提交状态查询:查询考试中提交的答案判题状态 53 | 4.在线练习:进行数据库在线练习 54 | 5.练习提交状态查询:查询在线练习中提交答案的判题状态 55 | 教师功能 56 | 1.添加考试:开展一次新的考试 57 | 2.考题管理:管理考试题目 58 | 3.题库管理:管理基本题库 59 | 60 | 61 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/main/resources/templates/wrongpassword.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Title 8 | 9 | 10 | 11 | 账号密码错误,请咨询老师初始账号密码 12 | 13 | 14 | --------------------------------------------------------------------------------
你已经登录成功
默认名字root,密码root
功能介绍
学生功能
1.在线考试:选择时限内的考试并作答
2.成绩查询:查询考试的成绩
3.考题提交状态查询:查询考试中提交的答案判题状态
4.在线练习:进行数据库在线练习
5.练习提交状态查询:查询在线练习中提交答案的判题状态
教师功能
1.添加考试:开展一次新的考试
2.考题管理:管理考试题目
3.题库管理:管理基本题库
修改个人信息
考试信息
题目描述:
哈
题目类型:
随机选择题练习
随机判断题练习
随机主观题练习
主观题随机练习
问题区
学生成绩