|
|
|
@ -38,7 +38,8 @@
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
|
separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
@ -67,7 +68,8 @@
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
|
separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
@ -79,11 +81,13 @@
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
objective_id, course_id, course_name, chapter_id, chapter_name, input_type, type,
|
|
|
|
|
objective_id
|
|
|
|
|
, course_id, course_name, chapter_id, chapter_name, input_type, type,
|
|
|
|
|
score, content, question_a, question_b, question_c, question_d, question_e, answer,
|
|
|
|
|
analysis, school_id
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysObjectiveQuestionExample" resultMap="BaseResultMap">
|
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysObjectiveQuestionExample"
|
|
|
|
|
resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<if test="distinct">
|
|
|
|
|
distinct
|
|
|
|
@ -104,7 +108,8 @@
|
|
|
|
|
where objective_id = #{objectiveId,jdbcType=VARCHAR}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
|
delete from sys_objective_question
|
|
|
|
|
delete
|
|
|
|
|
from sys_objective_question
|
|
|
|
|
where objective_id = #{objectiveId,jdbcType=VARCHAR}
|
|
|
|
|
</delete>
|
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysObjectiveQuestionExample">
|
|
|
|
@ -236,7 +241,8 @@
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysObjectiveQuestionExample" resultType="java.lang.Long">
|
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysObjectiveQuestionExample"
|
|
|
|
|
resultType="java.lang.Long">
|
|
|
|
|
select count(*) from sys_objective_question
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
@ -400,13 +406,25 @@
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<select id="selectRandomObjective" parameterType="map" resultMap="BaseResultMap">
|
|
|
|
|
SELECT
|
|
|
|
|
objective_id, course_id, course_name, chapter_id, chapter_name, input_type, type,
|
|
|
|
|
score, content, question_a, question_b, question_c, question_d, question_e, answer, school_id
|
|
|
|
|
SELECT objective_id,
|
|
|
|
|
course_id,
|
|
|
|
|
course_name,
|
|
|
|
|
chapter_id,
|
|
|
|
|
chapter_name,
|
|
|
|
|
input_type,
|
|
|
|
|
type,
|
|
|
|
|
score,
|
|
|
|
|
content,
|
|
|
|
|
question_a,
|
|
|
|
|
question_b,
|
|
|
|
|
question_c,
|
|
|
|
|
question_d,
|
|
|
|
|
question_e,
|
|
|
|
|
answer,
|
|
|
|
|
school_id
|
|
|
|
|
FROM sys_objective_question
|
|
|
|
|
WHERE chapter_id = #{chapterId,jdbcType=VARCHAR}
|
|
|
|
|
ORDER BY RAND()
|
|
|
|
|
LIMIT 10
|
|
|
|
|
ORDER BY RAND() LIMIT 10
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -459,4 +477,19 @@
|
|
|
|
|
</foreach>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectByList" parameterType="java.util.List" resultType="java.util.Map">
|
|
|
|
|
SELECT count(*),sum(score)FROM sys_objective_question
|
|
|
|
|
WHERE objective_id IN
|
|
|
|
|
<foreach collection="list" separator="," item="id" open="(" close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectObjectivityByType" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
SELECT objective_id,content,chapter_name,course_name FROM sys_objective_question
|
|
|
|
|
WHERE school_id IN(#{schoolId},'999999999')
|
|
|
|
|
AND type = #{type}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|