Pārlūkot izejas kodu

试题增加题库类型

zhaosongshan 7 mēneši atpakaļ
vecāks
revīzija
7a7f25f7e0

+ 16 - 3
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/mapper/mapping/QuestionMapper.xml

@@ -12,12 +12,13 @@
     <result column="info_text_content_id" jdbcType="INTEGER" property="infoTextContentId" />
     <result column="create_user" jdbcType="INTEGER" property="createUser" />
     <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="bank_type" jdbcType="VARCHAR" property="bankType" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="deleted" jdbcType="BIT" property="deleted" />
   </resultMap>
   <sql id="Base_Column_List">
     id, question_type, subject_id, score, grade_level, difficult, correct, info_text_content_id,
-    create_user, status, create_time, deleted
+    create_user, status, bank_type, create_time, deleted
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -33,12 +34,12 @@
     insert into t_question (id, question_type, subject_id,
       score, grade_level, difficult,
       correct, info_text_content_id, create_user,
-      status, create_time, deleted
+      status, bank_type, create_time, deleted
       )
     values (#{id,jdbcType=INTEGER}, #{questionType,jdbcType=INTEGER}, #{subjectId,jdbcType=INTEGER},
       #{score,jdbcType=INTEGER}, #{gradeLevel,jdbcType=INTEGER}, #{difficult,jdbcType=INTEGER},
       #{correct,jdbcType=VARCHAR}, #{infoTextContentId,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER},
-      #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}
+      #{status,jdbcType=INTEGER}, #{bankType,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}
       )
   </insert>
   <insert id="insertSelective" parameterType="vip.xiaonuo.exam.domain.Question" useGeneratedKeys="true" keyProperty="id">
@@ -74,6 +75,9 @@
       <if test="status != null">
         status,
       </if>
+      <if test="bankType != null">
+        bank_type,
+      </if>
       <if test="createTime != null">
         create_time,
       </if>
@@ -112,6 +116,9 @@
       <if test="status != null">
         #{status,jdbcType=INTEGER},
       </if>
+      <if test="bankType != null">
+        #{bankType,jdbcType=VARCHAR},
+      </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -150,6 +157,9 @@
       <if test="status != null">
         status = #{status,jdbcType=INTEGER},
       </if>
+      <if test="bankType != null">
+        bank_type = #{bankType,jdbcType=VARCHAR},
+      </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -170,6 +180,9 @@
       info_text_content_id = #{infoTextContentId,jdbcType=INTEGER},
       create_user = #{createUser,jdbcType=INTEGER},
       status = #{status,jdbcType=INTEGER},
+    <if test="bankType != null">
+      bank_type = #{bankType,jdbcType=VARCHAR},
+    </if>
       create_time = #{createTime,jdbcType=TIMESTAMP},
       deleted = #{deleted,jdbcType=BIT}
     where id = #{id,jdbcType=INTEGER}