TIncomeCalculationStaticNumMapper.xml 12.7 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.TIncomeCalculationStaticNumMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.TIncomeCalculationStaticNum">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="static_date" jdbcType="VARCHAR" property="staticDate" />
    <result column="pl_area_block_id" jdbcType="BIGINT" property="plAreaBlockId" />
    <result column="pl_area_block_name" jdbcType="VARCHAR" property="plAreaBlockName" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
    <result column="pl_type" jdbcType="INTEGER" property="plType" />
    <result column="pl_name" jdbcType="VARCHAR" property="plName" />
    <result column="car_type" jdbcType="INTEGER" property="carType" />
    <result column="all_num" jdbcType="BIGINT" property="allNum" />
    <result column="free_num" jdbcType="INTEGER" property="freeNum" />
    <result column="day_num" jdbcType="INTEGER" property="dayNum" />
    <result column="night_num" jdbcType="INTEGER" property="nightNum" />
    <result column="berth_num" jdbcType="INTEGER" property="berthNum" />
  </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, static_date, pl_area_block_id, pl_area_block_name, pl_no, pl_type, pl_name, car_type, 
    all_num, free_num, day_num, night_num, berth_num
  </sql>
  <select id="selectByExample" parameterType="com.zteits.park.domain.TIncomeCalculationStaticNumExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from t_income_calculation_static_num
    <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 t_income_calculation_static_num
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from t_income_calculation_static_num
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.park.domain.TIncomeCalculationStaticNumExample">
    delete from t_income_calculation_static_num
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.park.domain.TIncomeCalculationStaticNum">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_income_calculation_static_num (static_date, pl_area_block_id, pl_area_block_name, 
      pl_no, pl_type, pl_name, 
      car_type, all_num, free_num, 
      day_num, night_num, berth_num
      )
    values (#{staticDate,jdbcType=VARCHAR}, #{plAreaBlockId,jdbcType=BIGINT}, #{plAreaBlockName,jdbcType=VARCHAR}, 
      #{plNo,jdbcType=VARCHAR}, #{plType,jdbcType=INTEGER}, #{plName,jdbcType=VARCHAR}, 
      #{carType,jdbcType=INTEGER}, #{allNum,jdbcType=BIGINT}, #{freeNum,jdbcType=INTEGER}, 
      #{dayNum,jdbcType=INTEGER}, #{nightNum,jdbcType=INTEGER}, #{berthNum,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.park.domain.TIncomeCalculationStaticNum">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_income_calculation_static_num
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="staticDate != null">
        static_date,
      </if>
      <if test="plAreaBlockId != null">
        pl_area_block_id,
      </if>
      <if test="plAreaBlockName != null">
        pl_area_block_name,
      </if>
      <if test="plNo != null">
        pl_no,
      </if>
      <if test="plType != null">
        pl_type,
      </if>
      <if test="plName != null">
        pl_name,
      </if>
      <if test="carType != null">
        car_type,
      </if>
      <if test="allNum != null">
        all_num,
      </if>
      <if test="freeNum != null">
        free_num,
      </if>
      <if test="dayNum != null">
        day_num,
      </if>
      <if test="nightNum != null">
        night_num,
      </if>
      <if test="berthNum != null">
        berth_num,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="staticDate != null">
        #{staticDate,jdbcType=VARCHAR},
      </if>
      <if test="plAreaBlockId != null">
        #{plAreaBlockId,jdbcType=BIGINT},
      </if>
      <if test="plAreaBlockName != null">
        #{plAreaBlockName,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null">
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="plType != null">
        #{plType,jdbcType=INTEGER},
      </if>
      <if test="plName != null">
        #{plName,jdbcType=VARCHAR},
      </if>
      <if test="carType != null">
        #{carType,jdbcType=INTEGER},
      </if>
      <if test="allNum != null">
        #{allNum,jdbcType=BIGINT},
      </if>
      <if test="freeNum != null">
        #{freeNum,jdbcType=INTEGER},
      </if>
      <if test="dayNum != null">
        #{dayNum,jdbcType=INTEGER},
      </if>
      <if test="nightNum != null">
        #{nightNum,jdbcType=INTEGER},
      </if>
      <if test="berthNum != null">
        #{berthNum,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.park.domain.TIncomeCalculationStaticNumExample" resultType="java.lang.Long">
    select count(*) from t_income_calculation_static_num
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update t_income_calculation_static_num
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.staticDate != null">
        static_date = #{record.staticDate,jdbcType=VARCHAR},
      </if>
      <if test="record.plAreaBlockId != null">
        pl_area_block_id = #{record.plAreaBlockId,jdbcType=BIGINT},
      </if>
      <if test="record.plAreaBlockName != null">
        pl_area_block_name = #{record.plAreaBlockName,jdbcType=VARCHAR},
      </if>
      <if test="record.plNo != null">
        pl_no = #{record.plNo,jdbcType=VARCHAR},
      </if>
      <if test="record.plType != null">
        pl_type = #{record.plType,jdbcType=INTEGER},
      </if>
      <if test="record.plName != null">
        pl_name = #{record.plName,jdbcType=VARCHAR},
      </if>
      <if test="record.carType != null">
        car_type = #{record.carType,jdbcType=INTEGER},
      </if>
      <if test="record.allNum != null">
        all_num = #{record.allNum,jdbcType=BIGINT},
      </if>
      <if test="record.freeNum != null">
        free_num = #{record.freeNum,jdbcType=INTEGER},
      </if>
      <if test="record.dayNum != null">
        day_num = #{record.dayNum,jdbcType=INTEGER},
      </if>
      <if test="record.nightNum != null">
        night_num = #{record.nightNum,jdbcType=INTEGER},
      </if>
      <if test="record.berthNum != null">
        berth_num = #{record.berthNum,jdbcType=INTEGER},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update t_income_calculation_static_num
    set id = #{record.id,jdbcType=BIGINT},
      static_date = #{record.staticDate,jdbcType=VARCHAR},
      pl_area_block_id = #{record.plAreaBlockId,jdbcType=BIGINT},
      pl_area_block_name = #{record.plAreaBlockName,jdbcType=VARCHAR},
      pl_no = #{record.plNo,jdbcType=VARCHAR},
      pl_type = #{record.plType,jdbcType=INTEGER},
      pl_name = #{record.plName,jdbcType=VARCHAR},
      car_type = #{record.carType,jdbcType=INTEGER},
      all_num = #{record.allNum,jdbcType=BIGINT},
      free_num = #{record.freeNum,jdbcType=INTEGER},
      day_num = #{record.dayNum,jdbcType=INTEGER},
      night_num = #{record.nightNum,jdbcType=INTEGER},
      berth_num = #{record.berthNum,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.park.domain.TIncomeCalculationStaticNum">
    update t_income_calculation_static_num
    <set>
      <if test="staticDate != null">
        static_date = #{staticDate,jdbcType=VARCHAR},
      </if>
      <if test="plAreaBlockId != null">
        pl_area_block_id = #{plAreaBlockId,jdbcType=BIGINT},
      </if>
      <if test="plAreaBlockName != null">
        pl_area_block_name = #{plAreaBlockName,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null">
        pl_no = #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="plType != null">
        pl_type = #{plType,jdbcType=INTEGER},
      </if>
      <if test="plName != null">
        pl_name = #{plName,jdbcType=VARCHAR},
      </if>
      <if test="carType != null">
        car_type = #{carType,jdbcType=INTEGER},
      </if>
      <if test="allNum != null">
        all_num = #{allNum,jdbcType=BIGINT},
      </if>
      <if test="freeNum != null">
        free_num = #{freeNum,jdbcType=INTEGER},
      </if>
      <if test="dayNum != null">
        day_num = #{dayNum,jdbcType=INTEGER},
      </if>
      <if test="nightNum != null">
        night_num = #{nightNum,jdbcType=INTEGER},
      </if>
      <if test="berthNum != null">
        berth_num = #{berthNum,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.park.domain.TIncomeCalculationStaticNum">
    update t_income_calculation_static_num
    set static_date = #{staticDate,jdbcType=VARCHAR},
      pl_area_block_id = #{plAreaBlockId,jdbcType=BIGINT},
      pl_area_block_name = #{plAreaBlockName,jdbcType=VARCHAR},
      pl_no = #{plNo,jdbcType=VARCHAR},
      pl_type = #{plType,jdbcType=INTEGER},
      pl_name = #{plName,jdbcType=VARCHAR},
      car_type = #{carType,jdbcType=INTEGER},
      all_num = #{allNum,jdbcType=BIGINT},
      free_num = #{freeNum,jdbcType=INTEGER},
      day_num = #{dayNum,jdbcType=INTEGER},
      night_num = #{nightNum,jdbcType=INTEGER},
      berth_num = #{berthNum,jdbcType=INTEGER}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>