OrderParkSubSMapper.xml 6.94 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.smapper.OrderParkSubSMapper">
  <resultMap id="BaseResultMap" type="com.zteits.order.domain.OrderParkSub">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="order_id" jdbcType="VARCHAR" property="orderId" />
    <result column="park_order_type" jdbcType="INTEGER" property="parkOrderType" />
    <result column="park_detail_type" jdbcType="INTEGER" property="parkDetailType" />
    <result column="park_state" jdbcType="INTEGER" property="parkState" />
    <result column="order_state" jdbcType="INTEGER" property="orderState" />
    <result column="terminal_source" jdbcType="INTEGER" property="terminalSource" />
    <result column="source_type" jdbcType="INTEGER" property="sourceType" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
    <result column="pl_name" jdbcType="VARCHAR" property="plName" />
    <result column="berth_range_no" jdbcType="VARCHAR" property="berthRangeNo" />
    <result column="berth_range_name" jdbcType="VARCHAR" property="berthRangeName" />
    <result column="berth_no" jdbcType="VARCHAR" property="berthNo" />
    <result column="order_dicount_fee" jdbcType="BIGINT" property="orderDicountFee" />
    <result column="order_act_fee" jdbcType="BIGINT" property="orderActFee" />
    <result column="order_total_fee" jdbcType="BIGINT" property="orderTotalFee" />
    <result column="pre_act_fee" jdbcType="BIGINT" property="preActFee" />
    <result column="pre_total_fee" jdbcType="BIGINT" property="preTotalFee" />
    <result column="overtime_total_fee" jdbcType="BIGINT" property="overtimeTotalFee" />
    <result column="overtime_act_fee" jdbcType="BIGINT" property="overtimeActFee" />
    <result column="back_act_fee" jdbcType="BIGINT" property="backActFee" />
    <result column="arrearage_fee" jdbcType="BIGINT" property="arrearageFee" />
    <result column="refund_act_fee" jdbcType="BIGINT" property="refundActFee" />
    <result column="platform_service_fee" jdbcType="BIGINT" property="platformServiceFee" />
    <result column="car_number" jdbcType="VARCHAR" property="carNumber" />
    <result column="car_type" jdbcType="INTEGER" property="carType" />
    <result column="car_number_color" jdbcType="VARCHAR" property="carNumberColor" />
    <result column="pre_park_in_time" jdbcType="TIMESTAMP" property="preParkInTime" />
    <result column="pre_park_out_time" jdbcType="TIMESTAMP" property="preParkOutTime" />
    <result column="park_in_time" jdbcType="TIMESTAMP" property="parkInTime" />
    <result column="park_out_time" jdbcType="TIMESTAMP" property="parkOutTime" />
    <result column="parking_duration" jdbcType="BIGINT" property="parkingDuration" />
    <result column="record_id" jdbcType="VARCHAR" property="recordId" />
    <result column="park_in_source_code" jdbcType="VARCHAR" property="parkInSourceCode" />
    <result column="park_in_source_name" jdbcType="VARCHAR" property="parkInSourceName" />
    <result column="park_in_device_code" jdbcType="VARCHAR" property="parkInDeviceCode" />
    <result column="park_in_device_name" jdbcType="VARCHAR" property="parkInDeviceName" />
    <result column="park_out_source_code" jdbcType="VARCHAR" property="parkOutSourceCode" />
    <result column="park_out_source_name" jdbcType="VARCHAR" property="parkOutSourceName" />
    <result column="park_out_device_code" jdbcType="VARCHAR" property="parkOutDeviceCode" />
    <result column="park_out_device_name" jdbcType="VARCHAR" property="parkOutDeviceName" />
    <result column="in_free_berths" jdbcType="INTEGER" property="inFreeBerths" />
    <result column="out_free_berths" jdbcType="INTEGER" property="outFreeBerths" />
    <result column="cust_type" jdbcType="INTEGER" property="custType" />
    <result column="cust_id" jdbcType="VARCHAR" property="custId" />
    <result column="invoice_state" jdbcType="INTEGER" property="invoiceState" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="app_state" jdbcType="INTEGER" property="appState" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_emp_id" jdbcType="VARCHAR" property="createEmpId" />
    <result column="create_emp_name" jdbcType="VARCHAR" property="createEmpName" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modfiy_emp_id" jdbcType="VARCHAR" property="modfiyEmpId" />
    <result column="modfiy_emp_name" jdbcType="VARCHAR" property="modfiyEmpName" />
    <result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
    <result column="qeual_type" jdbcType="INTEGER" property="qeualType" />
    <result column="diff_type" jdbcType="INTEGER" property="diffType" />
    <result column="diff_remark" jdbcType="VARCHAR" property="diffRemark" />
    <result column="diff_compare_date" jdbcType="TIMESTAMP" property="diffCompareDate" />
    <result column="trade_service_fee" jdbcType="BIGINT" property="tradeServiceFee" />
    <result column="org_id" jdbcType="BIGINT" property="orgId" />
    <result column="org_name" jdbcType="VARCHAR" property="orgName" />
    <result column="park_in_time_type" jdbcType="INTEGER" property="parkInTimeType" />
    <result column="is_thirdparty_data" jdbcType="INTEGER" property="isThirdpartyData" />
    <result column="app_opt_out_time" jdbcType="TIMESTAMP" property="appOptOutTime" />
    <result column="third_disc_fee" jdbcType="BIGINT" property="thirdDiscFee" />
  </resultMap>

  <sql id="Base_Column_List">
    id, order_id, park_order_type, park_detail_type, park_state, order_state, terminal_source,
    source_type, pl_no, pl_name, berth_range_no, berth_range_name, berth_no, order_dicount_fee,
    order_act_fee, order_total_fee, pre_act_fee, pre_total_fee, overtime_total_fee, overtime_act_fee,
    back_act_fee, arrearage_fee, refund_act_fee, platform_service_fee, car_number, car_type,
    car_number_color, pre_park_in_time, pre_park_out_time, park_in_time, park_out_time,
    parking_duration, record_id, park_in_source_code, park_in_source_name, park_in_device_code,
    park_in_device_name, park_out_source_code, park_out_source_name, park_out_device_code,
    park_out_device_name, in_free_berths, out_free_berths, cust_type, cust_id, invoice_state,
    remark, app_state, data_state, create_emp_id, create_emp_name, create_date, modfiy_emp_id,
    modfiy_emp_name, modfiy_date, qeual_type, diff_type, diff_remark, diff_compare_date,
    trade_service_fee, org_id, org_name, park_in_time_type, is_thirdparty_data, app_opt_out_time,
    third_disc_fee
  </sql>

  <!--  根据plNo和carNumber查询 最新的一个入场记录  -->
  <select id="queryParkOrderByPlNoAndCarnumber" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List"/>
    from order_park_sub o
    where
    data_state = 1
    and pl_no = #{plNo}
    and car_number = #{carNumber}
    order by park_in_time desc limit 1
  </select>


</mapper>