|
|
|
@ -1,322 +1,373 @@
|
|
|
|
|
<?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.sztzjy.financial_bigdata.mapper.SysCaseQuestionStepMapper">
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
|
|
|
|
<id column="case_step_id" jdbcType="VARCHAR" property="caseStepId"/>
|
|
|
|
|
<result column="case_id" jdbcType="VARCHAR" property="caseId"/>
|
|
|
|
|
<result column="title" jdbcType="VARCHAR" property="title"/>
|
|
|
|
|
<result column="content" jdbcType="VARCHAR" property="content"/>
|
|
|
|
|
<result column="question" jdbcType="VARCHAR" property="question"/>
|
|
|
|
|
<result column="answer" jdbcType="VARCHAR" property="answer"/>
|
|
|
|
|
<result column="content_original" jdbcType="VARCHAR" property="contentOriginal"/>
|
|
|
|
|
<result column="question_original" jdbcType="VARCHAR" property="questionOriginal"/>
|
|
|
|
|
<result column="answer_original" jdbcType="VARCHAR" property="answerOriginal"/>
|
|
|
|
|
<result column="sort" jdbcType="INTEGER" property="sort"/>
|
|
|
|
|
<result column="score" jdbcType="DECIMAL" property="score"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Example_Where_Clause">
|
|
|
|
|
<where>
|
|
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
|
|
<if test="criteria.valid">
|
|
|
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="criterion.noValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.singleValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.betweenValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
|
separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
|
</choose>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Update_By_Example_Where_Clause">
|
|
|
|
|
<where>
|
|
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
|
|
<if test="criteria.valid">
|
|
|
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="criterion.noValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.singleValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.betweenValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
|
separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
|
</choose>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
</if>
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
|
|
|
|
<id column="case_step_id" jdbcType="VARCHAR" property="caseStepId" />
|
|
|
|
|
<result column="case_id" jdbcType="VARCHAR" property="caseId" />
|
|
|
|
|
<result column="sort" jdbcType="INTEGER" property="sort" />
|
|
|
|
|
<result column="score" jdbcType="DECIMAL" property="score" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepWithBLOBs">
|
|
|
|
|
<result column="title" jdbcType="LONGVARCHAR" property="title" />
|
|
|
|
|
<result column="content" jdbcType="LONGVARCHAR" property="content" />
|
|
|
|
|
<result column="question" jdbcType="LONGVARCHAR" property="question" />
|
|
|
|
|
<result column="answer" jdbcType="LONGVARCHAR" property="answer" />
|
|
|
|
|
<result column="content_original" jdbcType="LONGVARCHAR" property="contentOriginal" />
|
|
|
|
|
<result column="question_original" jdbcType="LONGVARCHAR" property="questionOriginal" />
|
|
|
|
|
<result column="answer_original" jdbcType="LONGVARCHAR" property="answerOriginal" />
|
|
|
|
|
<result column="practice_answer" jdbcType="LONGVARCHAR" property="practiceAnswer" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Example_Where_Clause">
|
|
|
|
|
<where>
|
|
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
|
|
<if test="criteria.valid">
|
|
|
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="criterion.noValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.singleValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.betweenValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
|
</choose>
|
|
|
|
|
</foreach>
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
case_step_id
|
|
|
|
|
, case_id, title, content, question, answer, content_original, question_original,
|
|
|
|
|
answer_original, sort, score
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample"
|
|
|
|
|
resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<if test="distinct">
|
|
|
|
|
distinct
|
|
|
|
|
</if>
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
from sys_case_question_step
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderByClause != null">
|
|
|
|
|
order by ${orderByClause}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
from sys_case_question_step
|
|
|
|
|
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
|
delete
|
|
|
|
|
from sys_case_question_step
|
|
|
|
|
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
|
|
|
|
</delete>
|
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample">
|
|
|
|
|
delete from sys_case_question_step
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
</delete>
|
|
|
|
|
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
|
|
|
|
insert into sys_case_question_step (case_step_id, case_id, title,
|
|
|
|
|
content, question, answer,
|
|
|
|
|
content_original, question_original, answer_original,
|
|
|
|
|
sort, score)
|
|
|
|
|
values (#{caseStepId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
|
|
|
|
|
#{content,jdbcType=VARCHAR}, #{question,jdbcType=VARCHAR}, #{answer,jdbcType=VARCHAR},
|
|
|
|
|
#{contentOriginal,jdbcType=VARCHAR}, #{questionOriginal,jdbcType=VARCHAR},
|
|
|
|
|
#{answerOriginal,jdbcType=VARCHAR},
|
|
|
|
|
#{sort,jdbcType=INTEGER}, #{score,jdbcType=DECIMAL})
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
|
|
|
|
insert into sys_case_question_step
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="caseStepId != null">
|
|
|
|
|
case_step_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="caseId != null">
|
|
|
|
|
case_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null">
|
|
|
|
|
title,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content != null">
|
|
|
|
|
content,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="question != null">
|
|
|
|
|
question,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="answer != null">
|
|
|
|
|
answer,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="contentOriginal != null">
|
|
|
|
|
content_original,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="questionOriginal != null">
|
|
|
|
|
question_original,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="answerOriginal != null">
|
|
|
|
|
answer_original,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sort != null">
|
|
|
|
|
sort,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="score != null">
|
|
|
|
|
score,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="caseStepId != null">
|
|
|
|
|
#{caseStepId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="caseId != null">
|
|
|
|
|
#{caseId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null">
|
|
|
|
|
#{title,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content != null">
|
|
|
|
|
#{content,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="question != null">
|
|
|
|
|
#{question,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="answer != null">
|
|
|
|
|
#{answer,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="contentOriginal != null">
|
|
|
|
|
#{contentOriginal,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="questionOriginal != null">
|
|
|
|
|
#{questionOriginal,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="answerOriginal != null">
|
|
|
|
|
#{answerOriginal,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sort != null">
|
|
|
|
|
#{sort,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="score != null">
|
|
|
|
|
#{score,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample"
|
|
|
|
|
resultType="java.lang.Long">
|
|
|
|
|
select count(*) from sys_case_question_step
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
|
</trim>
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
|
|
|
update sys_case_question_step
|
|
|
|
|
<set>
|
|
|
|
|
<if test="record.caseStepId != null">
|
|
|
|
|
case_step_id = #{record.caseStepId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.caseId != null">
|
|
|
|
|
case_id = #{record.caseId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.title != null">
|
|
|
|
|
title = #{record.title,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.content != null">
|
|
|
|
|
content = #{record.content,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.question != null">
|
|
|
|
|
question = #{record.question,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.answer != null">
|
|
|
|
|
answer = #{record.answer,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.contentOriginal != null">
|
|
|
|
|
content_original = #{record.contentOriginal,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.questionOriginal != null">
|
|
|
|
|
question_original = #{record.questionOriginal,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.answerOriginal != null">
|
|
|
|
|
answer_original = #{record.answerOriginal,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.sort != null">
|
|
|
|
|
sort = #{record.sort,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.score != null">
|
|
|
|
|
score = #{record.score,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause"/>
|
|
|
|
|
</foreach>
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Update_By_Example_Where_Clause">
|
|
|
|
|
<where>
|
|
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
|
|
<if test="criteria.valid">
|
|
|
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="criterion.noValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.singleValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.betweenValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
|
</choose>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByExample" parameterType="map">
|
|
|
|
|
update sys_case_question_step
|
|
|
|
|
set case_step_id = #{record.caseStepId,jdbcType=VARCHAR},
|
|
|
|
|
</foreach>
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
case_step_id, case_id, sort, score
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Blob_Column_List">
|
|
|
|
|
title, content, question, answer, content_original, question_original, answer_original,
|
|
|
|
|
practice_answer
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample" resultMap="ResultMapWithBLOBs">
|
|
|
|
|
select
|
|
|
|
|
<if test="distinct">
|
|
|
|
|
distinct
|
|
|
|
|
</if>
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
,
|
|
|
|
|
<include refid="Blob_Column_List" />
|
|
|
|
|
from sys_case_question_step
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderByClause != null">
|
|
|
|
|
order by ${orderByClause}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<if test="distinct">
|
|
|
|
|
distinct
|
|
|
|
|
</if>
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from sys_case_question_step
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderByClause != null">
|
|
|
|
|
order by ${orderByClause}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
,
|
|
|
|
|
<include refid="Blob_Column_List" />
|
|
|
|
|
from sys_case_question_step
|
|
|
|
|
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
|
delete from sys_case_question_step
|
|
|
|
|
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
|
|
|
|
</delete>
|
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample">
|
|
|
|
|
delete from sys_case_question_step
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</delete>
|
|
|
|
|
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepWithBLOBs">
|
|
|
|
|
insert into sys_case_question_step (case_step_id, case_id, sort,
|
|
|
|
|
score, title, content,
|
|
|
|
|
question, answer, content_original,
|
|
|
|
|
question_original, answer_original,
|
|
|
|
|
practice_answer)
|
|
|
|
|
values (#{caseStepId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
|
|
|
|
|
#{score,jdbcType=DECIMAL}, #{title,jdbcType=LONGVARCHAR}, #{content,jdbcType=LONGVARCHAR},
|
|
|
|
|
#{question,jdbcType=LONGVARCHAR}, #{answer,jdbcType=LONGVARCHAR}, #{contentOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
#{questionOriginal,jdbcType=LONGVARCHAR}, #{answerOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
#{practiceAnswer,jdbcType=LONGVARCHAR})
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepWithBLOBs">
|
|
|
|
|
insert into sys_case_question_step
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="caseStepId != null">
|
|
|
|
|
case_step_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="caseId != null">
|
|
|
|
|
case_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sort != null">
|
|
|
|
|
sort,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="score != null">
|
|
|
|
|
score,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null">
|
|
|
|
|
title,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content != null">
|
|
|
|
|
content,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="question != null">
|
|
|
|
|
question,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="answer != null">
|
|
|
|
|
answer,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="contentOriginal != null">
|
|
|
|
|
content_original,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="questionOriginal != null">
|
|
|
|
|
question_original,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="answerOriginal != null">
|
|
|
|
|
answer_original,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="practiceAnswer != null">
|
|
|
|
|
practice_answer,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="caseStepId != null">
|
|
|
|
|
#{caseStepId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="caseId != null">
|
|
|
|
|
#{caseId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sort != null">
|
|
|
|
|
#{sort,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="score != null">
|
|
|
|
|
#{score,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null">
|
|
|
|
|
#{title,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content != null">
|
|
|
|
|
#{content,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="question != null">
|
|
|
|
|
#{question,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="answer != null">
|
|
|
|
|
#{answer,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="contentOriginal != null">
|
|
|
|
|
#{contentOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="questionOriginal != null">
|
|
|
|
|
#{questionOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="answerOriginal != null">
|
|
|
|
|
#{answerOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="practiceAnswer != null">
|
|
|
|
|
#{practiceAnswer,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample" resultType="java.lang.Long">
|
|
|
|
|
select count(*) from sys_case_question_step
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
|
|
|
update sys_case_question_step
|
|
|
|
|
<set>
|
|
|
|
|
<if test="record.caseStepId != null">
|
|
|
|
|
case_step_id = #{record.caseStepId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.caseId != null">
|
|
|
|
|
case_id = #{record.caseId,jdbcType=VARCHAR},
|
|
|
|
|
title = #{record.title,jdbcType=VARCHAR},
|
|
|
|
|
content = #{record.content,jdbcType=VARCHAR},
|
|
|
|
|
question = #{record.question,jdbcType=VARCHAR},
|
|
|
|
|
answer = #{record.answer,jdbcType=VARCHAR},
|
|
|
|
|
content_original = #{record.contentOriginal,jdbcType=VARCHAR},
|
|
|
|
|
question_original = #{record.questionOriginal,jdbcType=VARCHAR},
|
|
|
|
|
answer_original = #{record.answerOriginal,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.sort != null">
|
|
|
|
|
sort = #{record.sort,jdbcType=INTEGER},
|
|
|
|
|
score = #{record.score,jdbcType=DECIMAL}
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
|
|
|
|
update sys_case_question_step
|
|
|
|
|
<set>
|
|
|
|
|
<if test="caseId != null">
|
|
|
|
|
case_id = #{caseId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null">
|
|
|
|
|
title = #{title,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content != null">
|
|
|
|
|
content = #{content,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="question != null">
|
|
|
|
|
question = #{question,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="answer != null">
|
|
|
|
|
answer = #{answer,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="contentOriginal != null">
|
|
|
|
|
content_original = #{contentOriginal,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="questionOriginal != null">
|
|
|
|
|
question_original = #{questionOriginal,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="answerOriginal != null">
|
|
|
|
|
answer_original = #{answerOriginal,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sort != null">
|
|
|
|
|
sort = #{sort,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="score != null">
|
|
|
|
|
score = #{score,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
|
|
|
|
update sys_case_question_step
|
|
|
|
|
set case_id = #{caseId,jdbcType=VARCHAR},
|
|
|
|
|
title = #{title,jdbcType=VARCHAR},
|
|
|
|
|
content = #{content,jdbcType=VARCHAR},
|
|
|
|
|
question = #{question,jdbcType=VARCHAR},
|
|
|
|
|
answer = #{answer,jdbcType=VARCHAR},
|
|
|
|
|
content_original = #{contentOriginal,jdbcType=VARCHAR},
|
|
|
|
|
question_original = #{questionOriginal,jdbcType=VARCHAR},
|
|
|
|
|
answer_original = #{answerOriginal,jdbcType=VARCHAR},
|
|
|
|
|
sort = #{sort,jdbcType=INTEGER},
|
|
|
|
|
score = #{score,jdbcType=DECIMAL}
|
|
|
|
|
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
|
|
|
|
</update>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.score != null">
|
|
|
|
|
score = #{record.score,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.title != null">
|
|
|
|
|
title = #{record.title,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.content != null">
|
|
|
|
|
content = #{record.content,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.question != null">
|
|
|
|
|
question = #{record.question,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.answer != null">
|
|
|
|
|
answer = #{record.answer,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.contentOriginal != null">
|
|
|
|
|
content_original = #{record.contentOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.questionOriginal != null">
|
|
|
|
|
question_original = #{record.questionOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.answerOriginal != null">
|
|
|
|
|
answer_original = #{record.answerOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.practiceAnswer != null">
|
|
|
|
|
practice_answer = #{record.practiceAnswer,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
|
|
|
|
update sys_case_question_step
|
|
|
|
|
set case_step_id = #{record.caseStepId,jdbcType=VARCHAR},
|
|
|
|
|
case_id = #{record.caseId,jdbcType=VARCHAR},
|
|
|
|
|
sort = #{record.sort,jdbcType=INTEGER},
|
|
|
|
|
score = #{record.score,jdbcType=DECIMAL},
|
|
|
|
|
title = #{record.title,jdbcType=LONGVARCHAR},
|
|
|
|
|
content = #{record.content,jdbcType=LONGVARCHAR},
|
|
|
|
|
question = #{record.question,jdbcType=LONGVARCHAR},
|
|
|
|
|
answer = #{record.answer,jdbcType=LONGVARCHAR},
|
|
|
|
|
content_original = #{record.contentOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
question_original = #{record.questionOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
answer_original = #{record.answerOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
practice_answer = #{record.practiceAnswer,jdbcType=LONGVARCHAR}
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByExample" parameterType="map">
|
|
|
|
|
update sys_case_question_step
|
|
|
|
|
set case_step_id = #{record.caseStepId,jdbcType=VARCHAR},
|
|
|
|
|
case_id = #{record.caseId,jdbcType=VARCHAR},
|
|
|
|
|
sort = #{record.sort,jdbcType=INTEGER},
|
|
|
|
|
score = #{record.score,jdbcType=DECIMAL}
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepWithBLOBs">
|
|
|
|
|
update sys_case_question_step
|
|
|
|
|
<set>
|
|
|
|
|
<if test="caseId != null">
|
|
|
|
|
case_id = #{caseId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sort != null">
|
|
|
|
|
sort = #{sort,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="score != null">
|
|
|
|
|
score = #{score,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null">
|
|
|
|
|
title = #{title,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content != null">
|
|
|
|
|
content = #{content,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="question != null">
|
|
|
|
|
question = #{question,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="answer != null">
|
|
|
|
|
answer = #{answer,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="contentOriginal != null">
|
|
|
|
|
content_original = #{contentOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="questionOriginal != null">
|
|
|
|
|
question_original = #{questionOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="answerOriginal != null">
|
|
|
|
|
answer_original = #{answerOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="practiceAnswer != null">
|
|
|
|
|
practice_answer = #{practiceAnswer,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepWithBLOBs">
|
|
|
|
|
update sys_case_question_step
|
|
|
|
|
set case_id = #{caseId,jdbcType=VARCHAR},
|
|
|
|
|
sort = #{sort,jdbcType=INTEGER},
|
|
|
|
|
score = #{score,jdbcType=DECIMAL},
|
|
|
|
|
title = #{title,jdbcType=LONGVARCHAR},
|
|
|
|
|
content = #{content,jdbcType=LONGVARCHAR},
|
|
|
|
|
question = #{question,jdbcType=LONGVARCHAR},
|
|
|
|
|
answer = #{answer,jdbcType=LONGVARCHAR},
|
|
|
|
|
content_original = #{contentOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
question_original = #{questionOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
answer_original = #{answerOriginal,jdbcType=LONGVARCHAR},
|
|
|
|
|
practice_answer = #{practiceAnswer,jdbcType=LONGVARCHAR}
|
|
|
|
|
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
|
|
|
|
update sys_case_question_step
|
|
|
|
|
set case_id = #{caseId,jdbcType=VARCHAR},
|
|
|
|
|
sort = #{sort,jdbcType=INTEGER},
|
|
|
|
|
score = #{score,jdbcType=DECIMAL}
|
|
|
|
|
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="DtoMap" type="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
|
|
|
|
<result column="title" jdbcType="VARCHAR" property="title"/>
|
|
|
|
|
<result column="chapter_name" jdbcType="VARCHAR" property="questionOriginal"/>
|
|
|
|
|
<result column="step_count" jdbcType="VARCHAR" property="contentOriginal"/>
|
|
|
|
|
<result column="content" jdbcType="VARCHAR" property="questionOriginal"/>
|
|
|
|
|
<result column="answer_original" jdbcType="VARCHAR" property="answerOriginal"/>
|
|
|
|
|
<result column="title" jdbcType="VARCHAR" property="title" />
|
|
|
|
|
<result column="chapter_name" jdbcType="VARCHAR" property="questionOriginal" />
|
|
|
|
|
<result column="step_count" jdbcType="VARCHAR" property="contentOriginal" />
|
|
|
|
|
<result column="content" jdbcType="VARCHAR" property="questionOriginal" />
|
|
|
|
|
<result column="answer_original" jdbcType="VARCHAR" property="answerOriginal" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<select id="getGradeReportCase" parameterType="java.util.List" resultMap="DtoMap">
|
|
|
|
|
SELECT s2.title, s3.chapter_name, COUNT(*) AS step_count
|
|
|
|
@ -324,7 +375,7 @@
|
|
|
|
|
JOIN sys_case_question s2 ON s1.case_id = s2.case_id
|
|
|
|
|
JOIN sys_course_chapter s3 ON s2.chapter_id = s3.chapter_id
|
|
|
|
|
WHERE s2.case_id IN
|
|
|
|
|
<foreach collection="list" separator="," item="id" open="(" close=")">
|
|
|
|
|
<foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
GROUP BY s2.title, s3.chapter_name
|
|
|
|
|