2020-11-19 10:07:10 +08:00
|
|
|
<?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">
|
2020-11-19 18:28:54 +08:00
|
|
|
<mapper namespace="club.joylink.rtss.dao.DraftMap3dDataDAO">
|
|
|
|
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.DraftMap3dData">
|
2020-11-19 10:07:10 +08:00
|
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
|
|
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
|
|
|
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
|
</resultMap>
|
2020-11-19 18:28:54 +08:00
|
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.entity.DraftMap3dDataWithBLOBs">
|
2020-11-19 10:07:10 +08:00
|
|
|
<result column="assets" jdbcType="LONGVARCHAR" property="assets" />
|
|
|
|
<result column="sections" jdbcType="LONGVARCHAR" property="sections" />
|
|
|
|
<result column="switchs" jdbcType="LONGVARCHAR" property="switchs" />
|
|
|
|
<result column="signals" jdbcType="LONGVARCHAR" property="signals" />
|
|
|
|
<result column="stands" jdbcType="LONGVARCHAR" property="stands" />
|
|
|
|
<result column="trains" jdbcType="LONGVARCHAR" property="trains" />
|
|
|
|
</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, map_id, creator_id, create_time, update_time
|
|
|
|
</sql>
|
|
|
|
<sql id="Blob_Column_List">
|
|
|
|
assets, sections, switchs, signals, stands, trains
|
|
|
|
</sql>
|
2020-11-19 18:28:54 +08:00
|
|
|
<select id="selectByExampleWithBLOBs" parameterType="club.joylink.rtss.entity.DraftMap3dDataExample" resultMap="ResultMapWithBLOBs">
|
2020-11-19 10:07:10 +08:00
|
|
|
select
|
|
|
|
<if test="distinct">
|
|
|
|
distinct
|
|
|
|
</if>
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
,
|
|
|
|
<include refid="Blob_Column_List" />
|
|
|
|
from draft_map_3d_data
|
|
|
|
<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>
|
2020-11-19 18:28:54 +08:00
|
|
|
<select id="selectByExample" parameterType="club.joylink.rtss.entity.DraftMap3dDataExample" resultMap="BaseResultMap">
|
2020-11-19 10:07:10 +08:00
|
|
|
select
|
|
|
|
<if test="distinct">
|
|
|
|
distinct
|
|
|
|
</if>
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
from draft_map_3d_data
|
|
|
|
<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 draft_map_3d_data
|
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
|
</select>
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
|
delete from draft_map_3d_data
|
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
|
</delete>
|
2020-11-19 18:28:54 +08:00
|
|
|
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.DraftMap3dDataExample">
|
2020-11-19 10:07:10 +08:00
|
|
|
delete from draft_map_3d_data
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
</if>
|
|
|
|
</delete>
|
2020-11-19 18:28:54 +08:00
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.DraftMap3dDataWithBLOBs" useGeneratedKeys="true">
|
2020-11-19 10:07:10 +08:00
|
|
|
insert into draft_map_3d_data (map_id, creator_id, create_time,
|
|
|
|
update_time, assets, sections,
|
|
|
|
switchs, signals, stands,
|
|
|
|
trains)
|
|
|
|
values (#{mapId,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP}, #{assets,jdbcType=LONGVARCHAR}, #{sections,jdbcType=LONGVARCHAR},
|
|
|
|
#{switchs,jdbcType=LONGVARCHAR}, #{signals,jdbcType=LONGVARCHAR}, #{stands,jdbcType=LONGVARCHAR},
|
|
|
|
#{trains,jdbcType=LONGVARCHAR})
|
|
|
|
</insert>
|
2020-11-19 18:28:54 +08:00
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.DraftMap3dDataWithBLOBs" useGeneratedKeys="true">
|
2020-11-19 10:07:10 +08:00
|
|
|
insert into draft_map_3d_data
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="mapId != null">
|
|
|
|
map_id,
|
|
|
|
</if>
|
|
|
|
<if test="creatorId != null">
|
|
|
|
creator_id,
|
|
|
|
</if>
|
|
|
|
<if test="createTime != null">
|
|
|
|
create_time,
|
|
|
|
</if>
|
|
|
|
<if test="updateTime != null">
|
|
|
|
update_time,
|
|
|
|
</if>
|
|
|
|
<if test="assets != null">
|
|
|
|
assets,
|
|
|
|
</if>
|
|
|
|
<if test="sections != null">
|
|
|
|
sections,
|
|
|
|
</if>
|
|
|
|
<if test="switchs != null">
|
|
|
|
switchs,
|
|
|
|
</if>
|
|
|
|
<if test="signals != null">
|
|
|
|
signals,
|
|
|
|
</if>
|
|
|
|
<if test="stands != null">
|
|
|
|
stands,
|
|
|
|
</if>
|
|
|
|
<if test="trains != null">
|
|
|
|
trains,
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="mapId != null">
|
|
|
|
#{mapId,jdbcType=BIGINT},
|
|
|
|
</if>
|
|
|
|
<if test="creatorId != null">
|
|
|
|
#{creatorId,jdbcType=BIGINT},
|
|
|
|
</if>
|
|
|
|
<if test="createTime != null">
|
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
|
</if>
|
|
|
|
<if test="updateTime != null">
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
</if>
|
|
|
|
<if test="assets != null">
|
|
|
|
#{assets,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="sections != null">
|
|
|
|
#{sections,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="switchs != null">
|
|
|
|
#{switchs,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="signals != null">
|
|
|
|
#{signals,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="stands != null">
|
|
|
|
#{stands,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="trains != null">
|
|
|
|
#{trains,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
2020-11-19 18:28:54 +08:00
|
|
|
<select id="countByExample" parameterType="club.joylink.rtss.entity.DraftMap3dDataExample" resultType="java.lang.Long">
|
2020-11-19 10:07:10 +08:00
|
|
|
select count(*) from draft_map_3d_data
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
|
|
update draft_map_3d_data
|
|
|
|
<set>
|
|
|
|
<if test="record.id != null">
|
|
|
|
id = #{record.id,jdbcType=BIGINT},
|
|
|
|
</if>
|
|
|
|
<if test="record.mapId != null">
|
|
|
|
map_id = #{record.mapId,jdbcType=BIGINT},
|
|
|
|
</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.updateTime != null">
|
|
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
|
</if>
|
|
|
|
<if test="record.assets != null">
|
|
|
|
assets = #{record.assets,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="record.sections != null">
|
|
|
|
sections = #{record.sections,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="record.switchs != null">
|
|
|
|
switchs = #{record.switchs,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="record.signals != null">
|
|
|
|
signals = #{record.signals,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="record.stands != null">
|
|
|
|
stands = #{record.stands,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="record.trains != null">
|
|
|
|
trains = #{record.trains,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
</set>
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
</if>
|
|
|
|
</update>
|
|
|
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
|
|
|
update draft_map_3d_data
|
|
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
|
|
map_id = #{record.mapId,jdbcType=BIGINT},
|
|
|
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
|
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
|
assets = #{record.assets,jdbcType=LONGVARCHAR},
|
|
|
|
sections = #{record.sections,jdbcType=LONGVARCHAR},
|
|
|
|
switchs = #{record.switchs,jdbcType=LONGVARCHAR},
|
|
|
|
signals = #{record.signals,jdbcType=LONGVARCHAR},
|
|
|
|
stands = #{record.stands,jdbcType=LONGVARCHAR},
|
|
|
|
trains = #{record.trains,jdbcType=LONGVARCHAR}
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
</if>
|
|
|
|
</update>
|
|
|
|
<update id="updateByExample" parameterType="map">
|
|
|
|
update draft_map_3d_data
|
|
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
|
|
map_id = #{record.mapId,jdbcType=BIGINT},
|
|
|
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
|
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
</if>
|
|
|
|
</update>
|
2020-11-19 18:28:54 +08:00
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.DraftMap3dDataWithBLOBs">
|
2020-11-19 10:07:10 +08:00
|
|
|
update draft_map_3d_data
|
|
|
|
<set>
|
|
|
|
<if test="mapId != null">
|
|
|
|
map_id = #{mapId,jdbcType=BIGINT},
|
|
|
|
</if>
|
|
|
|
<if test="creatorId != null">
|
|
|
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
|
|
|
</if>
|
|
|
|
<if test="createTime != null">
|
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
</if>
|
|
|
|
<if test="updateTime != null">
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
</if>
|
|
|
|
<if test="assets != null">
|
|
|
|
assets = #{assets,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="sections != null">
|
|
|
|
sections = #{sections,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="switchs != null">
|
|
|
|
switchs = #{switchs,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="signals != null">
|
|
|
|
signals = #{signals,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="stands != null">
|
|
|
|
stands = #{stands,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
<if test="trains != null">
|
|
|
|
trains = #{trains,jdbcType=LONGVARCHAR},
|
|
|
|
</if>
|
|
|
|
</set>
|
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
|
</update>
|
2020-11-19 18:28:54 +08:00
|
|
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="club.joylink.rtss.entity.DraftMap3dDataWithBLOBs">
|
2020-11-19 10:07:10 +08:00
|
|
|
update draft_map_3d_data
|
|
|
|
set map_id = #{mapId,jdbcType=BIGINT},
|
|
|
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
assets = #{assets,jdbcType=LONGVARCHAR},
|
|
|
|
sections = #{sections,jdbcType=LONGVARCHAR},
|
|
|
|
switchs = #{switchs,jdbcType=LONGVARCHAR},
|
|
|
|
signals = #{signals,jdbcType=LONGVARCHAR},
|
|
|
|
stands = #{stands,jdbcType=LONGVARCHAR},
|
|
|
|
trains = #{trains,jdbcType=LONGVARCHAR}
|
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
|
</update>
|
2020-11-19 18:28:54 +08:00
|
|
|
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.DraftMap3dData">
|
2020-11-19 10:07:10 +08:00
|
|
|
update draft_map_3d_data
|
|
|
|
set map_id = #{mapId,jdbcType=BIGINT},
|
|
|
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
|
</update>
|
|
|
|
</mapper>
|