TdPParkingShareLogSMapper.xml 6.41 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.smapper.TdPParkingShareLogSMapper">
   <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="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="queryShareLogByVo" parameterType="com.zteits.park.domain.TdPParkingShareLog" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from td_p_parking_share_log
    where data_status = 1
     <if test="plNo != null">
       and  pl_no = #{plNo,jdbcType=VARCHAR}
      </if>
      <if test="psBerthNo != null">
        and  ps_berth_no = #{psBerthNo,jdbcType=VARCHAR}
      </if>
      <if test="psOrderId != null">
        and  ps_order_id = #{psOrderId,jdbcType=VARCHAR}
      </if>
      <if test="custId != null">
        and  cust_id = #{custId,jdbcType=VARCHAR}
      </if>
      <if test="carNumber != null">
       and   car_number = #{carNumber,jdbcType=VARCHAR}
      </if>
      <if test="payStatus != null">
       and   pay_status = #{payStatus,jdbcType=CHAR}
      </if>
  </select>
  
  <select id="queryShareLogByOrderId" parameterType="java.lang.String" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from td_p_parking_share_log
    where ps_order_id = #{psOrderId,jdbcType=VARCHAR}
  </select>
  
  <update id="updateByVO" 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},
      </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 data_status = 1
       <if test="plNo != null">
       and  pl_no = #{plNo,jdbcType=VARCHAR}
      </if>
      <if test="psBerthNo != null">
        and  ps_berth_no = #{psBerthNo,jdbcType=VARCHAR}
      </if>
      <if test="psOrderId != null">
        and  ps_order_id = #{psOrderId,jdbcType=VARCHAR}
      </if>
      <if test="custId != null">
        and  cust_id = #{custId,jdbcType=VARCHAR}
      </if>
      <if test="carNumber != null">
       and   car_number = #{carNumber,jdbcType=VARCHAR}
      </if>
  </update>
</mapper>