TdBOrderIncomeCalculationMapper.xml 10.3 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.order.mapper.TdBOrderIncomeCalculationMapper" >
  <resultMap id="BaseResultMap" type="com.zteits.order.domain.TdBOrderIncomeCalculation" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="order_id" property="orderId" jdbcType="VARCHAR" />
    <result column="pl_no" property="plNo" jdbcType="VARCHAR" />
    <result column="pl_name" property="plName" jdbcType="VARCHAR" />
    <result column="park_in_time" property="parkInTime" jdbcType="TIMESTAMP" />
    <result column="park_out_time" property="parkOutTime" jdbcType="TIMESTAMP" />
    <result column="car_type" property="carType" jdbcType="INTEGER" />
    <result column="berth_no" property="berthNo" jdbcType="VARCHAR" />
    <result column="pay_type" property="payType" jdbcType="INTEGER" />
    <result column="pay_source" property="paySource" jdbcType="INTEGER" />
    <result column="disc_value" property="discValue" jdbcType="VARCHAR" />
    <result column="amount" property="amount" jdbcType="BIGINT" />
    <result column="disc_amount" property="discAmount" jdbcType="BIGINT" />
    <result column="pl_area_block_id" property="plAreaBlockId" jdbcType="BIGINT" />
    <result column="pl_area_block_name" property="plAreaBlockName" jdbcType="VARCHAR" />
    <result column="parking_duration" property="parkingDuration" jdbcType="BIGINT" />
    <result column="berth_range_name" property="berthRangeName" jdbcType="VARCHAR" />
    <result column="berth_range_no" property="berthRangeNo" jdbcType="VARCHAR" />
    <result column="data_state" property="dataState" jdbcType="INTEGER" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, order_id, pl_no, pl_name, park_in_time, park_out_time, car_type, berth_no, pay_type, 
    pay_source, disc_value, amount, disc_amount, pl_area_block_id, pl_area_block_name, 
    parking_duration, berth_range_name, berth_range_no, data_state, create_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    from td_b_order_income_calculation
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from td_b_order_income_calculation
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.order.domain.TdBOrderIncomeCalculation" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_order_income_calculation (order_id, pl_no, pl_name, 
      park_in_time, park_out_time, car_type, 
      berth_no, pay_type, pay_source, 
      disc_value, amount, disc_amount, 
      pl_area_block_id, pl_area_block_name, parking_duration, 
      berth_range_name, berth_range_no, data_state, 
      create_time)
    values (#{orderId,jdbcType=VARCHAR}, #{plNo,jdbcType=VARCHAR}, #{plName,jdbcType=VARCHAR}, 
      #{parkInTime,jdbcType=TIMESTAMP}, #{parkOutTime,jdbcType=TIMESTAMP}, #{carType,jdbcType=INTEGER}, 
      #{berthNo,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER}, #{paySource,jdbcType=INTEGER}, 
      #{discValue,jdbcType=VARCHAR}, #{amount,jdbcType=BIGINT}, #{discAmount,jdbcType=BIGINT}, 
      #{plAreaBlockId,jdbcType=BIGINT}, #{plAreaBlockName,jdbcType=VARCHAR}, #{parkingDuration,jdbcType=BIGINT}, 
      #{berthRangeName,jdbcType=VARCHAR}, #{berthRangeNo,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, 
      #{createTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.order.domain.TdBOrderIncomeCalculation" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_order_income_calculation
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="orderId != null" >
        order_id,
      </if>
      <if test="plNo != null" >
        pl_no,
      </if>
      <if test="plName != null" >
        pl_name,
      </if>
      <if test="parkInTime != null" >
        park_in_time,
      </if>
      <if test="parkOutTime != null" >
        park_out_time,
      </if>
      <if test="carType != null" >
        car_type,
      </if>
      <if test="berthNo != null" >
        berth_no,
      </if>
      <if test="payType != null" >
        pay_type,
      </if>
      <if test="paySource != null" >
        pay_source,
      </if>
      <if test="discValue != null" >
        disc_value,
      </if>
      <if test="amount != null" >
        amount,
      </if>
      <if test="discAmount != null" >
        disc_amount,
      </if>
      <if test="plAreaBlockId != null" >
        pl_area_block_id,
      </if>
      <if test="plAreaBlockName != null" >
        pl_area_block_name,
      </if>
      <if test="parkingDuration != null" >
        parking_duration,
      </if>
      <if test="berthRangeName != null" >
        berth_range_name,
      </if>
      <if test="berthRangeNo != null" >
        berth_range_no,
      </if>
      <if test="dataState != null" >
        data_state,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="orderId != null" >
        #{orderId,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null" >
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="plName != null" >
        #{plName,jdbcType=VARCHAR},
      </if>
      <if test="parkInTime != null" >
        #{parkInTime,jdbcType=TIMESTAMP},
      </if>
      <if test="parkOutTime != null" >
        #{parkOutTime,jdbcType=TIMESTAMP},
      </if>
      <if test="carType != null" >
        #{carType,jdbcType=INTEGER},
      </if>
      <if test="berthNo != null" >
        #{berthNo,jdbcType=VARCHAR},
      </if>
      <if test="payType != null" >
        #{payType,jdbcType=INTEGER},
      </if>
      <if test="paySource != null" >
        #{paySource,jdbcType=INTEGER},
      </if>
      <if test="discValue != null" >
        #{discValue,jdbcType=VARCHAR},
      </if>
      <if test="amount != null" >
        #{amount,jdbcType=BIGINT},
      </if>
      <if test="discAmount != null" >
        #{discAmount,jdbcType=BIGINT},
      </if>
      <if test="plAreaBlockId != null" >
        #{plAreaBlockId,jdbcType=BIGINT},
      </if>
      <if test="plAreaBlockName != null" >
        #{plAreaBlockName,jdbcType=VARCHAR},
      </if>
      <if test="parkingDuration != null" >
        #{parkingDuration,jdbcType=BIGINT},
      </if>
      <if test="berthRangeName != null" >
        #{berthRangeName,jdbcType=VARCHAR},
      </if>
      <if test="berthRangeNo != null" >
        #{berthRangeNo,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null" >
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.order.domain.TdBOrderIncomeCalculation" >
    update td_b_order_income_calculation
    <set >
      <if test="orderId != null" >
        order_id = #{orderId,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="parkInTime != null" >
        park_in_time = #{parkInTime,jdbcType=TIMESTAMP},
      </if>
      <if test="parkOutTime != null" >
        park_out_time = #{parkOutTime,jdbcType=TIMESTAMP},
      </if>
      <if test="carType != null" >
        car_type = #{carType,jdbcType=INTEGER},
      </if>
      <if test="berthNo != null" >
        berth_no = #{berthNo,jdbcType=VARCHAR},
      </if>
      <if test="payType != null" >
        pay_type = #{payType,jdbcType=INTEGER},
      </if>
      <if test="paySource != null" >
        pay_source = #{paySource,jdbcType=INTEGER},
      </if>
      <if test="discValue != null" >
        disc_value = #{discValue,jdbcType=VARCHAR},
      </if>
      <if test="amount != null" >
        amount = #{amount,jdbcType=BIGINT},
      </if>
      <if test="discAmount != null" >
        disc_amount = #{discAmount,jdbcType=BIGINT},
      </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="parkingDuration != null" >
        parking_duration = #{parkingDuration,jdbcType=BIGINT},
      </if>
      <if test="berthRangeName != null" >
        berth_range_name = #{berthRangeName,jdbcType=VARCHAR},
      </if>
      <if test="berthRangeNo != null" >
        berth_range_no = #{berthRangeNo,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null" >
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.order.domain.TdBOrderIncomeCalculation" >
    update td_b_order_income_calculation
    set order_id = #{orderId,jdbcType=VARCHAR},
      pl_no = #{plNo,jdbcType=VARCHAR},
      pl_name = #{plName,jdbcType=VARCHAR},
      park_in_time = #{parkInTime,jdbcType=TIMESTAMP},
      park_out_time = #{parkOutTime,jdbcType=TIMESTAMP},
      car_type = #{carType,jdbcType=INTEGER},
      berth_no = #{berthNo,jdbcType=VARCHAR},
      pay_type = #{payType,jdbcType=INTEGER},
      pay_source = #{paySource,jdbcType=INTEGER},
      disc_value = #{discValue,jdbcType=VARCHAR},
      amount = #{amount,jdbcType=BIGINT},
      disc_amount = #{discAmount,jdbcType=BIGINT},
      pl_area_block_id = #{plAreaBlockId,jdbcType=BIGINT},
      pl_area_block_name = #{plAreaBlockName,jdbcType=VARCHAR},
      parking_duration = #{parkingDuration,jdbcType=BIGINT},
      berth_range_name = #{berthRangeName,jdbcType=VARCHAR},
      berth_range_no = #{berthRangeNo,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>