From 5cd15844ea0017f2b42fafbe59fd35d943df2230 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Sat, 17 Jul 2021 10:19:11 +0800
Subject: [PATCH] 选项屏蔽正确答案,返回时间

---
 src/main/java/org/springblade/modules/exam/controller/ExamPaperController.java |   15 +++++++++++++++
 src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml |   16 +++++++++++++++-
 2 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/src/main/java/org/springblade/modules/exam/controller/ExamPaperController.java b/src/main/java/org/springblade/modules/exam/controller/ExamPaperController.java
index 0fe5fa3..70592d3 100644
--- a/src/main/java/org/springblade/modules/exam/controller/ExamPaperController.java
+++ b/src/main/java/org/springblade/modules/exam/controller/ExamPaperController.java
@@ -34,6 +34,8 @@
 import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.Map;
 
 /**
@@ -135,4 +137,17 @@
 		return R.data(subject);
 	}
 
+	/**
+	 * 返回当前时间
+	 */
+	@GetMapping("/getdate")
+	@ApiOperationSupport(order = 9)
+	public R getdate() {
+		Date date = new Date();
+		String strDateFormat = "yyyy-MM-dd HH:mm:ss";
+		SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
+		System.out.println(sdf.format(date));
+		return R.data(sdf.format(date));
+	}
+
 }
diff --git a/src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml b/src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml
index 73b194a..949e72c 100644
--- a/src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml
+++ b/src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml
@@ -20,8 +20,22 @@
 
 
     <!--ExamSubjectChoicesInfoMap 多表联查 一对多查询 -->
-    <resultMap id="ExamSubjectChoicesInfoMap" type="org.springblade.modules.exam.vo.ExamSubjectChoicesVO" autoMapping="true">
+    <resultMap id="ExamSubjectChoicesInfoMap" type="org.springblade.modules.exam.vo.ExamSubjectChoicesVO">
         <id property="id" column="id"/>
+        <id property="categoryId" column="category_id"/>
+        <id property="subjectName" column="subject_name"/>
+        <id property="choicesType" column="choices_type"/>
+        <id property="score" column="score"/>
+        <id property="analysis" column="analysis"/>
+        <id property="level" column="level"/>
+        <id property="creator" column="creator"/>
+        <id property="createDate" column="create_date"/>
+        <id property="modifier" column="modifier"/>
+        <id property="modifyDate" column="modify_date"/>
+        <id property="delFlag" column="del_flag"/>
+        <id property="applicationCode" column="application_code"/>
+        <id property="tenantCode" column="tenant_code"/>
+        <result column="id" property="id"/>
         <collection property="examSubjectOptions" javaType="java.util.List" ofType="org.springblade.modules.exam.entity.ExamSubjectOption" autoMapping="true">
             <id property="id" column="eso_id"/>
         </collection>

--
Gitblit v1.9.3