ParkBerthAppointmentParkRelSMapper.xml
2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?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.ParkBerthAppointmentParkRelSMapper">
<resultMap id="BaseResultMap" type="com.zteits.park.domain.ParkBerthAppointmentParkRel">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="appointment_config_id" jdbcType="BIGINT" property="appointmentConfigId" />
<result column="pl_no" jdbcType="VARCHAR" property="plNo" />
<result column="pl_name" jdbcType="VARCHAR" property="plName" />
<result column="data_state" jdbcType="INTEGER" property="dataState" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_emp_id" jdbcType="VARCHAR" property="createEmpId" />
<result column="create_emp_name" jdbcType="VARCHAR" property="createEmpName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_emp_id" jdbcType="VARCHAR" property="modifyEmpId" />
<result column="modify_emp_name" jdbcType="VARCHAR" property="modifyEmpName" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<!-- 查询可预约车场列表 -->
<select id="queryAppointmentBerthParkList" resultType="com.zteits.clouds.api.dto.park.dto.ParkBerthAppointmentParkRelDTO">
SELECT b.appointment_type appointmentType,
b.reserve_berth_num reserveBerthNum,
b.befor_appointment_hours beforAppointmentHours,
b.appointment_fee appointmentFee,
b.berth_total berthTotal,
a.pl_no plNo,
a.pl_name plName,
a.appointment_config_id appointmentConfigId
FROM park_berth_appointment_park_rel a,
park_berth_appointment_config b
WHERE a.appointment_config_id = b.id
AND a.data_state = 1
AND b.data_state = 1
<if test="orgId !=null">
AND b.org_id = #{orgId}
</if>
<if test="plName !=null and plName !=''">
/*停车场名称模糊搜索*/
AND a.pl_name like CONCAT(#{plName},'%')
</if>
<if test="plNo !=null and plNo !=''">
AND a.pl_no = #{plNo}
</if>
AND b.rule_state = 1
</select>
</mapper>