385 lines
15 KiB
XML
385 lines
15 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.PlanRoutingDAO">
|
|
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.PlanRouting">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
<result column="start_station_code" jdbcType="VARCHAR" property="startStationCode" />
|
|
<result column="start_section_code" jdbcType="VARCHAR" property="startSectionCode" />
|
|
<result column="end_station_code" jdbcType="VARCHAR" property="endStationCode" />
|
|
<result column="end_section_code" jdbcType="VARCHAR" property="endSectionCode" />
|
|
<result column="description" jdbcType="VARCHAR" property="description" />
|
|
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
</resultMap>
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.entity.PlanRouting">
|
|
<result column="via_sections" jdbcType="LONGVARCHAR" property="viaSections" />
|
|
</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, `name`, start_station_code, start_section_code, end_station_code, end_section_code,
|
|
description, user_id, create_time, update_time
|
|
</sql>
|
|
<sql id="Blob_Column_List">
|
|
via_sections
|
|
</sql>
|
|
<select id="selectByExampleWithBLOBs" parameterType="club.joylink.rtss.entity.PlanRoutingExample" resultMap="ResultMapWithBLOBs">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
,
|
|
<include refid="Blob_Column_List" />
|
|
from plan_routing
|
|
<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.PlanRoutingExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from plan_routing
|
|
<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 plan_routing
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from plan_routing
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.PlanRoutingExample">
|
|
delete from plan_routing
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.PlanRouting" useGeneratedKeys="true">
|
|
insert into plan_routing (map_id, `name`, start_station_code,
|
|
start_section_code, end_station_code, end_section_code,
|
|
description, user_id, create_time,
|
|
update_time, via_sections)
|
|
values (#{mapId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{startStationCode,jdbcType=VARCHAR},
|
|
#{startSectionCode,jdbcType=VARCHAR}, #{endStationCode,jdbcType=VARCHAR}, #{endSectionCode,jdbcType=VARCHAR},
|
|
#{description,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
|
#{updateTime,jdbcType=TIMESTAMP}, #{viaSections,jdbcType=LONGVARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.PlanRouting" useGeneratedKeys="true">
|
|
insert into plan_routing
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="mapId != null">
|
|
map_id,
|
|
</if>
|
|
<if test="name != null">
|
|
`name`,
|
|
</if>
|
|
<if test="startStationCode != null">
|
|
start_station_code,
|
|
</if>
|
|
<if test="startSectionCode != null">
|
|
start_section_code,
|
|
</if>
|
|
<if test="endStationCode != null">
|
|
end_station_code,
|
|
</if>
|
|
<if test="endSectionCode != null">
|
|
end_section_code,
|
|
</if>
|
|
<if test="description != null">
|
|
description,
|
|
</if>
|
|
<if test="userId != null">
|
|
user_id,
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time,
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time,
|
|
</if>
|
|
<if test="viaSections != null">
|
|
via_sections,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="mapId != null">
|
|
#{mapId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="name != null">
|
|
#{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="startStationCode != null">
|
|
#{startStationCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="startSectionCode != null">
|
|
#{startSectionCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="endStationCode != null">
|
|
#{endStationCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="endSectionCode != null">
|
|
#{endSectionCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="description != null">
|
|
#{description,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="userId != null">
|
|
#{userId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="createTime != null">
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="viaSections != null">
|
|
#{viaSections,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="club.joylink.rtss.entity.PlanRoutingExample" resultType="java.lang.Long">
|
|
select count(*) from plan_routing
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update plan_routing
|
|
<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.name != null">
|
|
`name` = #{record.name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.startStationCode != null">
|
|
start_station_code = #{record.startStationCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.startSectionCode != null">
|
|
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.endStationCode != null">
|
|
end_station_code = #{record.endStationCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.endSectionCode != null">
|
|
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.description != null">
|
|
description = #{record.description,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.userId != null">
|
|
user_id = #{record.userId,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.viaSections != null">
|
|
via_sections = #{record.viaSections,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
|
update plan_routing
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
map_id = #{record.mapId,jdbcType=BIGINT},
|
|
`name` = #{record.name,jdbcType=VARCHAR},
|
|
start_station_code = #{record.startStationCode,jdbcType=VARCHAR},
|
|
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
|
end_station_code = #{record.endStationCode,jdbcType=VARCHAR},
|
|
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
|
description = #{record.description,jdbcType=VARCHAR},
|
|
user_id = #{record.userId,jdbcType=BIGINT},
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
via_sections = #{record.viaSections,jdbcType=LONGVARCHAR}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update plan_routing
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
map_id = #{record.mapId,jdbcType=BIGINT},
|
|
`name` = #{record.name,jdbcType=VARCHAR},
|
|
start_station_code = #{record.startStationCode,jdbcType=VARCHAR},
|
|
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
|
end_station_code = #{record.endStationCode,jdbcType=VARCHAR},
|
|
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
|
description = #{record.description,jdbcType=VARCHAR},
|
|
user_id = #{record.userId,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>
|
|
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.PlanRouting">
|
|
update plan_routing
|
|
<set>
|
|
<if test="mapId != null">
|
|
map_id = #{mapId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="name != null">
|
|
`name` = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="startStationCode != null">
|
|
start_station_code = #{startStationCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="startSectionCode != null">
|
|
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="endStationCode != null">
|
|
end_station_code = #{endStationCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="endSectionCode != null">
|
|
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="description != null">
|
|
description = #{description,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="userId != null">
|
|
user_id = #{userId,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="viaSections != null">
|
|
via_sections = #{viaSections,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="club.joylink.rtss.entity.PlanRouting">
|
|
update plan_routing
|
|
set map_id = #{mapId,jdbcType=BIGINT},
|
|
`name` = #{name,jdbcType=VARCHAR},
|
|
start_station_code = #{startStationCode,jdbcType=VARCHAR},
|
|
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
|
end_station_code = #{endStationCode,jdbcType=VARCHAR},
|
|
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
|
description = #{description,jdbcType=VARCHAR},
|
|
user_id = #{userId,jdbcType=BIGINT},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
via_sections = #{viaSections,jdbcType=LONGVARCHAR}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.PlanRouting">
|
|
update plan_routing
|
|
set map_id = #{mapId,jdbcType=BIGINT},
|
|
`name` = #{name,jdbcType=VARCHAR},
|
|
start_station_code = #{startStationCode,jdbcType=VARCHAR},
|
|
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
|
end_station_code = #{endStationCode,jdbcType=VARCHAR},
|
|
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
|
description = #{description,jdbcType=VARCHAR},
|
|
user_id = #{userId,jdbcType=BIGINT},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper> |