ParkingLotGroupSmapper.xml
2.17 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
48
49
50
51
<?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.ParkingLotGroupSmapper">
<resultMap id="BaseResultMap" type="com.zteits.park.domain.ParkingLotGroup">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="pl_group_no" jdbcType="VARCHAR" property="plGroupNo" />
<result column="pl_group_name" jdbcType="VARCHAR" property="plGroupName" />
<result column="group_type" jdbcType="INTEGER" property="groupType" />
<result column="org_id" jdbcType="BIGINT" property="orgId" />
<result column="data_status" jdbcType="INTEGER" property="dataStatus" />
<result column="create_empid" jdbcType="VARCHAR" property="createEmpid" />
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
<result column="modfiy_empid" jdbcType="VARCHAR" property="modfiyEmpid" />
<result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
</resultMap>
<sql id="Base_Column_List">
id, pl_group_no, pl_group_name, group_type, org_id, data_status, create_empid, create_date,
modfiy_empid, modfiy_date
</sql>
<select id="queryParkLontGroupForList" parameterType="com.zteits.clouds.api.dto.park.param.parkgroup.ParkingLotGroupSaveReq" resultMap="BaseResultMap">
select
a.id, a.pl_group_no, a.pl_group_name, a.group_type, a.org_id, a.data_status, a.create_empid,
a.create_date,
a.modfiy_empid, a.modfiy_date
from parking_lot_group a
where 1=1
and a.data_status=1
<if test="plGroupName != null and plGroupName !=''">
a.pl_group_name like concat('%',#{plGroupName},'%')
</if>
and a.org_id=#{orgId}
<if test="plNos != null and plNos.size()>0">
and a.pl_group_no IN (
SELECT
b.pl_group_no
FROM
parking_lot_group_rel b
WHERE
1 = 1
and b.pl_no IN
<foreach collection="plNos" open="(" close=")" separator="," item="plNo">
#{plNo}
</foreach>
group by b.pl_group_no
)
</if>
</select>
</mapper>