OutparkLogSMapper.xml 2.16 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.OutparkLogSMapper">
<resultMap id="BaseResultMap" type="com.zteits.park.domain.OutparkLog">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="out_arm_code" jdbcType="VARCHAR" property="outArmCode" />
    <result column="calc_charge" jdbcType="DECIMAL" property="calcCharge" />
    <result column="charge_item_cnt" jdbcType="INTEGER" property="chargeItemCnt" />
    <result column="in_time" jdbcType="TIMESTAMP" property="inTime" />
    <result column="parking_duration" jdbcType="BIGINT" property="parkingDuration" />
    <result column="parking_charge" jdbcType="DECIMAL" property="parkingCharge" />
    <result column="out_time" jdbcType="TIMESTAMP" property="outTime" />
    <result column="charge_taker" jdbcType="VARCHAR" property="chargeTaker" />
    <result column="vpl_owner" jdbcType="VARCHAR" property="vplOwner" />
    <result column="park_code" jdbcType="VARCHAR" property="parkCode" />
    <result column="vpl_type" jdbcType="VARCHAR" property="vplType" />
    <result column="record_id" jdbcType="VARCHAR" property="recordId" />
    <result column="vpl_number" jdbcType="VARCHAR" property="vplNumber" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="cardno" jdbcType="VARCHAR" property="cardno" />
    <result column="total_charge" jdbcType="DECIMAL" property="totalCharge" />
    <result column="from_type" jdbcType="INTEGER" property="fromType" />
    <result column="free_berths" jdbcType="INTEGER" property="freeBerths" />
    <result column="pl_name" jdbcType="VARCHAR" property="plName" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
  </resultMap>
  
  <!-- 通过给定的停车场和时间段查询空闲车位供统计使用 -->
  <select id="queryBerthsForStatistic" resultMap="BaseResultMap">
    select 
    	id,park_code,free_berths,out_time,pl_no,vpl_number,pl_name
    from outpark_log
    <where>
    	out_time between #{beginTime} and #{endTime}
    </where>
  </select>
  
</mapper>