自动生成配置文件和mapper xml
parent
b771b1e3cf
commit
6a73e7b149
@ -1,307 +1,333 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!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">
|
<mapper namespace="com.sztzjy.financial_bigdata.mapper.SysCaseQuestionStepMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
<resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
||||||
<id column="case_step_id" jdbcType="VARCHAR" property="caseStepId" />
|
<id column="case_step_id" jdbcType="VARCHAR" property="caseStepId"/>
|
||||||
<result column="case_id" jdbcType="VARCHAR" property="caseId" />
|
<result column="case_id" jdbcType="VARCHAR" property="caseId"/>
|
||||||
<result column="title" jdbcType="VARCHAR" property="title" />
|
<result column="title" jdbcType="VARCHAR" property="title"/>
|
||||||
<result column="content" jdbcType="VARCHAR" property="content" />
|
<result column="content" jdbcType="VARCHAR" property="content"/>
|
||||||
<result column="question" jdbcType="VARCHAR" property="question" />
|
<result column="question" jdbcType="VARCHAR" property="question"/>
|
||||||
<result column="answer" jdbcType="VARCHAR" property="answer" />
|
<result column="answer" jdbcType="VARCHAR" property="answer"/>
|
||||||
<result column="content_original" jdbcType="VARCHAR" property="contentOriginal" />
|
<result column="content_original" jdbcType="VARCHAR" property="contentOriginal"/>
|
||||||
<result column="question_original" jdbcType="VARCHAR" property="questionOriginal" />
|
<result column="question_original" jdbcType="VARCHAR" property="questionOriginal"/>
|
||||||
<result column="answer_original" jdbcType="VARCHAR" property="answerOriginal" />
|
<result column="answer_original" jdbcType="VARCHAR" property="answerOriginal"/>
|
||||||
<result column="sort" jdbcType="INTEGER" property="sort" />
|
<result column="sort" jdbcType="INTEGER" property="sort"/>
|
||||||
<result column="score" jdbcType="DECIMAL" property="score" />
|
<result column="score" jdbcType="DECIMAL" property="score"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
<if test="criteria.valid">
|
<if test="criteria.valid">
|
||||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
<foreach collection="criteria.criteria" item="criterion">
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="criterion.noValue">
|
<when test="criterion.noValue">
|
||||||
and ${criterion.condition}
|
and ${criterion.condition}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.singleValue">
|
<when test="criterion.singleValue">
|
||||||
and ${criterion.condition} #{criterion.value}
|
and ${criterion.condition} #{criterion.value}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.betweenValue">
|
<when test="criterion.betweenValue">
|
||||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.listValue">
|
<when test="criterion.listValue">
|
||||||
and ${criterion.condition}
|
and ${criterion.condition}
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||||
#{listItem}
|
separator=",">
|
||||||
</foreach>
|
#{listItem}
|
||||||
</when>
|
</foreach>
|
||||||
</choose>
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</where>
|
||||||
</if>
|
</sql>
|
||||||
</foreach>
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
</where>
|
<where>
|
||||||
</sql>
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
<sql id="Update_By_Example_Where_Clause">
|
<if test="criteria.valid">
|
||||||
<where>
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
<if test="criteria.valid">
|
<choose>
|
||||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
<when test="criterion.noValue">
|
||||||
<foreach collection="criteria.criteria" item="criterion">
|
and ${criterion.condition}
|
||||||
<choose>
|
</when>
|
||||||
<when test="criterion.noValue">
|
<when test="criterion.singleValue">
|
||||||
and ${criterion.condition}
|
and ${criterion.condition} #{criterion.value}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.singleValue">
|
<when test="criterion.betweenValue">
|
||||||
and ${criterion.condition} #{criterion.value}
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
</when>
|
</when>
|
||||||
<when test="criterion.betweenValue">
|
<when test="criterion.listValue">
|
||||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
and ${criterion.condition}
|
||||||
</when>
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||||
<when test="criterion.listValue">
|
separator=",">
|
||||||
and ${criterion.condition}
|
#{listItem}
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
</foreach>
|
||||||
#{listItem}
|
</when>
|
||||||
</foreach>
|
</choose>
|
||||||
</when>
|
</foreach>
|
||||||
</choose>
|
</trim>
|
||||||
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</where>
|
||||||
</if>
|
</sql>
|
||||||
</foreach>
|
<sql id="Base_Column_List">
|
||||||
</where>
|
case_step_id
|
||||||
</sql>
|
, case_id, title, content, question, answer, content_original, question_original,
|
||||||
<sql id="Base_Column_List">
|
|
||||||
case_step_id, case_id, title, content, question, answer, content_original, question_original,
|
|
||||||
answer_original, sort, score
|
answer_original, sort, score
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample"
|
||||||
select
|
resultMap="BaseResultMap">
|
||||||
<if test="distinct">
|
select
|
||||||
distinct
|
<if test="distinct">
|
||||||
</if>
|
distinct
|
||||||
<include refid="Base_Column_List" />
|
</if>
|
||||||
from sys_case_question_step
|
<include refid="Base_Column_List"/>
|
||||||
<if test="_parameter != null">
|
from sys_case_question_step
|
||||||
<include refid="Example_Where_Clause" />
|
<if test="_parameter != null">
|
||||||
</if>
|
<include refid="Example_Where_Clause"/>
|
||||||
<if test="orderByClause != null">
|
</if>
|
||||||
order by ${orderByClause}
|
<if test="orderByClause != null">
|
||||||
</if>
|
order by ${orderByClause}
|
||||||
</select>
|
</if>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
</select>
|
||||||
select
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
<include refid="Base_Column_List" />
|
select
|
||||||
from sys_case_question_step
|
<include refid="Base_Column_List"/>
|
||||||
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
from sys_case_question_step
|
||||||
</select>
|
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
</select>
|
||||||
delete from sys_case_question_step
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
delete
|
||||||
</delete>
|
from sys_case_question_step
|
||||||
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample">
|
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
||||||
delete from sys_case_question_step
|
</delete>
|
||||||
<if test="_parameter != null">
|
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample">
|
||||||
<include refid="Example_Where_Clause" />
|
delete from sys_case_question_step
|
||||||
</if>
|
<if test="_parameter != null">
|
||||||
</delete>
|
<include refid="Example_Where_Clause"/>
|
||||||
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
</if>
|
||||||
insert into sys_case_question_step (case_step_id, case_id, title,
|
</delete>
|
||||||
content, question, answer,
|
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
||||||
content_original, question_original, answer_original,
|
insert into sys_case_question_step (case_step_id, case_id, title,
|
||||||
sort, score)
|
content, question, answer,
|
||||||
values (#{caseStepId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
|
content_original, question_original, answer_original,
|
||||||
#{content,jdbcType=VARCHAR}, #{question,jdbcType=VARCHAR}, #{answer,jdbcType=VARCHAR},
|
sort, score)
|
||||||
#{contentOriginal,jdbcType=VARCHAR}, #{questionOriginal,jdbcType=VARCHAR}, #{answerOriginal,jdbcType=VARCHAR},
|
values (#{caseStepId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
|
||||||
#{sort,jdbcType=INTEGER}, #{score,jdbcType=DECIMAL})
|
#{content,jdbcType=VARCHAR}, #{question,jdbcType=VARCHAR}, #{answer,jdbcType=VARCHAR},
|
||||||
</insert>
|
#{contentOriginal,jdbcType=VARCHAR}, #{questionOriginal,jdbcType=VARCHAR},
|
||||||
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
#{answerOriginal,jdbcType=VARCHAR},
|
||||||
insert into sys_case_question_step
|
#{sort,jdbcType=INTEGER}, #{score,jdbcType=DECIMAL})
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
</insert>
|
||||||
<if test="caseStepId != null">
|
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
||||||
case_step_id,
|
insert into sys_case_question_step
|
||||||
</if>
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="caseId != null">
|
<if test="caseStepId != null">
|
||||||
case_id,
|
case_step_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="title != null">
|
<if test="caseId != null">
|
||||||
title,
|
case_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="content != null">
|
<if test="title != null">
|
||||||
content,
|
title,
|
||||||
</if>
|
</if>
|
||||||
<if test="question != null">
|
<if test="content != null">
|
||||||
question,
|
content,
|
||||||
</if>
|
</if>
|
||||||
<if test="answer != null">
|
<if test="question != null">
|
||||||
answer,
|
question,
|
||||||
</if>
|
</if>
|
||||||
<if test="contentOriginal != null">
|
<if test="answer != null">
|
||||||
content_original,
|
answer,
|
||||||
</if>
|
</if>
|
||||||
<if test="questionOriginal != null">
|
<if test="contentOriginal != null">
|
||||||
question_original,
|
content_original,
|
||||||
</if>
|
</if>
|
||||||
<if test="answerOriginal != null">
|
<if test="questionOriginal != null">
|
||||||
answer_original,
|
question_original,
|
||||||
</if>
|
</if>
|
||||||
<if test="sort != null">
|
<if test="answerOriginal != null">
|
||||||
sort,
|
answer_original,
|
||||||
</if>
|
</if>
|
||||||
<if test="score != null">
|
<if test="sort != null">
|
||||||
score,
|
sort,
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
<if test="score != null">
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
score,
|
||||||
<if test="caseStepId != null">
|
</if>
|
||||||
#{caseStepId,jdbcType=VARCHAR},
|
</trim>
|
||||||
</if>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="caseId != null">
|
<if test="caseStepId != null">
|
||||||
#{caseId,jdbcType=VARCHAR},
|
#{caseStepId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="title != null">
|
<if test="caseId != null">
|
||||||
#{title,jdbcType=VARCHAR},
|
#{caseId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="content != null">
|
<if test="title != null">
|
||||||
#{content,jdbcType=VARCHAR},
|
#{title,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="question != null">
|
<if test="content != null">
|
||||||
#{question,jdbcType=VARCHAR},
|
#{content,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="answer != null">
|
<if test="question != null">
|
||||||
#{answer,jdbcType=VARCHAR},
|
#{question,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="contentOriginal != null">
|
<if test="answer != null">
|
||||||
#{contentOriginal,jdbcType=VARCHAR},
|
#{answer,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="questionOriginal != null">
|
<if test="contentOriginal != null">
|
||||||
#{questionOriginal,jdbcType=VARCHAR},
|
#{contentOriginal,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="answerOriginal != null">
|
<if test="questionOriginal != null">
|
||||||
#{answerOriginal,jdbcType=VARCHAR},
|
#{questionOriginal,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="sort != null">
|
<if test="answerOriginal != null">
|
||||||
#{sort,jdbcType=INTEGER},
|
#{answerOriginal,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="score != null">
|
<if test="sort != null">
|
||||||
#{score,jdbcType=DECIMAL},
|
#{sort,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
<if test="score != null">
|
||||||
</insert>
|
#{score,jdbcType=DECIMAL},
|
||||||
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample" resultType="java.lang.Long">
|
</if>
|
||||||
select count(*) from sys_case_question_step
|
</trim>
|
||||||
<if test="_parameter != null">
|
</insert>
|
||||||
<include refid="Example_Where_Clause" />
|
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample"
|
||||||
</if>
|
resultType="java.lang.Long">
|
||||||
</select>
|
select count(*) from sys_case_question_step
|
||||||
<update id="updateByExampleSelective" parameterType="map">
|
<if test="_parameter != null">
|
||||||
update sys_case_question_step
|
<include refid="Example_Where_Clause"/>
|
||||||
<set>
|
</if>
|
||||||
<if test="record.caseStepId != null">
|
</select>
|
||||||
case_step_id = #{record.caseStepId,jdbcType=VARCHAR},
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
</if>
|
update sys_case_question_step
|
||||||
<if test="record.caseId != null">
|
<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"/>
|
||||||
|
</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},
|
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.title != null">
|
|
||||||
title = #{record.title,jdbcType=VARCHAR},
|
title = #{record.title,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.content != null">
|
|
||||||
content = #{record.content,jdbcType=VARCHAR},
|
content = #{record.content,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.question != null">
|
|
||||||
question = #{record.question,jdbcType=VARCHAR},
|
question = #{record.question,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.answer != null">
|
|
||||||
answer = #{record.answer,jdbcType=VARCHAR},
|
answer = #{record.answer,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.contentOriginal != null">
|
|
||||||
content_original = #{record.contentOriginal,jdbcType=VARCHAR},
|
content_original = #{record.contentOriginal,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.questionOriginal != null">
|
|
||||||
question_original = #{record.questionOriginal,jdbcType=VARCHAR},
|
question_original = #{record.questionOriginal,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.answerOriginal != null">
|
|
||||||
answer_original = #{record.answerOriginal,jdbcType=VARCHAR},
|
answer_original = #{record.answerOriginal,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.sort != null">
|
|
||||||
sort = #{record.sort,jdbcType=INTEGER},
|
sort = #{record.sort,jdbcType=INTEGER},
|
||||||
</if>
|
score = #{record.score,jdbcType=DECIMAL}
|
||||||
<if test="record.score != null">
|
<if test="_parameter != null">
|
||||||
score = #{record.score,jdbcType=DECIMAL},
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</update>
|
||||||
<if test="_parameter != null">
|
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
update sys_case_question_step
|
||||||
</if>
|
<set>
|
||||||
</update>
|
<if test="caseId != null">
|
||||||
<update id="updateByExample" parameterType="map">
|
case_id = #{caseId,jdbcType=VARCHAR},
|
||||||
update sys_case_question_step
|
</if>
|
||||||
set case_step_id = #{record.caseStepId,jdbcType=VARCHAR},
|
<if test="title != null">
|
||||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
title = #{title,jdbcType=VARCHAR},
|
||||||
title = #{record.title,jdbcType=VARCHAR},
|
</if>
|
||||||
content = #{record.content,jdbcType=VARCHAR},
|
<if test="content != null">
|
||||||
question = #{record.question,jdbcType=VARCHAR},
|
content = #{content,jdbcType=VARCHAR},
|
||||||
answer = #{record.answer,jdbcType=VARCHAR},
|
</if>
|
||||||
content_original = #{record.contentOriginal,jdbcType=VARCHAR},
|
<if test="question != null">
|
||||||
question_original = #{record.questionOriginal,jdbcType=VARCHAR},
|
question = #{question,jdbcType=VARCHAR},
|
||||||
answer_original = #{record.answerOriginal,jdbcType=VARCHAR},
|
</if>
|
||||||
sort = #{record.sort,jdbcType=INTEGER},
|
<if test="answer != null">
|
||||||
score = #{record.score,jdbcType=DECIMAL}
|
answer = #{answer,jdbcType=VARCHAR},
|
||||||
<if test="_parameter != null">
|
</if>
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<if test="contentOriginal != null">
|
||||||
</if>
|
content_original = #{contentOriginal,jdbcType=VARCHAR},
|
||||||
</update>
|
</if>
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
<if test="questionOriginal != null">
|
||||||
update sys_case_question_step
|
question_original = #{questionOriginal,jdbcType=VARCHAR},
|
||||||
<set>
|
</if>
|
||||||
<if test="caseId != null">
|
<if test="answerOriginal != null">
|
||||||
case_id = #{caseId,jdbcType=VARCHAR},
|
answer_original = #{answerOriginal,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="title != null">
|
<if test="sort != null">
|
||||||
title = #{title,jdbcType=VARCHAR},
|
sort = #{sort,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="content != null">
|
<if test="score != null">
|
||||||
content = #{content,jdbcType=VARCHAR},
|
score = #{score,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
<if test="question != null">
|
</set>
|
||||||
question = #{question,jdbcType=VARCHAR},
|
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
||||||
</if>
|
</update>
|
||||||
<if test="answer != null">
|
<update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
||||||
answer = #{answer,jdbcType=VARCHAR},
|
update sys_case_question_step
|
||||||
</if>
|
set case_id = #{caseId,jdbcType=VARCHAR},
|
||||||
<if test="contentOriginal != null">
|
title = #{title,jdbcType=VARCHAR},
|
||||||
content_original = #{contentOriginal,jdbcType=VARCHAR},
|
content = #{content,jdbcType=VARCHAR},
|
||||||
</if>
|
question = #{question,jdbcType=VARCHAR},
|
||||||
<if test="questionOriginal != null">
|
answer = #{answer,jdbcType=VARCHAR},
|
||||||
question_original = #{questionOriginal,jdbcType=VARCHAR},
|
content_original = #{contentOriginal,jdbcType=VARCHAR},
|
||||||
</if>
|
question_original = #{questionOriginal,jdbcType=VARCHAR},
|
||||||
<if test="answerOriginal != null">
|
answer_original = #{answerOriginal,jdbcType=VARCHAR},
|
||||||
answer_original = #{answerOriginal,jdbcType=VARCHAR},
|
sort = #{sort,jdbcType=INTEGER},
|
||||||
</if>
|
score = #{score,jdbcType=DECIMAL}
|
||||||
<if test="sort != null">
|
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
||||||
sort = #{sort,jdbcType=INTEGER},
|
</update>
|
||||||
</if>
|
|
||||||
<if test="score != null">
|
<resultMap id="DtoMap" type="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
||||||
score = #{score,jdbcType=DECIMAL},
|
<result column="title" jdbcType="VARCHAR" property="title"/>
|
||||||
</if>
|
<result column="chapter_name" jdbcType="VARCHAR" property="questionOriginal"/>
|
||||||
</set>
|
<result column="step_count" jdbcType="VARCHAR" property="contentOriginal"/>
|
||||||
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
<result column="content" jdbcType="VARCHAR" property="questionOriginal"/>
|
||||||
</update>
|
<result column="answer_original" jdbcType="VARCHAR" property="answerOriginal"/>
|
||||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
|
</resultMap>
|
||||||
update sys_case_question_step
|
<select id="getGradeReportCase" parameterType="java.util.List" resultMap="DtoMap">
|
||||||
set case_id = #{caseId,jdbcType=VARCHAR},
|
SELECT s2.title, s3.chapter_name, COUNT(*) AS step_count
|
||||||
title = #{title,jdbcType=VARCHAR},
|
FROM sys_case_question_step s1
|
||||||
content = #{content,jdbcType=VARCHAR},
|
JOIN sys_case_question s2 ON s1.case_id = s2.case_id
|
||||||
question = #{question,jdbcType=VARCHAR},
|
JOIN sys_course_chapter s3 ON s2.chapter_id = s3.chapter_id
|
||||||
answer = #{answer,jdbcType=VARCHAR},
|
WHERE s2.case_id IN
|
||||||
content_original = #{contentOriginal,jdbcType=VARCHAR},
|
<foreach collection="list" separator="," item="id" open="(" close=")">
|
||||||
question_original = #{questionOriginal,jdbcType=VARCHAR},
|
#{id}
|
||||||
answer_original = #{answerOriginal,jdbcType=VARCHAR},
|
</foreach>
|
||||||
sort = #{sort,jdbcType=INTEGER},
|
GROUP BY s2.title, s3.chapter_name
|
||||||
score = #{score,jdbcType=DECIMAL}
|
</select>
|
||||||
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue