|
|
@@ -4,9 +4,10 @@
|
|
|
<resultMap id="BaseResultMap" type="vip.xiaonuo.exam.domain.CourseChapterPaper">
|
|
|
<result column="CHAPTER_ID" jdbcType="VARCHAR" property="chapterId" />
|
|
|
<result column="PAPER_ID" jdbcType="VARCHAR" property="paperId" />
|
|
|
+ <result column="TYPE" jdbcType="VARCHAR" property="type" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- CHAPTER_ID, PAPER_ID
|
|
|
+ CHAPTER_ID, PAPER_ID, TYPE
|
|
|
</sql>
|
|
|
<select id="queryList" resultMap="BaseResultMap" parameterType="vip.xiaonuo.exam.domain.CourseChapterPaper">
|
|
|
select
|
|
|
@@ -19,10 +20,13 @@
|
|
|
<if test="paperId != null">
|
|
|
and PAPER_ID = #{paperId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="type != null">
|
|
|
+ and TYPE = #{type,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
<insert id="add" parameterType="vip.xiaonuo.exam.domain.CourseChapterPaper">
|
|
|
- insert into COURSE_CHAPTER_PAPER (CHAPTER_ID, PAPER_ID)
|
|
|
- values (#{chapterId,jdbcType=VARCHAR}, #{paperId,jdbcType=VARCHAR})
|
|
|
+ insert into COURSE_CHAPTER_PAPER (CHAPTER_ID, PAPER_ID, TYPE)
|
|
|
+ values (#{chapterId,jdbcType=VARCHAR}, #{paperId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<delete id="delete" parameterType="vip.xiaonuo.exam.domain.CourseChapterPaper">
|
|
|
delete from COURSE_CHAPTER_PAPER
|
|
|
@@ -33,5 +37,8 @@
|
|
|
<if test="paperId != null">
|
|
|
and PAPER_ID = #{paperId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="type != null">
|
|
|
+ and TYPE = #{type,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
</mapper>
|