You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dianshang-houduan/src/main/resources/mappers/AlgorithmStuAnswerMapper.xml

287 lines
11 KiB
XML

<?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.linkCommerce.mapper.AlgorithmStuAnswerMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.linkCommerce.entity.AlgorithmStuAnswer">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="module" jdbcType="VARCHAR" property="module" />
<result column="error_count" jdbcType="INTEGER" property="errorCount" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="project" jdbcType="VARCHAR" property="project" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.linkCommerce.entity.AlgorithmStuAnswer">
<result column="context" jdbcType="LONGVARCHAR" property="context" />
</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>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, module, error_count, user_id, create_time, project
</sql>
<sql id="Blob_Column_List">
context
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.linkCommerce.entity.AlgorithmStuAnswerExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from algorithm_stu_answer
<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.linkCommerce.entity.AlgorithmStuAnswerExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from algorithm_stu_answer
<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 algorithm_stu_answer
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from algorithm_stu_answer
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.linkCommerce.entity.AlgorithmStuAnswerExample">
delete from algorithm_stu_answer
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.linkCommerce.entity.AlgorithmStuAnswer">
insert into algorithm_stu_answer (id, module, error_count,
user_id, create_time, project,
context)
values (#{id,jdbcType=VARCHAR}, #{module,jdbcType=VARCHAR}, #{errorCount,jdbcType=INTEGER},
#{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{project,jdbcType=VARCHAR},
#{context,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.linkCommerce.entity.AlgorithmStuAnswer">
insert into algorithm_stu_answer
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="module != null">
module,
</if>
<if test="errorCount != null">
error_count,
</if>
<if test="userId != null">
user_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="project != null">
project,
</if>
<if test="context != null">
context,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="module != null">
#{module,jdbcType=VARCHAR},
</if>
<if test="errorCount != null">
#{errorCount,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="project != null">
#{project,jdbcType=VARCHAR},
</if>
<if test="context != null">
#{context,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.linkCommerce.entity.AlgorithmStuAnswerExample" resultType="java.lang.Long">
select count(*) from algorithm_stu_answer
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update algorithm_stu_answer
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.module != null">
module = #{record.module,jdbcType=VARCHAR},
</if>
<if test="record.errorCount != null">
error_count = #{record.errorCount,jdbcType=INTEGER},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.project != null">
project = #{record.project,jdbcType=VARCHAR},
</if>
<if test="record.context != null">
context = #{record.context,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update algorithm_stu_answer
set id = #{record.id,jdbcType=VARCHAR},
module = #{record.module,jdbcType=VARCHAR},
error_count = #{record.errorCount,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
project = #{record.project,jdbcType=VARCHAR},
context = #{record.context,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update algorithm_stu_answer
set id = #{record.id,jdbcType=VARCHAR},
module = #{record.module,jdbcType=VARCHAR},
error_count = #{record.errorCount,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
project = #{record.project,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.linkCommerce.entity.AlgorithmStuAnswer">
update algorithm_stu_answer
<set>
<if test="module != null">
module = #{module,jdbcType=VARCHAR},
</if>
<if test="errorCount != null">
error_count = #{errorCount,jdbcType=INTEGER},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="project != null">
project = #{project,jdbcType=VARCHAR},
</if>
<if test="context != null">
context = #{context,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.linkCommerce.entity.AlgorithmStuAnswer">
update algorithm_stu_answer
set module = #{module,jdbcType=VARCHAR},
error_count = #{errorCount,jdbcType=INTEGER},
user_id = #{userId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
project = #{project,jdbcType=VARCHAR},
context = #{context,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.linkCommerce.entity.AlgorithmStuAnswer">
update algorithm_stu_answer
set module = #{module,jdbcType=VARCHAR},
error_count = #{errorCount,jdbcType=INTEGER},
user_id = #{userId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
project = #{project,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>