@ -1,25 +0,0 @@
|
|||||||
# Compiled class file
|
|
||||||
*.class
|
|
||||||
|
|
||||||
# Log file
|
|
||||||
*.log
|
|
||||||
|
|
||||||
# BlueJ files
|
|
||||||
*.ctxt
|
|
||||||
|
|
||||||
# Mobile Tools for Java (J2ME)
|
|
||||||
.mtj.tmp/
|
|
||||||
|
|
||||||
# Package Files #
|
|
||||||
*.jar
|
|
||||||
*.war
|
|
||||||
*.nar
|
|
||||||
*.ear
|
|
||||||
*.zip
|
|
||||||
*.tar.gz
|
|
||||||
*.rar
|
|
||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
|
||||||
hs_err_pid*
|
|
||||||
|
|
||||||
**/.idea
|
|
@ -1,8 +0,0 @@
|
|||||||
# 默认忽略的文件
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
# 基于编辑器的 HTTP 客户端请求
|
|
||||||
/httpRequests/
|
|
||||||
# Datasource local storage ignored files
|
|
||||||
/dataSources/
|
|
||||||
/dataSources.local.xml
|
|
@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- 定义XML文档的版本和编码 -->
|
|
||||||
<project version="4">
|
|
||||||
<!-- 定义项目版本 -->
|
|
||||||
<component name="CompilerConfiguration">
|
|
||||||
<!-- 定义编译器配置 -->
|
|
||||||
<annotationProcessing>
|
|
||||||
<!-- 定义注解处理 -->
|
|
||||||
<profile name="Maven default annotation processors profile" enabled="true">
|
|
||||||
<!-- 定义Maven默认注解处理器配置 -->
|
|
||||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
|
||||||
<!-- 定义源代码输出目录 -->
|
|
||||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
|
||||||
<!-- 定义测试代码输出目录 -->
|
|
||||||
<outputRelativeToContentRoot value="true" />
|
|
||||||
<!-- 定义输出目录相对于内容根目录 -->
|
|
||||||
<module name="exam" />
|
|
||||||
<!-- 定义模块名称 -->
|
|
||||||
</profile>
|
|
||||||
</annotationProcessing>
|
|
||||||
</component>
|
|
||||||
<component name="JavacSettings">
|
|
||||||
<!-- 定义Javac设置 -->
|
|
||||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
|
||||||
<!-- 定义附加选项覆盖 -->
|
|
||||||
<module name="exam" options="-parameters" />
|
|
||||||
<!-- 定义模块名称和选项 -->
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- 定义XML文档的版本和编码 -->
|
|
||||||
<project version="4">
|
|
||||||
<!-- 定义项目版本 -->
|
|
||||||
<component name="Encoding">
|
|
||||||
<!-- 定义组件名称 -->
|
|
||||||
<file url="file://$PROJECT_DIR$/backend/src/main/java" charset="UTF-8" />
|
|
||||||
<!-- 定义文件路径和字符编码 -->
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,69 +0,0 @@
|
|||||||
<component name="InspectionProjectProfileManager">
|
|
||||||
<profile version="1.0">
|
|
||||||
<option name="myName" value="Project Default" />
|
|
||||||
<inspection_tool class="AliAccessStaticViaInstance" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AliArrayNamingShouldHaveBracket" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AliControlFlowStatementWithoutBraces" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AliDeprecation" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AliEqualsAvoidNull" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AliLongLiteralsEndingWithLowercaseL" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AliMissingOverrideAnnotation" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AliWrapperTypeEquality" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAbstractClassShouldStartWithAbstractNaming" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAbstractMethodOrInterfaceMethodMustUseJavadoc" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidApacheBeanUtilsCopy" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidCallStaticSimpleDateFormat" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidCommentBehindStatement" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidComplexCondition" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidConcurrentCompetitionRandom" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidDoubleOrFloatEqualCompare" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidManuallyCreateThread" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidMissUseOfMathRandom" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidNegationOperator" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidNewDateGetTime" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidPatternCompileInMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidReturnInFinally" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidStartWithDollarAndUnderLineNaming" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaAvoidUseTimer" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaBigDecimalAvoidDoubleConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaBooleanPropertyShouldNotStartWithIs" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaClassCastExceptionWithSubListToArrayList" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaClassCastExceptionWithToArray" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaClassMustHaveAuthor" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaClassNamingShouldBeCamel" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaCollectionInitShouldAssignCapacity" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaCommentsMustBeJavadocFormat" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaConcurrentExceptionWithModifyOriginSubList" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaConstantFieldShouldBeUpperCase" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaCountDownShouldInFinally" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaDontModifyInForeachCircle" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaEnumConstantsMustHaveComment" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaExceptionClassShouldEndWithException" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaIbatisMethodQueryForList" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaLockShouldWithTryFinally" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaLowerCamelCaseVariableNaming" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaMethodReturnWrapperType" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaMethodTooLong" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaPackageNaming" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaPojoMustOverrideToString" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaPojoMustUsePrimitiveField" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaPojoNoDefaultValue" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaRemoveCommentedCode" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaServiceOrDaoClassShouldEndWithImpl" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaSneakyThrowsWithoutExceptionType" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaStringConcat" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaSwitchExpression" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaSwitchStatement" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaTestClassShouldEndWithTestNaming" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaThreadLocalShouldRemove" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaThreadPoolCreation" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaThreadShouldSetName" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaTransactionMustHaveRollback" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaUndefineMagicConstant" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaUnsupportedExceptionWithModifyAsList" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaUseQuietReferenceNotation" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="AlibabaUseRightCaseForDateFormat" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="MapOrSetKeyShouldOverrideHashCodeEquals" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
</profile>
|
|
||||||
</component>
|
|
@ -1,34 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- 定义项目版本 -->
|
|
||||||
<project version="4">
|
|
||||||
<!-- 定义远程仓库配置 -->
|
|
||||||
<component name="RemoteRepositoriesConfiguration">
|
|
||||||
<!-- 定义第一个远程仓库 -->
|
|
||||||
<remote-repository>
|
|
||||||
<!-- 定义远程仓库ID -->
|
|
||||||
<option name="id" value="central" />
|
|
||||||
<!-- 定义远程仓库名称 -->
|
|
||||||
<option name="name" value="Central Repository" />
|
|
||||||
<!-- 定义远程仓库URL -->
|
|
||||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
|
||||||
</remote-repository>
|
|
||||||
<!-- 定义第二个远程仓库 -->
|
|
||||||
<remote-repository>
|
|
||||||
<!-- 定义远程仓库ID -->
|
|
||||||
<option name="id" value="central" />
|
|
||||||
<!-- 定义远程仓库名称 -->
|
|
||||||
<option name="name" value="Maven Central repository" />
|
|
||||||
<!-- 定义远程仓库URL -->
|
|
||||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
|
||||||
</remote-repository>
|
|
||||||
<!-- 定义第三个远程仓库 -->
|
|
||||||
<remote-repository>
|
|
||||||
<!-- 定义远程仓库ID -->
|
|
||||||
<option name="id" value="jboss.community" />
|
|
||||||
<!-- 定义远程仓库名称 -->
|
|
||||||
<option name="name" value="JBoss Community repository" />
|
|
||||||
<!-- 定义远程仓库URL -->
|
|
||||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
|
||||||
</remote-repository>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- 项目版本 -->
|
|
||||||
<project version="4">
|
|
||||||
<!-- 外部存储配置管理器 -->
|
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
|
||||||
<!-- Maven项目管理器 -->
|
|
||||||
<component name="MavenProjectsManager">
|
|
||||||
<!-- 原始文件列表 -->
|
|
||||||
<option name="originalFiles">
|
|
||||||
<list>
|
|
||||||
<!-- 后端项目的pom.xml文件 -->
|
|
||||||
<option value="$PROJECT_DIR$/backend/pom.xml" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<!-- 项目根管理器 -->
|
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8 (2)" project-jdk-type="JavaSDK">
|
|
||||||
<!-- 输出目录 -->
|
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- 定义XML文档的版本和编码 -->
|
|
||||||
<project version="4">
|
|
||||||
<!-- 定义项目的版本 -->
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<!-- 定义项目的模块管理器 -->
|
|
||||||
<modules>
|
|
||||||
<!-- 定义项目的模块 -->
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/spring-boot-online-exam-master.iml" filepath="$PROJECT_DIR$/.idea/spring-boot-online-exam-master.iml" />
|
|
||||||
<!-- 定义项目的模块文件路径 -->
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
<!-- 定义项目的根元素 -->
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="JAVA_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
||||||
<exclude-output />
|
|
||||||
<content url="file://$MODULE_DIR$">
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/web" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
@ -1,201 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<!-- 定义项目版本 -->
|
|
||||||
<component name="Palette2">
|
|
||||||
<!-- 定义调色板组件 -->
|
|
||||||
<group name="Swing">
|
|
||||||
<!-- 定义Swing组件组 -->
|
|
||||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<!-- 定义水平间距组件 -->
|
|
||||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
</item>
|
|
||||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<!-- 定义垂直间距组件 -->
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<!-- 定义面板组件 -->
|
|
||||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
|
||||||
<!-- 定义滚动面板组件 -->
|
|
||||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<!-- 定义按钮组件 -->
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<initial-values>
|
|
||||||
<!-- 定义初始值 -->
|
|
||||||
<property name="text" value="Button" />
|
|
||||||
<!-- 定义按钮文本 -->
|
|
||||||
</initial-values>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<!-- 定义单选按钮组件 -->
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<initial-values>
|
|
||||||
<!-- 定义初始值 -->
|
|
||||||
<property name="text" value="RadioButton" />
|
|
||||||
<!-- 定义单选按钮文本 -->
|
|
||||||
</initial-values>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<!-- 定义复选框组件 -->
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<initial-values>
|
|
||||||
<!-- 定义初始值 -->
|
|
||||||
<property name="text" value="CheckBox" />
|
|
||||||
<!-- 定义复选框文本 -->
|
|
||||||
</initial-values>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<!-- 定义标签组件 -->
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<initial-values>
|
|
||||||
<!-- 定义初始值 -->
|
|
||||||
<property name="text" value="Label" />
|
|
||||||
<!-- 定义标签文本 -->
|
|
||||||
</initial-values>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<!-- 定义文本框组件 -->
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<preferred-size width="150" height="-1" />
|
|
||||||
<!-- 定义首选大小 -->
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<!-- 定义密码框组件 -->
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<preferred-size width="150" height="-1" />
|
|
||||||
<!-- 定义首选大小 -->
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<!-- 定义格式化文本框组件 -->
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<preferred-size width="150" height="-1" />
|
|
||||||
<!-- 定义首选大小 -->
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<!-- 定义文本区域组件 -->
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<preferred-size width="150" height="50" />
|
|
||||||
<!-- 定义首选大小 -->
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<!-- 定义文本面板组件 -->
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<preferred-size width="150" height="50" />
|
|
||||||
<!-- 定义首选大小 -->
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<!-- 定义编辑面板组件 -->
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<preferred-size width="150" height="50" />
|
|
||||||
<!-- 定义首选大小 -->
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<!-- 定义组合框组件 -->
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<!-- 定义表格组件 -->
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<preferred-size width="150" height="50" />
|
|
||||||
<!-- 定义首选大小 -->
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<!-- 定义列表组件 -->
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<preferred-size width="150" height="50" />
|
|
||||||
<!-- 定义首选大小 -->
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<!-- 定义树组件 -->
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<preferred-size width="150" height="50" />
|
|
||||||
<!-- 定义首选大小 -->
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<!-- 定义选项卡面板组件 -->
|
|
||||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<preferred-size width="200" height="200" />
|
|
||||||
<!-- 定义首选大小 -->
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<!-- 定义分割面板组件 -->
|
|
||||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<preferred-size width="200" height="200" />
|
|
||||||
<!-- 定义首选大小 -->
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<!-- 定义微调器组件 -->
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<!-- 定义滑块组件 -->
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<!-- 定义分隔符组件 -->
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<!-- 定义进度条组件 -->
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<!-- 定义工具栏组件 -->
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
<preferred-size width="-1" height="20" />
|
|
||||||
<!-- 定义首选大小 -->
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<!-- 定义工具栏分隔符组件 -->
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<!-- 定义滚动条组件 -->
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
|
||||||
<!-- 定义默认约束 -->
|
|
||||||
</item>
|
|
||||||
</group>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,7 +0,0 @@
|
|||||||
# build docker for project
|
|
||||||
FROM waterknife/centos-nginx-jdk8-mysql
|
|
||||||
WORKDIR /lsg/
|
|
||||||
COPY backend/target/*.jar ./app.jar
|
|
||||||
COPY entrypoint.sh ./
|
|
||||||
RUN chmod 777 entrypoint.sh
|
|
||||||
EXPOSE 9527
|
|
@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2019 Liang Shan Guang
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
@ -1,18 +0,0 @@
|
|||||||
ResultVO<RecordDetailVo> getExamRecordDetail(@PathVariable String recordId) {
|
|
||||||
// 定义返回结果
|
|
||||||
ResultVO<RecordDetailVo> resultVO;
|
|
||||||
try {
|
|
||||||
// 调用examService获取考试记录详情
|
|
||||||
RecordDetailVo recordDetailVo = examService.getRecordDetail(recordId);
|
|
||||||
// 返回成功结果
|
|
||||||
resultVO = new ResultVO<>(0, "获取考试记录详情成功", recordDetailVo);
|
|
||||||
} catch (Exception e) {
|
|
||||||
// 打印异常信息
|
|
||||||
e.printStackTrace();
|
|
||||||
// 返回失败结果
|
|
||||||
resultVO = new ResultVO<>(-1, "获取考试记录详情失败", null);
|
|
||||||
}
|
|
||||||
// 返回结果
|
|
||||||
return resultVO;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
.idea/
|
|
||||||
*.iml
|
|
||||||
src/main/resources/public
|
|
||||||
src/main/resources/static
|
|
||||||
target/
|
|
||||||
dist/
|
|
Before Width: | Height: | Size: 246 KiB |
Before Width: | Height: | Size: 156 KiB |
@ -1,96 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
|
||||||
<version>2.1.4.RELEASE</version>
|
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
|
||||||
</parent>
|
|
||||||
<groupId>com.huawei.l00379880</groupId>
|
|
||||||
<artifactId>exam</artifactId>
|
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
|
||||||
<name>exam</name>
|
|
||||||
<description>基于SpringBoot的在线考试系统</description>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<java.version>1.8</java.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>mysql</groupId>
|
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-swagger2</artifactId>
|
|
||||||
<version>2.6.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-swagger-ui</artifactId>
|
|
||||||
<version>2.6.1</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- 常用Java工具类 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.hutool</groupId>
|
|
||||||
<artifactId>hutool-all</artifactId>
|
|
||||||
<version>4.5.10</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- FastDFS文件服务器的客户端 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.tobato</groupId>
|
|
||||||
<artifactId>fastdfs-client</artifactId>
|
|
||||||
<version>1.26.5</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- FastDFS文件传输需要 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-test</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<!-- JWT相关 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.jsonwebtoken</groupId>
|
|
||||||
<artifactId>jjwt</artifactId>
|
|
||||||
<version>0.7.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.code.gson</groupId>
|
|
||||||
<artifactId>gson</artifactId>
|
|
||||||
<version>2.8.4</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
@ -1,39 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 允许跨域访问
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-17 00:11
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.config;
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@Slf4j
|
|
||||||
public class CORSConf {
|
|
||||||
|
|
||||||
// 创建一个 WebMvcConfigurer Bean
|
|
||||||
@Bean
|
|
||||||
public WebMvcConfigurer corsConfigurer() {
|
|
||||||
return new WebMvcConfigurer() {
|
|
||||||
// 重写 addCorsMappings 方法
|
|
||||||
@Override
|
|
||||||
public void addCorsMappings(CorsRegistry registry) {
|
|
||||||
// 记录初始化 CORSConfiguration 配置
|
|
||||||
log.info("初始化 CORSConfiguration 配置");
|
|
||||||
// 添加映射
|
|
||||||
registry.addMapping("/**")
|
|
||||||
// 允许所有请求头
|
|
||||||
.allowedHeaders("*")
|
|
||||||
// 允许所有请求方法
|
|
||||||
.allowedMethods("*")
|
|
||||||
// 允许所有请求来源
|
|
||||||
.allowedOrigins("*");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 拦截器配置
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-22 08:21
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.config;
|
|
||||||
|
|
||||||
import lsgwr.exam.interceptor.LoginInterceptor;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
public class IntercepterConfig implements WebMvcConfigurer {
|
|
||||||
|
|
||||||
// 注入LoginInterceptor
|
|
||||||
@Autowired
|
|
||||||
private LoginInterceptor loginInterceptor;
|
|
||||||
|
|
||||||
// 添加拦截器
|
|
||||||
@Override
|
|
||||||
public void addInterceptors(InterceptorRegistry registry) {
|
|
||||||
// 拦截user下的api
|
|
||||||
registry.addInterceptor(loginInterceptor).addPathPatterns("/api/**");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* Created By Liang Shan Guang at 2019-05-14 08:20
|
|
||||||
* Description : 项目自定义配置
|
|
||||||
*/
|
|
||||||
package lsgwr.exam.config;
|
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* Created By Liang Shan Guang at 2019-05-14 08:20
|
|
||||||
* Description : 对外REST接口
|
|
||||||
*/
|
|
||||||
package lsgwr.exam.controller;
|
|
@ -1,33 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 注册接口参数
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-16 23:40
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.dto;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class RegisterDTO {
|
|
||||||
/**
|
|
||||||
* 邮箱
|
|
||||||
*/
|
|
||||||
private String email;
|
|
||||||
/**
|
|
||||||
* 密码
|
|
||||||
*/
|
|
||||||
private String password;
|
|
||||||
/**
|
|
||||||
* 确认密码
|
|
||||||
*/
|
|
||||||
private String password2;
|
|
||||||
/**
|
|
||||||
* 手机号
|
|
||||||
*/
|
|
||||||
private String mobile;
|
|
||||||
/**
|
|
||||||
* 验证码
|
|
||||||
*/
|
|
||||||
private String captcha;
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* Created By Liang Shan Guang at 2019-05-16 23:38
|
|
||||||
* Description : 用于接口数据传输
|
|
||||||
*/
|
|
||||||
package lsgwr.exam.dto;
|
|
@ -1,32 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 前端的操作
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-26 12:31
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.entity;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.GeneratedValue;
|
|
||||||
import javax.persistence.Id;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Entity
|
|
||||||
public class Action {
|
|
||||||
// 定义一个主键
|
|
||||||
@Id
|
|
||||||
// 自动生成主键
|
|
||||||
@GeneratedValue
|
|
||||||
private Integer actionId;
|
|
||||||
|
|
||||||
// 定义一个动作名称
|
|
||||||
private String actionName;
|
|
||||||
|
|
||||||
// 定义一个动作描述
|
|
||||||
private String actionDescription;
|
|
||||||
|
|
||||||
// 定义一个默认选中状态
|
|
||||||
private Boolean defaultCheck;
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 考试得分级别
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019/5/14 07:44
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.entity;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.GeneratedValue;
|
|
||||||
import javax.persistence.Id;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Entity
|
|
||||||
public class ExamRecordLevel {
|
|
||||||
// 考试记录等级ID
|
|
||||||
@Id
|
|
||||||
@GeneratedValue
|
|
||||||
private Integer examRecordLevelId;
|
|
||||||
// 考试记录等级名称
|
|
||||||
private String examRecordLevelName;
|
|
||||||
// 考试记录等级描述
|
|
||||||
private String examRecordLevelDescription;
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 用户角色表
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019/5/14 07:49
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.entity;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.GeneratedValue;
|
|
||||||
import javax.persistence.Id;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Entity
|
|
||||||
public class Role {
|
|
||||||
// 角色ID
|
|
||||||
@Id
|
|
||||||
@GeneratedValue
|
|
||||||
private Integer roleId;
|
|
||||||
// 角色名称
|
|
||||||
private String roleName;
|
|
||||||
// 角色描述
|
|
||||||
private String roleDescription;
|
|
||||||
// 角色详情
|
|
||||||
private String roleDetail;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* 角色所能访问的页面的主键集合(用-连接起来字符串)
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private String rolePageIds;
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* Created By Liang Shan Guang at 2019-05-14 00:34
|
|
||||||
* Description : 数据库实体类
|
|
||||||
*/
|
|
||||||
package lsgwr.exam.entity;
|
|
@ -1,29 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 问题类型的的枚举
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-18 12:00
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
public enum QuestionEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 问题类型
|
|
||||||
*/
|
|
||||||
RADIO(1, "单选题"),
|
|
||||||
CHECK(2, "多选题"),
|
|
||||||
JUDGE(3, "判断题");
|
|
||||||
|
|
||||||
|
|
||||||
QuestionEnum(Integer id, String role) {
|
|
||||||
this.id = id;
|
|
||||||
this.role = role;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Integer id;
|
|
||||||
private String role;
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package lsgwr.exam.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
public enum ResultEnum {
|
|
||||||
// 下面是本项目用到的所有错误码
|
|
||||||
REGISTER_SUCCESS(0, "注册成功"),
|
|
||||||
REGISTER_FAILED(-2, "注册失败"),
|
|
||||||
LOGIN_SUCCESS(0, "登录成功"),
|
|
||||||
LOGIN_FAILED(-1, "用户名或者密码错误"),
|
|
||||||
GET_INFO_SUCCESS(0, "获取用户信息成功"),
|
|
||||||
PARAM_ERR(1, "参数不正确"),
|
|
||||||
PRODUCT_NOT_EXIST(10, "用户不存在"),
|
|
||||||
PRODUCT_STOCK_ERR(11, "考试信息异常"),
|
|
||||||
ORDER_STATUS_ERR(14, "考试状态异常"),
|
|
||||||
ORDER_UPDATE_ERR(15, "考试更新异常"),
|
|
||||||
ORDER_DETAIL_EMPTY(16, "用户详情为空");
|
|
||||||
|
|
||||||
// 构造方法,用于初始化错误码和错误信息
|
|
||||||
ResultEnum(Integer code, String message) {
|
|
||||||
this.code = code;
|
|
||||||
this.message = message;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 错误码
|
|
||||||
private Integer code;
|
|
||||||
// 错误信息
|
|
||||||
private String message;
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* Created By Liang Shan Guang at 2019-05-17 07:51
|
|
||||||
* Description : 自定义异常
|
|
||||||
*/
|
|
||||||
package lsgwr.exam.exception;
|
|
@ -1,18 +0,0 @@
|
|||||||
package lsgwr.exam.qo;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/***********************************************************
|
|
||||||
* @note : 要下载的文件的路径
|
|
||||||
* @author : 梁山广
|
|
||||||
* @version : V1.0 at 2019/5/19 20:10
|
|
||||||
***********************************************************/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class DownloadQo {
|
|
||||||
// 下载路径
|
|
||||||
String path;
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
package lsgwr.exam.qo;
|
|
||||||
|
|
||||||
/***********************************************************
|
|
||||||
* @Description : 文件传输的实体类
|
|
||||||
* @author : 梁山广
|
|
||||||
* @date : 2017/8/19 15:51
|
|
||||||
* @version : V1.0
|
|
||||||
***********************************************************/
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class UploadModel {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* 要保存的文件
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private MultipartFile[] files;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* 文件要存储的文件夹
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private String dir;
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @note : 用于请求参数的实体类(Query Object)
|
|
||||||
* @author : 梁山广
|
|
||||||
* @version : V1.0 at 2018/7/18 17:32
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.qo;
|
|
@ -1,13 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : Action的数据库操作类
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-26 12:39
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.repository;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.Action;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
public interface ActionRepository extends JpaRepository<Action, Integer> {
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description :
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-14 08:24
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.repository;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.ExamRecordLevel;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
public interface ExamRecordLevelRepository extends JpaRepository<ExamRecordLevel, Integer> {
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description :
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-14 08:23
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.repository;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.ExamRecord;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface ExamRecordRepository extends JpaRepository<ExamRecord, String> {
|
|
||||||
/**
|
|
||||||
* 获取指定用户参加过的所有考试
|
|
||||||
*
|
|
||||||
* @param userId 用户id
|
|
||||||
* @return 用户参加过的所有考试
|
|
||||||
*/
|
|
||||||
List<ExamRecord> findByExamJoinerIdOrderByExamJoinDateDesc(String userId);
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description :
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-14 08:22
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.repository;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.Exam;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
import org.springframework.data.jpa.repository.Query;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface ExamRepository extends JpaRepository<Exam, String> {
|
|
||||||
@Query("select e from Exam e order by e.updateTime desc")
|
|
||||||
List<Exam> findAll();
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 页面的数据库操作类
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-26 12:41
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.repository;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.Page;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
public interface PageRepository extends JpaRepository<Page, Integer> {
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description :
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-14 08:25
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.repository;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.QuestionCategory;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
public interface QuestionCategoryRepository extends JpaRepository<QuestionCategory, Integer> {
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description :
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-14 08:26
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.repository;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.QuestionLevel;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
public interface QuestionLevelRepository extends JpaRepository<QuestionLevel, Integer> {
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description :
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-14 08:27
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.repository;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.QuestionOption;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
public interface QuestionOptionRepository extends JpaRepository<QuestionOption, String> {
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description :
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-14 08:25
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.repository;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.Question;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
import org.springframework.data.jpa.repository.Query;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface QuestionRepository extends JpaRepository<Question, String> {
|
|
||||||
List<Question> findByQuestionTypeId(Integer id);
|
|
||||||
@Query("select q from Question q order by q.updateTime desc")
|
|
||||||
List<Question> findAll();
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description :
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-14 08:28
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.repository;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.QuestionType;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
public interface QuestionTypeRepository extends JpaRepository<QuestionType, Integer> {
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 角色的数据库操作类
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-14 08:29
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.repository;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.Role;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
public interface RoleRepository extends JpaRepository<Role, Integer> {
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* Created By Liang Shan Guang at 2019-05-14 08:20
|
|
||||||
* Description : 数据库操作接口
|
|
||||||
*/
|
|
||||||
package lsgwr.exam.repository;
|
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* Created By Liang Shan Guang at 2019-05-14 08:20
|
|
||||||
* Description : 服务接口与实现
|
|
||||||
*/
|
|
||||||
package lsgwr.exam.service;
|
|
@ -1,153 +0,0 @@
|
|||||||
package lsgwr.exam.utils;
|
|
||||||
|
|
||||||
import cn.hutool.core.io.FileUtil;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.core.io.FileSystemResource;
|
|
||||||
import org.springframework.core.io.InputStreamResource;
|
|
||||||
import org.springframework.http.HttpHeaders;
|
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.util.StringUtils;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Path;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/***********************************************************
|
|
||||||
* @note : 文件传输工具类
|
|
||||||
* @author : 梁山广
|
|
||||||
* @version : V1.0 at 2019/5/19 16:15
|
|
||||||
***********************************************************/
|
|
||||||
@Slf4j
|
|
||||||
public class FileTransUtil {
|
|
||||||
/**
|
|
||||||
* 上传单个文件
|
|
||||||
*
|
|
||||||
* @param uploadfile 上传的文件
|
|
||||||
* @param dir 文件要保存的文件夹
|
|
||||||
* @return 成功或者失败消息
|
|
||||||
*/
|
|
||||||
public static String uploadFile(MultipartFile uploadfile, String dir) {
|
|
||||||
log.info("Single file upload!");
|
|
||||||
if (uploadfile.isEmpty()) {
|
|
||||||
return "文件名不能为空";
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
saveUploadedFiles(Arrays.asList(uploadfile), dir);
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return "后台服务异常";
|
|
||||||
}
|
|
||||||
log.info("file upload successfully! " + dir);
|
|
||||||
return "文件上传成功";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 多文件上传
|
|
||||||
*
|
|
||||||
* @param uploadfiles 要上传的多个文件
|
|
||||||
* @param dir 要保存的目录
|
|
||||||
* @return 成功或者失败消息
|
|
||||||
*/
|
|
||||||
public static String uploadFiles(MultipartFile[] uploadfiles, String dir) {
|
|
||||||
// 打印调试信息
|
|
||||||
log.debug("Multiple file upload!");
|
|
||||||
// 将上传的文件名拼接成一个字符串
|
|
||||||
String uploadedFileName = Arrays.stream(uploadfiles).map(x -> x.getOriginalFilename()).filter(x -> !StringUtils.isEmpty(x)).collect(Collectors.joining(" , "));
|
|
||||||
// 如果文件名为空,则返回错误信息
|
|
||||||
if (StringUtils.isEmpty(uploadedFileName)) {
|
|
||||||
return "文件名不能为空";
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
// 调用工具类保存上传的文件
|
|
||||||
FileTransUtil.saveUploadedFiles(Arrays.asList(uploadfiles), dir);
|
|
||||||
} catch (IOException e) {
|
|
||||||
// 如果保存文件时发生异常,则返回错误信息
|
|
||||||
return "后台服务异常";
|
|
||||||
}
|
|
||||||
// 打印上传成功的日志信息
|
|
||||||
log.info("file upload successfully! " + uploadedFileName);
|
|
||||||
// 返回上传成功的提示信息
|
|
||||||
return "文件上传成功";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存文件到指定路径
|
|
||||||
*
|
|
||||||
* @param files 上传的文件
|
|
||||||
* @throws IOException 文件保存异常
|
|
||||||
*/
|
|
||||||
// 保存上传的文件
|
|
||||||
public static void saveUploadedFiles(List<MultipartFile> files, String dir) throws IOException {
|
|
||||||
// 遍历文件列表
|
|
||||||
for (MultipartFile file : files) {
|
|
||||||
// 如果文件为空,则跳过
|
|
||||||
if (file.isEmpty()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// 如果文件夹不存在,则创建
|
|
||||||
if (!FileUtil.exist(dir)) {
|
|
||||||
// 文件夹不存在就创建
|
|
||||||
FileUtil.mkdir(dir);
|
|
||||||
}
|
|
||||||
// 获取文件的字节数组
|
|
||||||
byte[] bytes = file.getBytes();
|
|
||||||
// 获取文件的原始文件名,并替换反斜杠为正斜杠
|
|
||||||
String fileName = file.getOriginalFilename().replace("\\", "/");
|
|
||||||
// 如果文件名中包含斜杠,则说明是上传文件夹
|
|
||||||
if (fileName.lastIndexOf('/')>0){
|
|
||||||
// 上传文件夹的时候会有这种情况
|
|
||||||
// 获取文件夹路径
|
|
||||||
String fileDir = dir + "/" + fileName.substring(0, fileName.lastIndexOf('/'));
|
|
||||||
// 如果文件夹不存在,则创建
|
|
||||||
if (!FileUtil.exist(fileDir)) {
|
|
||||||
// 文件夹不存在就创建,创建文件夹的时候会用到
|
|
||||||
FileUtil.mkdir(fileDir);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 获取文件的路径
|
|
||||||
Path path = Paths.get(dir + "/" + fileName);
|
|
||||||
// 将文件写入路径
|
|
||||||
Files.write(path, bytes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据文件路径下载文件
|
|
||||||
*
|
|
||||||
* @param filePath 要现在的文件的路径
|
|
||||||
* @return 文件流
|
|
||||||
* @throws IOException 文件流读取异常
|
|
||||||
*/
|
|
||||||
public static ResponseEntity<InputStreamResource> downloadFile(String filePath) throws IOException {
|
|
||||||
// 记录下载文件的信息
|
|
||||||
log.info("downloading file : " + filePath);
|
|
||||||
// 创建文件系统资源
|
|
||||||
FileSystemResource file = new FileSystemResource(filePath);
|
|
||||||
// 创建响应头
|
|
||||||
HttpHeaders headers = new HttpHeaders();
|
|
||||||
// 设置缓存控制
|
|
||||||
headers.add("Cache-Control", "no-cache, no-store, must-revalidate");
|
|
||||||
// 设置文件下载时的文件名
|
|
||||||
headers.add("Content-Disposition", String.format("attachment; filename=\"%s\"", new String(file.getFilename().getBytes("gbk"), "iso-8859-1")));
|
|
||||||
// 设置缓存控制
|
|
||||||
headers.add("Pragma", "no-cache");
|
|
||||||
// 设置缓存控制
|
|
||||||
headers.add("Expires", "0");
|
|
||||||
// 打印文件名
|
|
||||||
System.out.println(file.getFilename());
|
|
||||||
// 返回响应实体
|
|
||||||
return ResponseEntity
|
|
||||||
.ok()
|
|
||||||
.headers(headers)
|
|
||||||
.contentLength(file.contentLength())
|
|
||||||
.contentType(MediaType.parseMediaType("application/octet-stream"))
|
|
||||||
.body(new InputStreamResource(file.getInputStream()));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* Created By Liang Shan Guang at 2019-05-14 08:19
|
|
||||||
* Description : 工具类, 大部分工具都可以在Hutool中找到
|
|
||||||
*/
|
|
||||||
package lsgwr.exam.utils;
|
|
@ -1,25 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : Action的前端展示类
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-26 13:50
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ActionVo {
|
|
||||||
// 使用@JsonProperty注解将actionName属性映射到JSON中的action字段
|
|
||||||
@JsonProperty("action")
|
|
||||||
private String actionName;
|
|
||||||
|
|
||||||
// 使用@JsonProperty注解将actionDescription属性映射到JSON中的describe字段
|
|
||||||
@JsonProperty("describe")
|
|
||||||
private String actionDescription;
|
|
||||||
|
|
||||||
// 使用@JsonProperty注解将defaultCheck属性映射到JSON中的defaultCheck字段
|
|
||||||
@JsonProperty("defaultCheck")
|
|
||||||
private Boolean defaultCheck;
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
package lsgwr.exam.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
/**
|
|
||||||
* @Description: 用于表示考试卡片的信息,这个类可以很方便地与JSON数据绑定
|
|
||||||
* 用于从API响应中解析考试卡片信息,将考试卡片信息序列化为JSON格式发送到服务器
|
|
||||||
* Lombok库的@Data注解用于自动生成getter和setter方法
|
|
||||||
* Jackson库的@JsonProperty注解用于指定JSON序列化和反序列化时使用的属性名称。
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class ExamCardVo {
|
|
||||||
//考试ID
|
|
||||||
|
|
||||||
@JsonProperty("id")
|
|
||||||
private String examId;
|
|
||||||
//考试名称
|
|
||||||
|
|
||||||
@JsonProperty("title")
|
|
||||||
private String examName;
|
|
||||||
//考试头像
|
|
||||||
@JsonProperty("avatar")
|
|
||||||
private String examAvatar;
|
|
||||||
//考试描述
|
|
||||||
|
|
||||||
@JsonProperty("content")
|
|
||||||
private String examDescription;
|
|
||||||
//考试分数
|
|
||||||
|
|
||||||
@JsonProperty("score")
|
|
||||||
private Integer examScore;
|
|
||||||
//考试限制的时间,单位为分钟
|
|
||||||
|
|
||||||
@JsonProperty("elapse")
|
|
||||||
private Integer examTimeLimit;
|
|
||||||
}
|
|
@ -1,58 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 考试的前端展示类。examCreatorId可从token中获取
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-06-17 08:14
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ExamCreateVo {
|
|
||||||
|
|
||||||
@JsonProperty("name")
|
|
||||||
private String examName;
|
|
||||||
|
|
||||||
@JsonProperty("avatar")
|
|
||||||
private String examAvatar;
|
|
||||||
|
|
||||||
@JsonProperty("desc")
|
|
||||||
private String examDescription;
|
|
||||||
|
|
||||||
//试时长,单位分钟
|
|
||||||
|
|
||||||
@JsonProperty("elapse")
|
|
||||||
private Integer examTimeLimit;
|
|
||||||
|
|
||||||
|
|
||||||
//单选题
|
|
||||||
|
|
||||||
private List<ExamQuestionSelectVo> radios;
|
|
||||||
|
|
||||||
//多选题
|
|
||||||
|
|
||||||
private List<ExamQuestionSelectVo> checks;
|
|
||||||
|
|
||||||
//判断题
|
|
||||||
|
|
||||||
private List<ExamQuestionSelectVo> judges;
|
|
||||||
|
|
||||||
//单选题的分数
|
|
||||||
|
|
||||||
@JsonProperty("radioScore")
|
|
||||||
private Integer examScoreRadio;
|
|
||||||
|
|
||||||
//多选题的分数
|
|
||||||
|
|
||||||
@JsonProperty("checkScore")
|
|
||||||
private Integer examScoreCheck;
|
|
||||||
|
|
||||||
//判断题每题的分数
|
|
||||||
|
|
||||||
@JsonProperty("judgeScore")
|
|
||||||
private Integer examScoreJudge;
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 考试详情的实体类
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-06-24 08:14
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.vo;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.Exam;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ExamDetailVo {
|
|
||||||
//试的基本信息对象
|
|
||||||
|
|
||||||
private Exam exam;
|
|
||||||
|
|
||||||
//单选题的id数组
|
|
||||||
|
|
||||||
private String[] radioIds;
|
|
||||||
|
|
||||||
//多选题的id数组
|
|
||||||
|
|
||||||
private String[] checkIds;
|
|
||||||
|
|
||||||
//判断题的id数组
|
|
||||||
|
|
||||||
private String[] judgeIds;
|
|
||||||
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 按照单选、多选和判断题返回对应的问题列表
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-06-23 11:00
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ExamQuestionTypeVo {
|
|
||||||
// 单选题列表
|
|
||||||
@JsonProperty("radios")
|
|
||||||
private List<ExamQuestionSelectVo> examQuestionSelectVoRadioList;
|
|
||||||
|
|
||||||
// 多选题列表
|
|
||||||
@JsonProperty("checks")
|
|
||||||
private List<ExamQuestionSelectVo> examQuestionSelectVoCheckList;
|
|
||||||
|
|
||||||
// 判断题列表
|
|
||||||
@JsonProperty("judges")
|
|
||||||
private List<ExamQuestionSelectVo> examQuestionSelectVoJudgeList;
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 考试记录VO
|
|
||||||
* @author : 梁山广(Liang Shan Guang)
|
|
||||||
* @date : 2019/10/25 7:42
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.vo;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.Exam;
|
|
||||||
import lsgwr.exam.entity.ExamRecord;
|
|
||||||
import lsgwr.exam.entity.User;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ExamRecordVo {
|
|
||||||
//当前考试记录对应的考试
|
|
||||||
private Exam exam;
|
|
||||||
|
|
||||||
//当前考试对应的内容
|
|
||||||
|
|
||||||
private ExamRecord examRecord;
|
|
||||||
|
|
||||||
//参加考试的用户信息
|
|
||||||
|
|
||||||
private User user;
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : Action的前端展示类
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-05-26 13:46
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class PageVo {
|
|
||||||
// 使用@JsonProperty注解将actionEntitySet字段映射到JSON中的actionEntitySet字段
|
|
||||||
@JsonProperty("actionEntitySet")
|
|
||||||
private List<ActionVo> actionVoList;
|
|
||||||
|
|
||||||
// 使用@JsonProperty注解将permissionId字段映射到JSON中的permissionId字段
|
|
||||||
@JsonProperty("permissionId")
|
|
||||||
private String pageName;
|
|
||||||
|
|
||||||
// 使用@JsonProperty注解将permissionName字段映射到JSON中的permissionName字段
|
|
||||||
@JsonProperty("permissionName")
|
|
||||||
private String pageDescription;
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 问题详情的实体类
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-10-20 09:51
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.vo;
|
|
||||||
|
|
||||||
import lsgwr.exam.entity.QuestionOption;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class QuestionDetailVo {
|
|
||||||
//问题的id
|
|
||||||
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
//考试题目
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
//考试描述
|
|
||||||
|
|
||||||
private String description;
|
|
||||||
//问题的类型
|
|
||||||
|
|
||||||
private String type;
|
|
||||||
//问题的选项
|
|
||||||
|
|
||||||
private List<QuestionOption> options;
|
|
||||||
//问题的答案,选项的id组成的数组
|
|
||||||
|
|
||||||
private List<String> answers = new ArrayList<>();
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 问题选项的外层对象
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-06-02 20:23
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class QuestionOptionCreateVo {
|
|
||||||
|
|
||||||
//问题的内容
|
|
||||||
@JsonProperty("content")
|
|
||||||
private String questionOptionContent;
|
|
||||||
|
|
||||||
//当前的选项是否是问题大答案
|
|
||||||
|
|
||||||
@JsonProperty("answer")
|
|
||||||
private Boolean answer = false;
|
|
||||||
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 问题选项的自定义实体类
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-06-01 09:45
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class QuestionOptionVo {
|
|
||||||
// 题目选项ID
|
|
||||||
@JsonProperty("id")
|
|
||||||
private String questionOptionId;
|
|
||||||
|
|
||||||
// 题目选项内容
|
|
||||||
@JsonProperty("content")
|
|
||||||
private String questionOptionContent;
|
|
||||||
|
|
||||||
// 是否为答案
|
|
||||||
@JsonProperty("answer")
|
|
||||||
private Boolean answer = false;
|
|
||||||
|
|
||||||
// 题目选项描述
|
|
||||||
@JsonProperty("description")
|
|
||||||
private String questionOptionDescription;
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
/***********************************************************
|
|
||||||
* @Description : 前端创建问题时的下拉列表选择
|
|
||||||
* @author : 梁山广(Laing Shan Guang)
|
|
||||||
* @date : 2019-06-03 07:35
|
|
||||||
* @email : liangshanguang2@gmail.com
|
|
||||||
***********************************************************/
|
|
||||||
package lsgwr.exam.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import lsgwr.exam.entity.QuestionCategory;
|
|
||||||
import lsgwr.exam.entity.QuestionLevel;
|
|
||||||
import lsgwr.exam.entity.QuestionType;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class QuestionSelectionVo {
|
|
||||||
// 问题类型列表
|
|
||||||
@JsonProperty("types")
|
|
||||||
private List<QuestionType> questionTypeList;
|
|
||||||
|
|
||||||
// 问题类别列表
|
|
||||||
@JsonProperty("categories")
|
|
||||||
private List<QuestionCategory> questionCategoryList;
|
|
||||||
|
|
||||||
// 问题等级列表
|
|
||||||
@JsonProperty("levels")
|
|
||||||
private List<QuestionLevel> questionLevelList;
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue