zengh
2021-07-17 5cd15844ea0017f2b42fafbe59fd35d943df2230
选项屏蔽正确答案,返回时间
2 files modified
31 ■■■■■ changed files
src/main/java/org/springblade/modules/exam/controller/ExamPaperController.java 15 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml 16 ●●●●● patch | view | raw | blame | history
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));
    }
}
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>