260 lines
9.0 KiB
XML
260 lines
9.0 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.joylink.ms.dao.RunPlanToolsDAO">
|
||
|
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RunPlanTools">
|
||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||
|
<result column="group_id" jdbcType="BIGINT" property="groupId" />
|
||
|
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||
|
</resultMap>
|
||
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.RunPlanTools">
|
||
|
<result column="trip" jdbcType="LONGVARCHAR" property="trip" />
|
||
|
<result column="area" jdbcType="LONGVARCHAR" property="area" />
|
||
|
</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, group_id, map_id
|
||
|
</sql>
|
||
|
<sql id="Blob_Column_List">
|
||
|
trip, area
|
||
|
</sql>
|
||
|
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.RunPlanToolsExample" resultMap="ResultMapWithBLOBs">
|
||
|
select
|
||
|
<if test="distinct">
|
||
|
distinct
|
||
|
</if>
|
||
|
<include refid="Base_Column_List" />
|
||
|
,
|
||
|
<include refid="Blob_Column_List" />
|
||
|
from run_plan_tools
|
||
|
<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="com.joylink.ms.entity.RunPlanToolsExample" resultMap="BaseResultMap">
|
||
|
select
|
||
|
<if test="distinct">
|
||
|
distinct
|
||
|
</if>
|
||
|
<include refid="Base_Column_List" />
|
||
|
from run_plan_tools
|
||
|
<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 run_plan_tools
|
||
|
where id = #{id,jdbcType=BIGINT}
|
||
|
</select>
|
||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||
|
delete from run_plan_tools
|
||
|
where id = #{id,jdbcType=BIGINT}
|
||
|
</delete>
|
||
|
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RunPlanToolsExample">
|
||
|
delete from run_plan_tools
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Example_Where_Clause" />
|
||
|
</if>
|
||
|
</delete>
|
||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanTools" useGeneratedKeys="true">
|
||
|
insert into run_plan_tools (group_id, map_id, trip,
|
||
|
area)
|
||
|
values (#{groupId,jdbcType=BIGINT}, #{mapId,jdbcType=BIGINT}, #{trip,jdbcType=LONGVARCHAR},
|
||
|
#{area,jdbcType=LONGVARCHAR})
|
||
|
</insert>
|
||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanTools" useGeneratedKeys="true">
|
||
|
insert into run_plan_tools
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="groupId != null">
|
||
|
group_id,
|
||
|
</if>
|
||
|
<if test="mapId != null">
|
||
|
map_id,
|
||
|
</if>
|
||
|
<if test="trip != null">
|
||
|
trip,
|
||
|
</if>
|
||
|
<if test="area != null">
|
||
|
area,
|
||
|
</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="groupId != null">
|
||
|
#{groupId,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="mapId != null">
|
||
|
#{mapId,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="trip != null">
|
||
|
#{trip,jdbcType=LONGVARCHAR},
|
||
|
</if>
|
||
|
<if test="area != null">
|
||
|
#{area,jdbcType=LONGVARCHAR},
|
||
|
</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
<select id="countByExample" parameterType="com.joylink.ms.entity.RunPlanToolsExample" resultType="java.lang.Long">
|
||
|
select count(*) from run_plan_tools
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Example_Where_Clause" />
|
||
|
</if>
|
||
|
</select>
|
||
|
<update id="updateByExampleSelective" parameterType="map">
|
||
|
update run_plan_tools
|
||
|
<set>
|
||
|
<if test="record.id != null">
|
||
|
id = #{record.id,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="record.groupId != null">
|
||
|
group_id = #{record.groupId,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="record.mapId != null">
|
||
|
map_id = #{record.mapId,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="record.trip != null">
|
||
|
trip = #{record.trip,jdbcType=LONGVARCHAR},
|
||
|
</if>
|
||
|
<if test="record.area != null">
|
||
|
area = #{record.area,jdbcType=LONGVARCHAR},
|
||
|
</if>
|
||
|
</set>
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Update_By_Example_Where_Clause" />
|
||
|
</if>
|
||
|
</update>
|
||
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||
|
update run_plan_tools
|
||
|
set id = #{record.id,jdbcType=BIGINT},
|
||
|
group_id = #{record.groupId,jdbcType=BIGINT},
|
||
|
map_id = #{record.mapId,jdbcType=BIGINT},
|
||
|
trip = #{record.trip,jdbcType=LONGVARCHAR},
|
||
|
area = #{record.area,jdbcType=LONGVARCHAR}
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Update_By_Example_Where_Clause" />
|
||
|
</if>
|
||
|
</update>
|
||
|
<update id="updateByExample" parameterType="map">
|
||
|
update run_plan_tools
|
||
|
set id = #{record.id,jdbcType=BIGINT},
|
||
|
group_id = #{record.groupId,jdbcType=BIGINT},
|
||
|
map_id = #{record.mapId,jdbcType=BIGINT}
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Update_By_Example_Where_Clause" />
|
||
|
</if>
|
||
|
</update>
|
||
|
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RunPlanTools">
|
||
|
update run_plan_tools
|
||
|
<set>
|
||
|
<if test="groupId != null">
|
||
|
group_id = #{groupId,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="mapId != null">
|
||
|
map_id = #{mapId,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="trip != null">
|
||
|
trip = #{trip,jdbcType=LONGVARCHAR},
|
||
|
</if>
|
||
|
<if test="area != null">
|
||
|
area = #{area,jdbcType=LONGVARCHAR},
|
||
|
</if>
|
||
|
</set>
|
||
|
where id = #{id,jdbcType=BIGINT}
|
||
|
</update>
|
||
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.RunPlanTools">
|
||
|
update run_plan_tools
|
||
|
set group_id = #{groupId,jdbcType=BIGINT},
|
||
|
map_id = #{mapId,jdbcType=BIGINT},
|
||
|
trip = #{trip,jdbcType=LONGVARCHAR},
|
||
|
area = #{area,jdbcType=LONGVARCHAR}
|
||
|
where id = #{id,jdbcType=BIGINT}
|
||
|
</update>
|
||
|
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RunPlanTools">
|
||
|
update run_plan_tools
|
||
|
set group_id = #{groupId,jdbcType=BIGINT},
|
||
|
map_id = #{mapId,jdbcType=BIGINT}
|
||
|
where id = #{id,jdbcType=BIGINT}
|
||
|
</update>
|
||
|
</mapper>
|