ParkingLotApplySMapper.xml 3.1 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.ParkingLotApplySMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.ParkingLotApply">
    <id column="pl_apply_id" jdbcType="BIGINT" property="plApplyId" />
    <result column="pl_name" jdbcType="VARCHAR" property="plName" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
    <result column="pl_province_id" jdbcType="BIGINT" property="plProvinceId" />
    <result column="pl_province_name" jdbcType="VARCHAR" property="plProvinceName" />
    <result column="pl_city_id" jdbcType="BIGINT" property="plCityId" />
    <result column="pl_city_name" jdbcType="VARCHAR" property="plCityName" />
    <result column="pl_country_id" jdbcType="BIGINT" property="plCountryId" />
    <result column="pl_country_name" jdbcType="VARCHAR" property="plCountryName" />
    <result column="pl_address" jdbcType="VARCHAR" property="plAddress" />
    <result column="pl_berth_num" jdbcType="INTEGER" property="plBerthNum" />
    <result column="pl_type" jdbcType="INTEGER" property="plType" />
    <result column="pl_apply_name" jdbcType="VARCHAR" property="plApplyName" />
    <result column="pl_apply_tel" jdbcType="VARCHAR" property="plApplyTel" />
    <result column="deivce_type" jdbcType="INTEGER" property="deivceType" />
    <result column="device_no" jdbcType="VARCHAR" property="deviceNo" />
    <result column="op_id" jdbcType="VARCHAR" property="opId" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="pl_apply_time" jdbcType="TIMESTAMP" property="plApplyTime" />
    <result column="pl_examine_state" jdbcType="CHAR" property="plExamineState" />
    <result column="pl_move_state" jdbcType="CHAR" property="plMoveState" />
    <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">
    pl_apply_id, pl_name, pl_no, pl_province_id, pl_province_name, pl_city_id, pl_city_name, 
    pl_country_id, pl_country_name, pl_address, pl_berth_num, pl_type, pl_apply_name, 
    pl_apply_tel, deivce_type, device_no, op_id, remark, pl_apply_time, pl_examine_state,
    pl_move_state, data_status, create_time, create_op, modify_time, modify_op
  </sql>

  <select id="queryParkLotApplyList" parameterType="com.zteits.clouds.api.dto.park.param.parklotapply.QueryParkingLotApplyPageRequest" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from parking_lot_apply
    where data_status = 1
    <if test="deviceNo != null">
      and device_no = #{deviceNo,jdbcType=VARCHAR}
    </if>
    <if test="opId != null">
      and op_id = #{opId,jdbcType=VARCHAR}
    </if>
    order by create_time desc
  </select>
</mapper>