新增三方接口
parent
c0a01d45af
commit
346dfaad89
@ -1,444 +1,466 @@
|
|||||||
<?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.resource_center.mapper.SysCaseQuestionMapper">
|
<mapper namespace="com.sztzjy.resource_center.mapper.SysCaseQuestionMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
<resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
||||||
<id column="case_id" jdbcType="VARCHAR" property="caseId" />
|
<id column="case_id" jdbcType="VARCHAR" property="caseId"/>
|
||||||
<result column="title" jdbcType="VARCHAR" property="title" />
|
<result column="title" jdbcType="VARCHAR" property="title"/>
|
||||||
<result column="resource_data" jdbcType="VARCHAR" property="resourceData" />
|
<result column="resource_data" jdbcType="VARCHAR" property="resourceData"/>
|
||||||
<result column="source" jdbcType="VARCHAR" property="source" />
|
<result column="source" jdbcType="VARCHAR" property="source"/>
|
||||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
<result column="type" jdbcType="VARCHAR" property="type"/>
|
||||||
<result column="one_id" jdbcType="VARCHAR" property="oneId" />
|
<result column="one_id" jdbcType="VARCHAR" property="oneId"/>
|
||||||
<result column="one_name" jdbcType="VARCHAR" property="oneName" />
|
<result column="one_name" jdbcType="VARCHAR" property="oneName"/>
|
||||||
<result column="two_id" jdbcType="VARCHAR" property="twoId" />
|
<result column="two_id" jdbcType="VARCHAR" property="twoId"/>
|
||||||
<result column="two_name" jdbcType="VARCHAR" property="twoName" />
|
<result column="two_name" jdbcType="VARCHAR" property="twoName"/>
|
||||||
<result column="three_id" jdbcType="VARCHAR" property="threeId" />
|
<result column="three_id" jdbcType="VARCHAR" property="threeId"/>
|
||||||
<result column="three_name" jdbcType="VARCHAR" property="threeName" />
|
<result column="three_name" jdbcType="VARCHAR" property="threeName"/>
|
||||||
<result column="unmount_status" jdbcType="BIT" property="unmountStatus" />
|
<result column="unmount_status" jdbcType="BIT" property="unmountStatus"/>
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
||||||
<result column="content" jdbcType="LONGVARCHAR" property="content" />
|
<result column="content" jdbcType="LONGVARCHAR" property="content"/>
|
||||||
</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_id
|
||||||
</sql>
|
, title, resource_data, source, type, one_id, one_name, two_id, two_name,
|
||||||
<sql id="Base_Column_List">
|
|
||||||
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"
|
||||||
select
|
resultMap="ResultMapWithBLOBs">
|
||||||
<if test="distinct">
|
select
|
||||||
distinct
|
<if test="distinct">
|
||||||
</if>
|
distinct
|
||||||
<include refid="Base_Column_List" />
|
</if>
|
||||||
,
|
<include refid="Base_Column_List"/>
|
||||||
<include refid="Blob_Column_List" />
|
,
|
||||||
from sys_case_questions
|
<include refid="Blob_Column_List"/>
|
||||||
<if test="_parameter != null">
|
from sys_case_questions
|
||||||
<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="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample" resultMap="BaseResultMap">
|
</select>
|
||||||
select
|
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample"
|
||||||
<if test="distinct">
|
resultMap="BaseResultMap">
|
||||||
distinct
|
select
|
||||||
</if>
|
<if test="distinct">
|
||||||
<include refid="Base_Column_List" />
|
distinct
|
||||||
from sys_case_questions
|
</if>
|
||||||
<if test="_parameter != null">
|
<include refid="Base_Column_List"/>
|
||||||
<include refid="Example_Where_Clause" />
|
from sys_case_questions
|
||||||
</if>
|
<if test="_parameter != null">
|
||||||
<if test="orderByClause != null">
|
<include refid="Example_Where_Clause"/>
|
||||||
order by ${orderByClause}
|
</if>
|
||||||
</if>
|
<if test="orderByClause != null">
|
||||||
</select>
|
order by ${orderByClause}
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
</if>
|
||||||
select
|
</select>
|
||||||
<include refid="Base_Column_List" />
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||||
,
|
select
|
||||||
<include refid="Blob_Column_List" />
|
<include refid="Base_Column_List"/>
|
||||||
from sys_case_questions
|
,
|
||||||
where case_id = #{caseId,jdbcType=VARCHAR}
|
<include refid="Blob_Column_List"/>
|
||||||
</select>
|
from sys_case_questions
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
where case_id = #{caseId,jdbcType=VARCHAR}
|
||||||
delete from sys_case_questions
|
</select>
|
||||||
where case_id = #{caseId,jdbcType=VARCHAR}
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
</delete>
|
delete
|
||||||
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample">
|
from sys_case_questions
|
||||||
delete from sys_case_questions
|
where case_id = #{caseId,jdbcType=VARCHAR}
|
||||||
<if test="_parameter != null">
|
</delete>
|
||||||
<include refid="Example_Where_Clause" />
|
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample">
|
||||||
</if>
|
delete from sys_case_questions
|
||||||
</delete>
|
<if test="_parameter != null">
|
||||||
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
<include refid="Example_Where_Clause"/>
|
||||||
insert into sys_case_questions (case_id, title, resource_data,
|
</if>
|
||||||
source, type, one_id,
|
</delete>
|
||||||
one_name, two_id, two_name,
|
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
||||||
three_id, three_name, unmount_status,
|
insert into sys_case_questions (case_id, title, resource_data,
|
||||||
create_time, update_time, content
|
source, type, one_id,
|
||||||
)
|
one_name, two_id, two_name,
|
||||||
values (#{caseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{resourceData,jdbcType=VARCHAR},
|
three_id, three_name, unmount_status,
|
||||||
#{source,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR},
|
create_time, update_time, content)
|
||||||
#{oneName,jdbcType=VARCHAR}, #{twoId,jdbcType=VARCHAR}, #{twoName,jdbcType=VARCHAR},
|
values (#{caseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{resourceData,jdbcType=VARCHAR},
|
||||||
#{threeId,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR}, #{unmountStatus,jdbcType=BIT},
|
#{source,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR},
|
||||||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR}
|
#{oneName,jdbcType=VARCHAR}, #{twoId,jdbcType=VARCHAR}, #{twoName,jdbcType=VARCHAR},
|
||||||
)
|
#{threeId,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR}, #{unmountStatus,jdbcType=BIT},
|
||||||
</insert>
|
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR})
|
||||||
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
</insert>
|
||||||
insert into sys_case_questions
|
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
insert into sys_case_questions
|
||||||
<if test="caseId != null">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
case_id,
|
<if test="caseId != null">
|
||||||
</if>
|
case_id,
|
||||||
<if test="title != null">
|
</if>
|
||||||
title,
|
<if test="title != null">
|
||||||
</if>
|
title,
|
||||||
<if test="resourceData != null">
|
</if>
|
||||||
resource_data,
|
<if test="resourceData != null">
|
||||||
</if>
|
resource_data,
|
||||||
<if test="source != null">
|
</if>
|
||||||
source,
|
<if test="source != null">
|
||||||
</if>
|
source,
|
||||||
<if test="type != null">
|
</if>
|
||||||
type,
|
<if test="type != null">
|
||||||
</if>
|
type,
|
||||||
<if test="oneId != null">
|
</if>
|
||||||
one_id,
|
<if test="oneId != null">
|
||||||
</if>
|
one_id,
|
||||||
<if test="oneName != null">
|
</if>
|
||||||
one_name,
|
<if test="oneName != null">
|
||||||
</if>
|
one_name,
|
||||||
<if test="twoId != null">
|
</if>
|
||||||
two_id,
|
<if test="twoId != null">
|
||||||
</if>
|
two_id,
|
||||||
<if test="twoName != null">
|
</if>
|
||||||
two_name,
|
<if test="twoName != null">
|
||||||
</if>
|
two_name,
|
||||||
<if test="threeId != null">
|
</if>
|
||||||
three_id,
|
<if test="threeId != null">
|
||||||
</if>
|
three_id,
|
||||||
<if test="threeName != null">
|
</if>
|
||||||
three_name,
|
<if test="threeName != null">
|
||||||
</if>
|
three_name,
|
||||||
<if test="unmountStatus != null">
|
</if>
|
||||||
unmount_status,
|
<if test="unmountStatus != null">
|
||||||
</if>
|
unmount_status,
|
||||||
<if test="createTime != null">
|
</if>
|
||||||
create_time,
|
<if test="createTime != null">
|
||||||
</if>
|
create_time,
|
||||||
<if test="updateTime != null">
|
</if>
|
||||||
update_time,
|
<if test="updateTime != null">
|
||||||
</if>
|
update_time,
|
||||||
<if test="content != null">
|
</if>
|
||||||
content,
|
<if test="content != null">
|
||||||
</if>
|
content,
|
||||||
</trim>
|
</if>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
</trim>
|
||||||
<if test="caseId != null">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
#{caseId,jdbcType=VARCHAR},
|
<if test="caseId != null">
|
||||||
</if>
|
#{caseId,jdbcType=VARCHAR},
|
||||||
<if test="title != null">
|
</if>
|
||||||
#{title,jdbcType=VARCHAR},
|
<if test="title != null">
|
||||||
</if>
|
#{title,jdbcType=VARCHAR},
|
||||||
<if test="resourceData != null">
|
</if>
|
||||||
#{resourceData,jdbcType=VARCHAR},
|
<if test="resourceData != null">
|
||||||
</if>
|
#{resourceData,jdbcType=VARCHAR},
|
||||||
<if test="source != null">
|
</if>
|
||||||
#{source,jdbcType=VARCHAR},
|
<if test="source != null">
|
||||||
</if>
|
#{source,jdbcType=VARCHAR},
|
||||||
<if test="type != null">
|
</if>
|
||||||
#{type,jdbcType=VARCHAR},
|
<if test="type != null">
|
||||||
</if>
|
#{type,jdbcType=VARCHAR},
|
||||||
<if test="oneId != null">
|
</if>
|
||||||
#{oneId,jdbcType=VARCHAR},
|
<if test="oneId != null">
|
||||||
</if>
|
#{oneId,jdbcType=VARCHAR},
|
||||||
<if test="oneName != null">
|
</if>
|
||||||
#{oneName,jdbcType=VARCHAR},
|
<if test="oneName != null">
|
||||||
</if>
|
#{oneName,jdbcType=VARCHAR},
|
||||||
<if test="twoId != null">
|
</if>
|
||||||
#{twoId,jdbcType=VARCHAR},
|
<if test="twoId != null">
|
||||||
</if>
|
#{twoId,jdbcType=VARCHAR},
|
||||||
<if test="twoName != null">
|
</if>
|
||||||
#{twoName,jdbcType=VARCHAR},
|
<if test="twoName != null">
|
||||||
</if>
|
#{twoName,jdbcType=VARCHAR},
|
||||||
<if test="threeId != null">
|
</if>
|
||||||
#{threeId,jdbcType=VARCHAR},
|
<if test="threeId != null">
|
||||||
</if>
|
#{threeId,jdbcType=VARCHAR},
|
||||||
<if test="threeName != null">
|
</if>
|
||||||
#{threeName,jdbcType=VARCHAR},
|
<if test="threeName != null">
|
||||||
</if>
|
#{threeName,jdbcType=VARCHAR},
|
||||||
<if test="unmountStatus != null">
|
</if>
|
||||||
#{unmountStatus,jdbcType=BIT},
|
<if test="unmountStatus != null">
|
||||||
</if>
|
#{unmountStatus,jdbcType=BIT},
|
||||||
<if test="createTime != null">
|
</if>
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
<if test="createTime != null">
|
||||||
</if>
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
<if test="updateTime != null">
|
</if>
|
||||||
#{updateTime,jdbcType=TIMESTAMP},
|
<if test="updateTime != null">
|
||||||
</if>
|
#{updateTime,jdbcType=TIMESTAMP},
|
||||||
<if test="content != null">
|
</if>
|
||||||
#{content,jdbcType=LONGVARCHAR},
|
<if test="content != null">
|
||||||
</if>
|
#{content,jdbcType=LONGVARCHAR},
|
||||||
</trim>
|
</if>
|
||||||
</insert>
|
</trim>
|
||||||
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample" resultType="java.lang.Long">
|
</insert>
|
||||||
select count(*) from sys_case_questions
|
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestionExample"
|
||||||
<if test="_parameter != null">
|
resultType="java.lang.Long">
|
||||||
<include refid="Example_Where_Clause" />
|
select count(*) from sys_case_questions
|
||||||
</if>
|
<if test="_parameter != null">
|
||||||
</select>
|
<include refid="Example_Where_Clause"/>
|
||||||
<update id="updateByExampleSelective" parameterType="map">
|
</if>
|
||||||
update sys_case_questions
|
</select>
|
||||||
<set>
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
<if test="record.caseId != null">
|
update sys_case_questions
|
||||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
<set>
|
||||||
</if>
|
<if test="record.caseId != null">
|
||||||
<if test="record.title != null">
|
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.title != null">
|
||||||
|
title = #{record.title,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.resourceData != null">
|
||||||
|
resource_data = #{record.resourceData,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.source != null">
|
||||||
|
source = #{record.source,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.type != null">
|
||||||
|
type = #{record.type,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.oneId != null">
|
||||||
|
one_id = #{record.oneId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.oneName != null">
|
||||||
|
one_name = #{record.oneName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.twoId != null">
|
||||||
|
two_id = #{record.twoId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.twoName != null">
|
||||||
|
two_name = #{record.twoName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.threeId != null">
|
||||||
|
three_id = #{record.threeId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.threeName != null">
|
||||||
|
three_name = #{record.threeName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.unmountStatus != null">
|
||||||
|
unmount_status = #{record.unmountStatus,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
|
<if test="record.createTime != null">
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.updateTime != null">
|
||||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.content != null">
|
||||||
|
content = #{record.content,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_questions
|
||||||
|
set case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||||
title = #{record.title,jdbcType=VARCHAR},
|
title = #{record.title,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.resourceData != null">
|
|
||||||
resource_data = #{record.resourceData,jdbcType=VARCHAR},
|
resource_data = #{record.resourceData,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.source != null">
|
|
||||||
source = #{record.source,jdbcType=VARCHAR},
|
source = #{record.source,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.type != null">
|
|
||||||
type = #{record.type,jdbcType=VARCHAR},
|
type = #{record.type,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.oneId != null">
|
|
||||||
one_id = #{record.oneId,jdbcType=VARCHAR},
|
one_id = #{record.oneId,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.oneName != null">
|
|
||||||
one_name = #{record.oneName,jdbcType=VARCHAR},
|
one_name = #{record.oneName,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.twoId != null">
|
|
||||||
two_id = #{record.twoId,jdbcType=VARCHAR},
|
two_id = #{record.twoId,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.twoName != null">
|
|
||||||
two_name = #{record.twoName,jdbcType=VARCHAR},
|
two_name = #{record.twoName,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.threeId != null">
|
|
||||||
three_id = #{record.threeId,jdbcType=VARCHAR},
|
three_id = #{record.threeId,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.threeName != null">
|
|
||||||
three_name = #{record.threeName,jdbcType=VARCHAR},
|
three_name = #{record.threeName,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.unmountStatus != null">
|
|
||||||
unmount_status = #{record.unmountStatus,jdbcType=BIT},
|
unmount_status = #{record.unmountStatus,jdbcType=BIT},
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
content = #{record.content,jdbcType=LONGVARCHAR}
|
||||||
<if test="record.content != null">
|
<if test="_parameter != null">
|
||||||
content = #{record.content,jdbcType=LONGVARCHAR},
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</update>
|
||||||
<if test="_parameter != null">
|
<update id="updateByExample" parameterType="map">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
update sys_case_questions
|
||||||
</if>
|
set case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||||
</update>
|
title = #{record.title,jdbcType=VARCHAR},
|
||||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
resource_data = #{record.resourceData,jdbcType=VARCHAR},
|
||||||
update sys_case_questions
|
source = #{record.source,jdbcType=VARCHAR},
|
||||||
set case_id = #{record.caseId,jdbcType=VARCHAR},
|
type = #{record.type,jdbcType=VARCHAR},
|
||||||
title = #{record.title,jdbcType=VARCHAR},
|
one_id = #{record.oneId,jdbcType=VARCHAR},
|
||||||
resource_data = #{record.resourceData,jdbcType=VARCHAR},
|
one_name = #{record.oneName,jdbcType=VARCHAR},
|
||||||
source = #{record.source,jdbcType=VARCHAR},
|
two_id = #{record.twoId,jdbcType=VARCHAR},
|
||||||
type = #{record.type,jdbcType=VARCHAR},
|
two_name = #{record.twoName,jdbcType=VARCHAR},
|
||||||
one_id = #{record.oneId,jdbcType=VARCHAR},
|
three_id = #{record.threeId,jdbcType=VARCHAR},
|
||||||
one_name = #{record.oneName,jdbcType=VARCHAR},
|
three_name = #{record.threeName,jdbcType=VARCHAR},
|
||||||
two_id = #{record.twoId,jdbcType=VARCHAR},
|
unmount_status = #{record.unmountStatus,jdbcType=BIT},
|
||||||
two_name = #{record.twoName,jdbcType=VARCHAR},
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
three_id = #{record.threeId,jdbcType=VARCHAR},
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||||
three_name = #{record.threeName,jdbcType=VARCHAR},
|
<if test="_parameter != null">
|
||||||
unmount_status = #{record.unmountStatus,jdbcType=BIT},
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
</if>
|
||||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
</update>
|
||||||
content = #{record.content,jdbcType=LONGVARCHAR}
|
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
||||||
<if test="_parameter != null">
|
update sys_case_questions
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<set>
|
||||||
</if>
|
<if test="title != null">
|
||||||
</update>
|
title = #{title,jdbcType=VARCHAR},
|
||||||
<update id="updateByExample" parameterType="map">
|
</if>
|
||||||
update sys_case_questions
|
<if test="resourceData != null">
|
||||||
set case_id = #{record.caseId,jdbcType=VARCHAR},
|
resource_data = #{resourceData,jdbcType=VARCHAR},
|
||||||
title = #{record.title,jdbcType=VARCHAR},
|
</if>
|
||||||
resource_data = #{record.resourceData,jdbcType=VARCHAR},
|
<if test="source != null">
|
||||||
source = #{record.source,jdbcType=VARCHAR},
|
source = #{source,jdbcType=VARCHAR},
|
||||||
type = #{record.type,jdbcType=VARCHAR},
|
</if>
|
||||||
one_id = #{record.oneId,jdbcType=VARCHAR},
|
<if test="type != null">
|
||||||
one_name = #{record.oneName,jdbcType=VARCHAR},
|
type = #{type,jdbcType=VARCHAR},
|
||||||
two_id = #{record.twoId,jdbcType=VARCHAR},
|
</if>
|
||||||
two_name = #{record.twoName,jdbcType=VARCHAR},
|
<if test="oneId != null">
|
||||||
three_id = #{record.threeId,jdbcType=VARCHAR},
|
one_id = #{oneId,jdbcType=VARCHAR},
|
||||||
three_name = #{record.threeName,jdbcType=VARCHAR},
|
</if>
|
||||||
unmount_status = #{record.unmountStatus,jdbcType=BIT},
|
<if test="oneName != null">
|
||||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
one_name = #{oneName,jdbcType=VARCHAR},
|
||||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
</if>
|
||||||
<if test="_parameter != null">
|
<if test="twoId != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
two_id = #{twoId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</update>
|
<if test="twoName != null">
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
two_name = #{twoName,jdbcType=VARCHAR},
|
||||||
update sys_case_questions
|
</if>
|
||||||
<set>
|
<if test="threeId != null">
|
||||||
<if test="title != null">
|
three_id = #{threeId,jdbcType=VARCHAR},
|
||||||
title = #{title,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="threeName != null">
|
||||||
<if test="resourceData != null">
|
three_name = #{threeName,jdbcType=VARCHAR},
|
||||||
resource_data = #{resourceData,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="unmountStatus != null">
|
||||||
<if test="source != null">
|
unmount_status = #{unmountStatus,jdbcType=BIT},
|
||||||
source = #{source,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="createTime != null">
|
||||||
<if test="type != null">
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
type = #{type,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="updateTime != null">
|
||||||
<if test="oneId != null">
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
one_id = #{oneId,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="content != null">
|
||||||
<if test="oneName != null">
|
content = #{content,jdbcType=LONGVARCHAR},
|
||||||
one_name = #{oneName,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
</set>
|
||||||
<if test="twoId != null">
|
where case_id = #{caseId,jdbcType=VARCHAR}
|
||||||
two_id = #{twoId,jdbcType=VARCHAR},
|
</update>
|
||||||
</if>
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
||||||
<if test="twoName != null">
|
update sys_case_questions
|
||||||
two_name = #{twoName,jdbcType=VARCHAR},
|
set title = #{title,jdbcType=VARCHAR},
|
||||||
</if>
|
resource_data = #{resourceData,jdbcType=VARCHAR},
|
||||||
<if test="threeId != null">
|
source = #{source,jdbcType=VARCHAR},
|
||||||
three_id = #{threeId,jdbcType=VARCHAR},
|
type = #{type,jdbcType=VARCHAR},
|
||||||
</if>
|
one_id = #{oneId,jdbcType=VARCHAR},
|
||||||
<if test="threeName != null">
|
one_name = #{oneName,jdbcType=VARCHAR},
|
||||||
three_name = #{threeName,jdbcType=VARCHAR},
|
two_id = #{twoId,jdbcType=VARCHAR},
|
||||||
</if>
|
two_name = #{twoName,jdbcType=VARCHAR},
|
||||||
<if test="unmountStatus != null">
|
three_id = #{threeId,jdbcType=VARCHAR},
|
||||||
unmount_status = #{unmountStatus,jdbcType=BIT},
|
three_name = #{threeName,jdbcType=VARCHAR},
|
||||||
</if>
|
unmount_status = #{unmountStatus,jdbcType=BIT},
|
||||||
<if test="createTime != null">
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
content = #{content,jdbcType=LONGVARCHAR}
|
||||||
<if test="updateTime != null">
|
where case_id = #{caseId,jdbcType=VARCHAR}
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
</update>
|
||||||
</if>
|
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
||||||
<if test="content != null">
|
update sys_case_questions
|
||||||
content = #{content,jdbcType=LONGVARCHAR},
|
set title = #{title,jdbcType=VARCHAR},
|
||||||
</if>
|
resource_data = #{resourceData,jdbcType=VARCHAR},
|
||||||
</set>
|
source = #{source,jdbcType=VARCHAR},
|
||||||
where case_id = #{caseId,jdbcType=VARCHAR}
|
type = #{type,jdbcType=VARCHAR},
|
||||||
</update>
|
one_id = #{oneId,jdbcType=VARCHAR},
|
||||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
one_name = #{oneName,jdbcType=VARCHAR},
|
||||||
update sys_case_questions
|
two_id = #{twoId,jdbcType=VARCHAR},
|
||||||
set title = #{title,jdbcType=VARCHAR},
|
two_name = #{twoName,jdbcType=VARCHAR},
|
||||||
resource_data = #{resourceData,jdbcType=VARCHAR},
|
three_id = #{threeId,jdbcType=VARCHAR},
|
||||||
source = #{source,jdbcType=VARCHAR},
|
three_name = #{threeName,jdbcType=VARCHAR},
|
||||||
type = #{type,jdbcType=VARCHAR},
|
unmount_status = #{unmountStatus,jdbcType=BIT},
|
||||||
one_id = #{oneId,jdbcType=VARCHAR},
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
one_name = #{oneName,jdbcType=VARCHAR},
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||||
two_id = #{twoId,jdbcType=VARCHAR},
|
where case_id = #{caseId,jdbcType=VARCHAR}
|
||||||
two_name = #{twoName,jdbcType=VARCHAR},
|
</update>
|
||||||
three_id = #{threeId,jdbcType=VARCHAR},
|
|
||||||
three_name = #{threeName,jdbcType=VARCHAR},
|
<!--条件查询 无重复数据-->
|
||||||
unmount_status = #{unmountStatus,jdbcType=BIT},
|
<select id="selectCaseByConditions" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
select * from sys_case_questions s
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
<where>
|
||||||
content = #{content,jdbcType=LONGVARCHAR}
|
<if test="oneId != null and oneId != ''">
|
||||||
where case_id = #{caseId,jdbcType=VARCHAR}
|
s.one_id = #{oneId}
|
||||||
</update>
|
</if>
|
||||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysCaseQuestion">
|
<if test="title != null and title != ''">
|
||||||
update sys_case_questions
|
and s.title = #{title}
|
||||||
set title = #{title,jdbcType=VARCHAR},
|
</if>
|
||||||
resource_data = #{resourceData,jdbcType=VARCHAR},
|
and s.unmount_status is false
|
||||||
source = #{source,jdbcType=VARCHAR},
|
</where>
|
||||||
type = #{type,jdbcType=VARCHAR},
|
order by s.create_time
|
||||||
one_id = #{oneId,jdbcType=VARCHAR},
|
</select>
|
||||||
one_name = #{oneName,jdbcType=VARCHAR},
|
|
||||||
two_id = #{twoId,jdbcType=VARCHAR},
|
|
||||||
two_name = #{twoName,jdbcType=VARCHAR},
|
|
||||||
three_id = #{threeId,jdbcType=VARCHAR},
|
|
||||||
three_name = #{threeName,jdbcType=VARCHAR},
|
|
||||||
unmount_status = #{unmountStatus,jdbcType=BIT},
|
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
||||||
where case_id = #{caseId,jdbcType=VARCHAR}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!--条件查询-->
|
<!--条件查询加绑定关系,有重复数据-->
|
||||||
<select id="selectCaseByConditions" parameterType="java.lang.String" resultMap="BaseResultMap">
|
<select id="selectCaseByConditionsByBind" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
select * from sys_case_questions s
|
select st.*,s.title,s.content,s.resource_data,s.source,s.type,s.unmount_status,s.create_time
|
||||||
<where>
|
from sys_case_questions s
|
||||||
<if test="oneId != null and oneId != ''">
|
join sys_topic_and_course st
|
||||||
s.one_id = #{oneId}
|
on s.case_id = st.topic_id
|
||||||
</if>
|
<where>
|
||||||
<if test="title != null and title != ''">
|
<if test="title != null and title != ''">
|
||||||
and s.title = #{title}
|
and s.title = #{title}
|
||||||
</if>
|
</if>
|
||||||
and s.unmount_status is false
|
and s.unmount_status is false
|
||||||
</where>
|
</where>
|
||||||
</select>
|
order by s.create_time
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue