350 lines
13 KiB
XML
350 lines
13 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="club.joylink.rtss.dao.RealLineDAO">
|
|
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.RealLine">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
<result column="origin" jdbcType="VARCHAR" property="origin" />
|
|
<result column="scaling" jdbcType="VARCHAR" property="scaling" />
|
|
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="updater_id" jdbcType="BIGINT" property="updaterId" />
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
</resultMap>
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.entity.RealLine">
|
|
<result column="config_data" jdbcType="LONGVARCHAR" property="configData" />
|
|
</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, code, `name`, origin, scaling, creator_id, create_time, updater_id, update_time
|
|
</sql>
|
|
<sql id="Blob_Column_List">
|
|
config_data
|
|
</sql>
|
|
<select id="selectByExampleWithBLOBs" parameterType="club.joylink.rtss.entity.RealLineExample" resultMap="ResultMapWithBLOBs">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
,
|
|
<include refid="Blob_Column_List" />
|
|
from real_line
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
<if test="orderByClause != null">
|
|
order by ${orderByClause}
|
|
</if>
|
|
<if test="limit != null">
|
|
<if test="offset != null">
|
|
limit ${offset}, ${limit}
|
|
</if>
|
|
<if test="offset == null">
|
|
limit ${limit}
|
|
</if>
|
|
</if>
|
|
</select>
|
|
<select id="selectByExample" parameterType="club.joylink.rtss.entity.RealLineExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from real_line
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
<if test="orderByClause != null">
|
|
order by ${orderByClause}
|
|
</if>
|
|
<if test="limit != null">
|
|
<if test="offset != null">
|
|
limit ${offset}, ${limit}
|
|
</if>
|
|
<if test="offset == null">
|
|
limit ${limit}
|
|
</if>
|
|
</if>
|
|
</select>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
,
|
|
<include refid="Blob_Column_List" />
|
|
from real_line
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from real_line
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.RealLineExample">
|
|
delete from real_line
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.RealLine" useGeneratedKeys="true">
|
|
insert into real_line (code, `name`, origin,
|
|
scaling, creator_id, create_time,
|
|
updater_id, update_time, config_data
|
|
)
|
|
values (#{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{origin,jdbcType=VARCHAR},
|
|
#{scaling,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
|
#{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{configData,jdbcType=LONGVARCHAR}
|
|
)
|
|
</insert>
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.RealLine" useGeneratedKeys="true">
|
|
insert into real_line
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="code != null">
|
|
code,
|
|
</if>
|
|
<if test="name != null">
|
|
`name`,
|
|
</if>
|
|
<if test="origin != null">
|
|
origin,
|
|
</if>
|
|
<if test="scaling != null">
|
|
scaling,
|
|
</if>
|
|
<if test="creatorId != null">
|
|
creator_id,
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time,
|
|
</if>
|
|
<if test="updaterId != null">
|
|
updater_id,
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time,
|
|
</if>
|
|
<if test="configData != null">
|
|
config_data,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="code != null">
|
|
#{code,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="name != null">
|
|
#{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="origin != null">
|
|
#{origin,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="scaling != null">
|
|
#{scaling,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="creatorId != null">
|
|
#{creatorId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="createTime != null">
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updaterId != null">
|
|
#{updaterId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="configData != null">
|
|
#{configData,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="club.joylink.rtss.entity.RealLineExample" resultType="java.lang.Long">
|
|
select count(*) from real_line
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update real_line
|
|
<set>
|
|
<if test="record.id != null">
|
|
id = #{record.id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.code != null">
|
|
code = #{record.code,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.name != null">
|
|
`name` = #{record.name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.origin != null">
|
|
origin = #{record.origin,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.scaling != null">
|
|
scaling = #{record.scaling,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.creatorId != null">
|
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.createTime != null">
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.updaterId != null">
|
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.updateTime != null">
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.configData != null">
|
|
config_data = #{record.configData,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
|
update real_line
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
code = #{record.code,jdbcType=VARCHAR},
|
|
`name` = #{record.name,jdbcType=VARCHAR},
|
|
origin = #{record.origin,jdbcType=VARCHAR},
|
|
scaling = #{record.scaling,jdbcType=VARCHAR},
|
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
config_data = #{record.configData,jdbcType=LONGVARCHAR}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update real_line
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
code = #{record.code,jdbcType=VARCHAR},
|
|
`name` = #{record.name,jdbcType=VARCHAR},
|
|
origin = #{record.origin,jdbcType=VARCHAR},
|
|
scaling = #{record.scaling,jdbcType=VARCHAR},
|
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.RealLine">
|
|
update real_line
|
|
<set>
|
|
<if test="code != null">
|
|
code = #{code,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="name != null">
|
|
`name` = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="origin != null">
|
|
origin = #{origin,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="scaling != null">
|
|
scaling = #{scaling,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="creatorId != null">
|
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updaterId != null">
|
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="configData != null">
|
|
config_data = #{configData,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="club.joylink.rtss.entity.RealLine">
|
|
update real_line
|
|
set code = #{code,jdbcType=VARCHAR},
|
|
`name` = #{name,jdbcType=VARCHAR},
|
|
origin = #{origin,jdbcType=VARCHAR},
|
|
scaling = #{scaling,jdbcType=VARCHAR},
|
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
config_data = #{configData,jdbcType=LONGVARCHAR}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.RealLine">
|
|
update real_line
|
|
set code = #{code,jdbcType=VARCHAR},
|
|
`name` = #{name,jdbcType=VARCHAR},
|
|
origin = #{origin,jdbcType=VARCHAR},
|
|
scaling = #{scaling,jdbcType=VARCHAR},
|
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper> |