TdPParkingShareLogMapper.xml 13.8 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.TdPParkingShareLogMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.TdPParkingShareLog">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
    <result column="ps_pre_in_time" jdbcType="TIMESTAMP" property="psPreInTime" />
    <result column="ps_pre_out_time" jdbcType="TIMESTAMP" property="psPreOutTime" />
    <result column="ps_in_time" jdbcType="TIMESTAMP" property="psInTime" />
    <result column="ps_out_time" jdbcType="TIMESTAMP" property="psOutTime" />
    <result column="ps_berth_no" jdbcType="VARCHAR" property="psBerthNo" />
    <result column="ps_order_id" jdbcType="VARCHAR" property="psOrderId" />
    <result column="ps_rent_duration" jdbcType="BIGINT" property="psRentDuration" />
    <result column="pay_status" jdbcType="CHAR" property="payStatus" />
    <result column="cust_id" jdbcType="VARCHAR" property="custId" />
    <result column="rent_fee" jdbcType="DECIMAL" property="rentFee" />
    <result column="car_number" jdbcType="VARCHAR" property="carNumber" />
    <result column="act_payed_fee" jdbcType="DECIMAL" property="actPayedFee" />
    <result column="payed_fee" jdbcType="DECIMAL" property="payedFee" />
    <result column="not_pay_fee" jdbcType="DECIMAL" property="notPayFee" />
    <result column="total_fee" jdbcType="DECIMAL" property="totalFee" />
    <result column="refunded_fee" jdbcType="DECIMAL" property="refundedFee" />
    <result column="ps_remark" jdbcType="VARCHAR" property="psRemark" />
    <result column="data_status" jdbcType="INTEGER" property="dataStatus" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_op" jdbcType="BIGINT" property="createOp" />
    <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
    <result column="modify_op" jdbcType="BIGINT" property="modifyOp" />
  </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="Base_Column_List">
    id, pl_no, ps_pre_in_time, ps_pre_out_time, ps_in_time, ps_out_time, ps_berth_no, 
    ps_order_id, ps_rent_duration, pay_status, cust_id, rent_fee, car_number, act_payed_fee, 
    payed_fee, not_pay_fee, total_fee, refunded_fee, ps_remark, data_status, create_time, 
    create_op, modify_time, modify_op
  </sql>
  <select id="selectByExample" parameterType="com.zteits.park.domain.TdPParkingShareLogExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    'false' as QUERYID,
    <include refid="Base_Column_List" />
    from td_p_parking_share_log
    <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 td_p_parking_share_log
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from td_p_parking_share_log
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.park.domain.TdPParkingShareLog">
  <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_p_parking_share_log (id, pl_no, ps_pre_in_time, 
      ps_pre_out_time, ps_in_time, ps_out_time, 
      ps_berth_no, ps_order_id, ps_rent_duration, 
      pay_status, cust_id, rent_fee, 
      car_number, act_payed_fee, payed_fee, 
      not_pay_fee, total_fee, refunded_fee, 
      ps_remark, data_status, create_time, 
      create_op, modify_time, modify_op
      )
    values (#{id,jdbcType=BIGINT}, #{plNo,jdbcType=VARCHAR}, #{psPreInTime,jdbcType=TIMESTAMP}, 
      #{psPreOutTime,jdbcType=TIMESTAMP}, #{psInTime,jdbcType=TIMESTAMP}, #{psOutTime,jdbcType=TIMESTAMP}, 
      #{psBerthNo,jdbcType=VARCHAR}, #{psOrderId,jdbcType=VARCHAR}, #{psRentDuration,jdbcType=BIGINT}, 
      #{payStatus,jdbcType=CHAR}, #{custId,jdbcType=VARCHAR}, #{rentFee,jdbcType=DECIMAL}, 
      #{carNumber,jdbcType=VARCHAR}, #{actPayedFee,jdbcType=DECIMAL}, #{payedFee,jdbcType=DECIMAL}, 
      #{notPayFee,jdbcType=DECIMAL}, #{totalFee,jdbcType=DECIMAL}, #{refundedFee,jdbcType=DECIMAL}, 
      #{psRemark,jdbcType=VARCHAR}, #{dataStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
      #{createOp,jdbcType=BIGINT}, #{modifyTime,jdbcType=TIMESTAMP}, #{modifyOp,jdbcType=BIGINT}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.park.domain.TdPParkingShareLog">
  <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_p_parking_share_log
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="plNo != null">
        pl_no,
      </if>
      <if test="psPreInTime != null">
        ps_pre_in_time,
      </if>
      <if test="psPreOutTime != null">
        ps_pre_out_time,
      </if>
      <if test="psInTime != null">
        ps_in_time,
      </if>
      <if test="psOutTime != null">
        ps_out_time,
      </if>
      <if test="psBerthNo != null">
        ps_berth_no,
      </if>
      <if test="psOrderId != null">
        ps_order_id,
      </if>
      <if test="psRentDuration != null">
        ps_rent_duration,
      </if>
      <if test="payStatus != null">
        pay_status,
      </if>
      <if test="custId != null">
        cust_id,
      </if>
      <if test="rentFee != null">
        rent_fee,
      </if>
      <if test="carNumber != null">
        car_number,
      </if>
      <if test="actPayedFee != null">
        act_payed_fee,
      </if>
      <if test="payedFee != null">
        payed_fee,
      </if>
      <if test="notPayFee != null">
        not_pay_fee,
      </if>
      <if test="totalFee != null">
        total_fee,
      </if>
      <if test="refundedFee != null">
        refunded_fee,
      </if>
      <if test="psRemark != null">
        ps_remark,
      </if>
      <if test="dataStatus != null">
        data_status,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="createOp != null">
        create_op,
      </if>
      <if test="modifyTime != null">
        modify_time,
      </if>
      <if test="modifyOp != null">
        modify_op,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="plNo != null">
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="psPreInTime != null">
        #{psPreInTime,jdbcType=TIMESTAMP},
      </if>
      <if test="psPreOutTime != null">
        #{psPreOutTime,jdbcType=TIMESTAMP},
      </if>
      <if test="psInTime != null">
        #{psInTime,jdbcType=TIMESTAMP},
      </if>
      <if test="psOutTime != null">
        #{psOutTime,jdbcType=TIMESTAMP},
      </if>
      <if test="psBerthNo != null">
        #{psBerthNo,jdbcType=VARCHAR},
      </if>
      <if test="psOrderId != null">
        #{psOrderId,jdbcType=VARCHAR},
      </if>
      <if test="psRentDuration != null">
        #{psRentDuration,jdbcType=BIGINT},
      </if>
      <if test="payStatus != null">
        #{payStatus,jdbcType=CHAR},
      </if>
      <if test="custId != null">
        #{custId,jdbcType=VARCHAR},
      </if>
      <if test="rentFee != null">
        #{rentFee,jdbcType=DECIMAL},
      </if>
      <if test="carNumber != null">
        #{carNumber,jdbcType=VARCHAR},
      </if>
      <if test="actPayedFee != null">
        #{actPayedFee,jdbcType=DECIMAL},
      </if>
      <if test="payedFee != null">
        #{payedFee,jdbcType=DECIMAL},
      </if>
      <if test="notPayFee != null">
        #{notPayFee,jdbcType=DECIMAL},
      </if>
      <if test="totalFee != null">
        #{totalFee,jdbcType=DECIMAL},
      </if>
      <if test="refundedFee != null">
        #{refundedFee,jdbcType=DECIMAL},
      </if>
      <if test="psRemark != null">
        #{psRemark,jdbcType=VARCHAR},
      </if>
      <if test="dataStatus != null">
        #{dataStatus,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createOp != null">
        #{createOp,jdbcType=BIGINT},
      </if>
      <if test="modifyTime != null">
        #{modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        #{modifyOp,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.park.domain.TdPParkingShareLogExample" resultType="java.lang.Integer">
    select count(*) from td_p_parking_share_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.park.domain.TdPParkingShareLog">
    update td_p_parking_share_log
    <set>
      <if test="plNo != null">
        pl_no = #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="psPreInTime != null">
        ps_pre_in_time = #{psPreInTime,jdbcType=TIMESTAMP},
      </if>
      <if test="psPreOutTime != null">
        ps_pre_out_time = #{psPreOutTime,jdbcType=TIMESTAMP},
      </if>
      <if test="psInTime != null">
        ps_in_time = #{psInTime,jdbcType=TIMESTAMP},
      </if>
      <if test="psOutTime != null">
        ps_out_time = #{psOutTime,jdbcType=TIMESTAMP},
      </if>
      <if test="psBerthNo != null">
        ps_berth_no = #{psBerthNo,jdbcType=VARCHAR},
      </if>
      <if test="psOrderId != null">
        ps_order_id = #{psOrderId,jdbcType=VARCHAR},
      </if>
      <if test="psRentDuration != null">
        ps_rent_duration = #{psRentDuration,jdbcType=BIGINT},
      </if>
      <if test="payStatus != null">
        pay_status = #{payStatus,jdbcType=CHAR},
      </if>
      <if test="custId != null">
        cust_id = #{custId,jdbcType=VARCHAR},
      </if>
      <if test="rentFee != null">
        rent_fee = #{rentFee,jdbcType=DECIMAL},
      </if>
      <if test="carNumber != null">
        car_number = #{carNumber,jdbcType=VARCHAR},
      </if>
      <if test="actPayedFee != null">
        act_payed_fee = #{actPayedFee,jdbcType=DECIMAL},
      </if>
      <if test="payedFee != null">
        payed_fee = #{payedFee,jdbcType=DECIMAL},
      </if>
      <if test="notPayFee != null">
        not_pay_fee = #{notPayFee,jdbcType=DECIMAL},
      </if>
      <if test="totalFee != null">
        total_fee = #{totalFee,jdbcType=DECIMAL},
      </if>
      <if test="refundedFee != null">
        refunded_fee = #{refundedFee,jdbcType=DECIMAL},
      </if>
      <if test="psRemark != null">
        ps_remark = #{psRemark,jdbcType=VARCHAR},
      </if>
      <if test="dataStatus != null">
        data_status = #{dataStatus,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createOp != null">
        create_op = #{createOp,jdbcType=BIGINT},
      </if>
      <if test="modifyTime != null">
        modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        modify_op = #{modifyOp,jdbcType=BIGINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.park.domain.TdPParkingShareLog">
    update td_p_parking_share_log
    set pl_no = #{plNo,jdbcType=VARCHAR},
      ps_pre_in_time = #{psPreInTime,jdbcType=TIMESTAMP},
      ps_pre_out_time = #{psPreOutTime,jdbcType=TIMESTAMP},
      ps_in_time = #{psInTime,jdbcType=TIMESTAMP},
      ps_out_time = #{psOutTime,jdbcType=TIMESTAMP},
      ps_berth_no = #{psBerthNo,jdbcType=VARCHAR},
      ps_order_id = #{psOrderId,jdbcType=VARCHAR},
      ps_rent_duration = #{psRentDuration,jdbcType=BIGINT},
      pay_status = #{payStatus,jdbcType=CHAR},
      cust_id = #{custId,jdbcType=VARCHAR},
      rent_fee = #{rentFee,jdbcType=DECIMAL},
      car_number = #{carNumber,jdbcType=VARCHAR},
      act_payed_fee = #{actPayedFee,jdbcType=DECIMAL},
      payed_fee = #{payedFee,jdbcType=DECIMAL},
      not_pay_fee = #{notPayFee,jdbcType=DECIMAL},
      total_fee = #{totalFee,jdbcType=DECIMAL},
      refunded_fee = #{refundedFee,jdbcType=DECIMAL},
      ps_remark = #{psRemark,jdbcType=VARCHAR},
      data_status = #{dataStatus,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_op = #{createOp,jdbcType=BIGINT},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      modify_op = #{modifyOp,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>