|
|
@ -38,7 +38,8 @@
|
|
|
|
</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="("
|
|
|
|
|
|
|
|
separator=",">
|
|
|
|
#{listItem}
|
|
|
|
#{listItem}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</when>
|
|
|
|
</when>
|
|
|
@ -67,7 +68,8 @@
|
|
|
|
</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="("
|
|
|
|
|
|
|
|
separator=",">
|
|
|
|
#{listItem}
|
|
|
|
#{listItem}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</when>
|
|
|
|
</when>
|
|
|
@ -79,13 +81,15 @@
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
case_id, title, resource_data, source, type, one_id, one_name, two_id, two_name,
|
|
|
|
case_id
|
|
|
|
|
|
|
|
, title, resource_data, source, type, one_id, one_name, two_id, two_name,
|
|
|
|
three_id, three_name, unmount_status, create_time, update_time
|
|
|
|
three_id, three_name, unmount_status, create_time, update_time
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
<sql id="Blob_Column_List">
|
|
|
|
<sql id="Blob_Column_List">
|
|
|
|
content
|
|
|
|
content
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample" resultMap="ResultMapWithBLOBs">
|
|
|
|
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample"
|
|
|
|
|
|
|
|
resultMap="ResultMapWithBLOBs">
|
|
|
|
select
|
|
|
|
select
|
|
|
|
<if test="distinct">
|
|
|
|
<if test="distinct">
|
|
|
|
distinct
|
|
|
|
distinct
|
|
|
@ -101,7 +105,8 @@
|
|
|
|
order by ${orderByClause}
|
|
|
|
order by ${orderByClause}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample" resultMap="BaseResultMap">
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample"
|
|
|
|
|
|
|
|
resultMap="BaseResultMap">
|
|
|
|
select
|
|
|
|
select
|
|
|
|
<if test="distinct">
|
|
|
|
<if test="distinct">
|
|
|
|
distinct
|
|
|
|
distinct
|
|
|
@ -124,7 +129,8 @@
|
|
|
|
where case_id = #{caseId,jdbcType=VARCHAR}
|
|
|
|
where case_id = #{caseId,jdbcType=VARCHAR}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
delete from sys_case_questions
|
|
|
|
delete
|
|
|
|
|
|
|
|
from sys_case_questions
|
|
|
|
where case_id = #{caseId,jdbcType=VARCHAR}
|
|
|
|
where case_id = #{caseId,jdbcType=VARCHAR}
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample">
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample">
|
|
|
@ -138,14 +144,12 @@
|
|
|
|
source, type, one_id,
|
|
|
|
source, type, one_id,
|
|
|
|
one_name, two_id, two_name,
|
|
|
|
one_name, two_id, two_name,
|
|
|
|
three_id, three_name, unmount_status,
|
|
|
|
three_id, three_name, unmount_status,
|
|
|
|
create_time, update_time, content
|
|
|
|
create_time, update_time, content)
|
|
|
|
)
|
|
|
|
|
|
|
|
values (#{caseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{resourceData,jdbcType=VARCHAR},
|
|
|
|
values (#{caseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{resourceData,jdbcType=VARCHAR},
|
|
|
|
#{source,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR},
|
|
|
|
#{source,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR},
|
|
|
|
#{oneName,jdbcType=VARCHAR}, #{twoId,jdbcType=VARCHAR}, #{twoName,jdbcType=VARCHAR},
|
|
|
|
#{oneName,jdbcType=VARCHAR}, #{twoId,jdbcType=VARCHAR}, #{twoName,jdbcType=VARCHAR},
|
|
|
|
#{threeId,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR}, #{unmountStatus,jdbcType=BIT},
|
|
|
|
#{threeId,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR}, #{unmountStatus,jdbcType=BIT},
|
|
|
|
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR}
|
|
|
|
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR})
|
|
|
|
)
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
|
|
|
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
|
|
|
insert into sys_case_questions
|
|
|
|
insert into sys_case_questions
|
|
|
@ -244,7 +248,8 @@
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample" resultType="java.lang.Long">
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample"
|
|
|
|
|
|
|
|
resultType="java.lang.Long">
|
|
|
|
select count(*) from sys_case_questions
|
|
|
|
select count(*) from sys_case_questions
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
@ -428,7 +433,7 @@
|
|
|
|
where case_id = #{caseId,jdbcType=VARCHAR}
|
|
|
|
where case_id = #{caseId,jdbcType=VARCHAR}
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<!--条件查询-->
|
|
|
|
<!--条件查询 无重复数据-->
|
|
|
|
<select id="selectCaseByConditions" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
<select id="selectCaseByConditions" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
select * from sys_case_questions s
|
|
|
|
select * from sys_case_questions s
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
@ -440,5 +445,22 @@
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
and s.unmount_status is false
|
|
|
|
and s.unmount_status is false
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
|
|
|
|
order by s.create_time
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--条件查询加绑定关系,有重复数据-->
|
|
|
|
|
|
|
|
<select id="selectCaseByConditionsByBind" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
|
|
|
select st.*,s.title,s.content,s.resource_data,s.source,s.type,s.unmount_status,s.create_time
|
|
|
|
|
|
|
|
from sys_case_questions s
|
|
|
|
|
|
|
|
join sys_topic_and_course st
|
|
|
|
|
|
|
|
on s.case_id = st.topic_id
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
|
|
|
and s.title = #{title}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
and s.unmount_status is false
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
order by s.create_time
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|