EqpVirtualParkRecordMapper.xml 12.4 KB
<?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.zteits.park.mapper.EqpVirtualParkRecordMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.EqpVirtualParkRecord">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="eqp_type" jdbcType="INTEGER" property="eqpType" />
    <result column="eqp_no" jdbcType="VARCHAR" property="eqpNo" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
    <result column="berth_no" jdbcType="VARCHAR" property="berthNo" />
    <result column="berth_range_no" jdbcType="VARCHAR" property="berthRangeNo" />
    <result column="pl_name" jdbcType="VARCHAR" property="plName" />
    <result column="pl_type" jdbcType="INTEGER" property="plType" />
    <result column="eqp_in_time" jdbcType="TIMESTAMP" property="eqpInTime" />
    <result column="eqp_out_time" jdbcType="TIMESTAMP" property="eqpOutTime" />
    <result column="park_duration" jdbcType="BIGINT" property="parkDuration" />
    <result column="park_fee" jdbcType="INTEGER" property="parkFee" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  </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, eqp_out_time, eqp_type, eqp_no, berth_no, berth_range_no, pl_no, pl_name, pl_type,
    eqp_in_time, park_duration, park_fee, remark, create_date
  </sql>
  <select id="selectByExample" parameterType="com.zteits.park.domain.EqpVirtualParkRecordExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from eqp_virtual_park_record
    <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.Long" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from eqp_virtual_park_record
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from eqp_virtual_park_record
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.park.domain.EqpVirtualParkRecordExample">
    delete from eqp_virtual_park_record
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.park.domain.EqpVirtualParkRecord">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into eqp_virtual_park_record (eqp_type, eqp_no, berth_no, berth_range_no,pl_no,
    pl_name, pl_type, eqp_in_time,
    eqp_out_time, park_duration, park_fee,
    remark, create_date)
    values (#{eqpType,jdbcType=INTEGER}, #{eqpNo,jdbcType=VARCHAR},#{berthNo,jdbcType=VARCHAR}, #{berthRangeNo,jdbcType=VARCHAR},
            #{plNo,jdbcType=VARCHAR},
    #{plName,jdbcType=VARCHAR}, #{plType,jdbcType=INTEGER}, #{eqpInTime,jdbcType=TIMESTAMP},
    #{eqpOutTime,jdbcType=TIMESTAMP}, #{parkDuration,jdbcType=BIGINT}, #{parkFee,jdbcType=INTEGER},
    #{remark,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.park.domain.EqpVirtualParkRecord">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into eqp_virtual_park_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="eqpType != null">
        eqp_type,
      </if>
      <if test="eqpNo != null">
        eqp_no,
      </if>
      <if test="plNo != null">
        pl_no,
      </if>
      <if test="berthNo != null">
        berth_no,
      </if>
      <if test="berthRangeNo != null">
        berth_range_no,
      </if>
      <if test="plName != null">
        pl_name,
      </if>
      <if test="plType != null">
        pl_type,
      </if>
      <if test="eqpInTime != null">
        eqp_in_time,
      </if>
      <if test="eqpOutTime != null">
        eqp_out_time,
      </if>
      <if test="parkDuration != null">
        park_duration,
      </if>
      <if test="parkFee != null">
        park_fee,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="eqpType != null">
        #{eqpType,jdbcType=INTEGER},
      </if>
      <if test="eqpNo != null">
        #{eqpNo,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null">
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="berthNo != null">
        #{berthNo,jdbcType=VARCHAR},
      </if>
      <if test="berthRangeNo != null">
        #{berthRangeNo,jdbcType=VARCHAR},
      </if>
      <if test="plName != null">
        #{plName,jdbcType=VARCHAR},
      </if>
      <if test="plType != null">
        #{plType,jdbcType=INTEGER},
      </if>
      <if test="eqpInTime != null">
        #{eqpInTime,jdbcType=TIMESTAMP},
      </if>
      <if test="eqpOutTime != null">
        #{eqpOutTime,jdbcType=TIMESTAMP},
      </if>
      <if test="parkDuration != null">
        #{parkDuration,jdbcType=BIGINT},
      </if>
      <if test="parkFee != null">
        #{parkFee,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.park.domain.EqpVirtualParkRecordExample" resultType="java.lang.Long">
    select count(*) from eqp_virtual_park_record
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update eqp_virtual_park_record
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.eqpType != null">
        eqp_type = #{record.eqpType,jdbcType=INTEGER},
      </if>
      <if test="record.eqpNo != null">
        eqp_no = #{record.eqpNo,jdbcType=VARCHAR},
      </if>
      <if test="record.plNo != null">
        pl_no = #{record.plNo,jdbcType=VARCHAR},
      </if>
      <if test="record.plName != null">
        pl_name = #{record.plName,jdbcType=VARCHAR},
      </if>
      <if test="record.plType != null">
        pl_type = #{record.plType,jdbcType=INTEGER},
      </if>
      <if test="record.eqpInTime != null">
        eqp_in_time = #{record.eqpInTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.eqpOutTime != null">
        eqp_out_time = #{record.eqpOutTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.parkDuration != null">
        park_duration = #{record.parkDuration,jdbcType=BIGINT},
      </if>
      <if test="record.parkFee != null">
        park_fee = #{record.parkFee,jdbcType=INTEGER},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.createDate != null">
        create_date = #{record.createDate,jdbcType=TIMESTAMP},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update eqp_virtual_park_record
    set id = #{record.id,jdbcType=BIGINT},
    eqp_type = #{record.eqpType,jdbcType=INTEGER},
    eqp_no = #{record.eqpNo,jdbcType=VARCHAR},
    pl_no = #{record.plNo,jdbcType=VARCHAR},
    pl_name = #{record.plName,jdbcType=VARCHAR},
    pl_type = #{record.plType,jdbcType=INTEGER},
    eqp_in_time = #{record.eqpInTime,jdbcType=TIMESTAMP},
    eqp_out_time = #{record.eqpOutTime,jdbcType=TIMESTAMP},
    park_duration = #{record.parkDuration,jdbcType=BIGINT},
    park_fee = #{record.parkFee,jdbcType=INTEGER},
    remark = #{record.remark,jdbcType=VARCHAR},
    create_date = #{record.createDate,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.park.domain.EqpVirtualParkRecord">
    update eqp_virtual_park_record
    <set>
      <if test="eqpType != null">
        eqp_type = #{eqpType,jdbcType=INTEGER},
      </if>
      <if test="eqpNo != null">
        eqp_no = #{eqpNo,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null">
        pl_no = #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="plName != null">
        pl_name = #{plName,jdbcType=VARCHAR},
      </if>
      <if test="plType != null">
        pl_type = #{plType,jdbcType=INTEGER},
      </if>
      <if test="eqpInTime != null">
        eqp_in_time = #{eqpInTime,jdbcType=TIMESTAMP},
      </if>
      <if test="eqpOutTime != null">
        eqp_out_time = #{eqpOutTime,jdbcType=TIMESTAMP},
      </if>
      <if test="parkDuration != null">
        park_duration = #{parkDuration,jdbcType=BIGINT},
      </if>
      <if test="parkFee != null">
        park_fee = #{parkFee,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.park.domain.EqpVirtualParkRecord">
    update eqp_virtual_park_record
    set eqp_type = #{eqpType,jdbcType=INTEGER},
        eqp_no = #{eqpNo,jdbcType=VARCHAR},
        pl_no = #{plNo,jdbcType=VARCHAR},
        pl_name = #{plName,jdbcType=VARCHAR},
        pl_type = #{plType,jdbcType=INTEGER},
        eqp_in_time = #{eqpInTime,jdbcType=TIMESTAMP},
        eqp_out_time = #{eqpOutTime,jdbcType=TIMESTAMP},
        park_duration = #{parkDuration,jdbcType=BIGINT},
        park_fee = #{parkFee,jdbcType=INTEGER},
        remark = #{remark,jdbcType=VARCHAR},
        create_date = #{createDate,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>