111
This commit is contained in:
1 parent
81eca8933a
commit
345f906c35
540 files changed
+494222
-90
No files matched your search
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.luqj.exam.mapper.ExamPaperStrategyListMapper">
|
||||
|
||||
<resultMap type="ExamPaperStrategyList" id="ExamPaperStrategyListResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="examPaperStrategyId" column="exam_paper_strategy_id" />
|
||||
<result property="questionType" column="question_type" />
|
||||
<result property="difficulty" column="difficulty" />
|
||||
<result property="score" column="score" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="count" column="count" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamPaperStrategyListVo">
|
||||
select id, exam_paper_strategy_id, question_type, difficulty, score, create_time, count, creator_id from exam_paper_strategy_list
|
||||
</sql>
|
||||
|
||||
<select id="selectExamPaperStrategyListList" parameterType="ExamPaperStrategyList" resultMap="ExamPaperStrategyListResult">
|
||||
<include refid="selectExamPaperStrategyListVo"/>
|
||||
<where>
|
||||
<if test="examPaperStrategyId != null "> and exam_paper_strategy_id = #{examPaperStrategyId}</if>
|
||||
<if test="questionType != null "> and question_type = #{questionType}</if>
|
||||
<if test="difficulty != null "> and difficulty = #{difficulty}</if>
|
||||
<if test="score != null "> and score = #{score}</if>
|
||||
<if test="count != null "> and count = #{count}</if>
|
||||
<if test="creatorId != null and creatorId != ''"> and creator_id = #{creatorId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExamPaperStrategyListById" parameterType="Long" resultMap="ExamPaperStrategyListResult">
|
||||
<include refid="selectExamPaperStrategyListVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamPaperStrategyList" parameterType="ExamPaperStrategyList" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_paper_strategy_list
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="examPaperStrategyId != null">exam_paper_strategy_id,</if>
|
||||
<if test="questionType != null">question_type,</if>
|
||||
<if test="difficulty != null">difficulty,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="count != null">count,</if>
|
||||
<if test="creatorId != null">creator_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="examPaperStrategyId != null">#{examPaperStrategyId},</if>
|
||||
<if test="questionType != null">#{questionType},</if>
|
||||
<if test="difficulty != null">#{difficulty},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="count != null">#{count},</if>
|
||||
<if test="creatorId != null">#{creatorId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamPaperStrategyList" parameterType="ExamPaperStrategyList">
|
||||
update exam_paper_strategy_list
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="examPaperStrategyId != null">exam_paper_strategy_id = #{examPaperStrategyId},</if>
|
||||
<if test="questionType != null">question_type = #{questionType},</if>
|
||||
<if test="difficulty != null">difficulty = #{difficulty},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="count != null">count = #{count},</if>
|
||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamPaperStrategyListById" parameterType="Long">
|
||||
delete from exam_paper_strategy_list where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamPaperStrategyListByIds" parameterType="String">
|
||||
delete from exam_paper_strategy_list where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user