瀏覽代碼

课程题库新增子分类

Long 1 月之前
父節點
當前提交
3895ed3746

+ 1 - 0
fs-service-system/src/main/java/com/fs/course/domain/FsCourseQuestionBank.java

@@ -42,4 +42,5 @@ public class FsCourseQuestionBank extends BaseEntity
     @Excel(name = "答案")
     private String answer;
     private Long questionType;
+    private Long questionSubType;
 }

+ 6 - 1
fs-service-system/src/main/resources/mapper/course/FsCourseQuestionBankMapper.xml

@@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="answer"    column="answer"    />
         <result property="createBy"    column="create_by"    />
         <result property="questionType"    column="question_type"    />
+        <result property="questionSubType"    column="question_sub_type"    />
     </resultMap>
 
     <sql id="selectFsCourseQuestionBankVo">
-        select id, title, sort, type, status,question_type, question, create_time, answer, create_by from fs_course_question_bank
+        select id, title, sort, type, status,question_type, question_sub_type, question, create_time, answer, create_by from fs_course_question_bank
     </sql>
 
     <select id="selectFsCourseQuestionBankList" parameterType="FsCourseQuestionBank" resultMap="FsCourseQuestionBankResult">
@@ -28,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="sort != null "> and sort = #{sort}</if>
             <if test="type != null "> and type = #{type}</if>
             <if test="questionType != null "> and question_type = #{questionType}</if>
+            <if test="questionSubType != null "> and question_sub_type = #{questionSubType}</if>
             <if test="status != null "> and status = #{status}</if>
             <if test="question != null  and question != ''"> and question = #{question}</if>
             <if test="answer != null  and answer != ''"> and answer = #{answer}</if>
@@ -52,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="answer != null">answer,</if>
             <if test="createBy != null">create_by,</if>
             <if test="questionType != null">question_type,</if>
+            <if test="questionSubType != null">question_sub_type,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="title != null">#{title},</if>
@@ -63,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="answer != null">#{answer},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="questionType != null">#{questionType},</if>
+            <if test="questionSubType != null">#{questionSubType},</if>
          </trim>
     </insert>
 
@@ -78,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="answer != null">answer = #{answer},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="questionType != null">question_type = #{questionType},</if>
+            <if test="questionSubType != null">question_sub_type = #{questionSubType},</if>
         </trim>
         where id = #{id}
     </update>