EnclosedParkingLotConfigSMapper.xml
2.93 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?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.EnclosedParkingLotConfigSMapper">
<resultMap id="BaseResultMap" type="com.zteits.clouds.api.dto.park.dto.ConfigDTO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="config_type" jdbcType="VARCHAR" property="configType" />
<result column="config_name" jdbcType="VARCHAR" property="configName" />
<result column="config_code" jdbcType="VARCHAR" property="configCode" />
<result column="config_value" jdbcType="VARCHAR" property="configValue" />
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<collection property="detailList" ofType="com.zteits.clouds.api.dto.park.dto.DetailDTO"
select="queryParkRuleDetailList"
column="config_code">
</collection>
</resultMap>
<select id="queryAllRuleConfiguration" parameterType="com.zteits.clouds.api.dto.park.param.closecarpark.QueryAllRuleConfigurationRequest"
resultType="com.zteits.clouds.api.dto.park.dto.AllConfigDTO">
SELECT
l.config_code configCode,
l.config_name configName,
l.config_type configType,
l.config_value configValue,
l.sort,
l.remarks,
t.type
FROM
enclosed_parking_lot_config l
LEFT JOIN enclosed_parking_type_code t ON l.config_code = t.config_code
where t.is_park = #{isPark,jdbcType=VARCHAR}
group by l.sort asc
</select>
<select id="queryParkRuleList" parameterType="com.zteits.clouds.api.dto.park.param.closecarpark.QueryParkRuleConfigurationRequest"
resultMap="BaseResultMap">
SELECT
l.config_code,
l.config_name,
l.config_type,
l.config_value,
l.sort,
l.remarks,
t.type
FROM
enclosed_parking_lot_config l
LEFT JOIN enclosed_parking_type_code t ON l.config_code = t.config_code
where t.is_park = #{isPark,jdbcType=VARCHAR}
GROUP BY l.config_code order by l.sort asc
</select>
<select id="queryParkRuleDetailList" parameterType="com.zteits.clouds.api.dto.park.param.closecarpark.QueryParkRuleConfigurationRequest"
resultType="com.zteits.clouds.api.dto.park.dto.DetailDTO">
SELECT
c.config_code configCode,
c.value_detail_code valueDetailCode,
c.value_desc valueDesc
FROM
enclosed_parking_code_detail c
where c.config_code = #{configCode,jdbcType=VARCHAR}
</select>
<select id="queryPlNoRuleList" parameterType="com.zteits.clouds.api.dto.park.param.closecarpark.QueryParkRuleConfigurationRequest"
resultType="com.zteits.clouds.api.dto.park.dto.ConfigPlNoDTO">
SELECT
l.config_code configCode,
l.config_name configName,
l.config_type configType,
l.config_value configValue,
l.sort,
l.remarks,
l.id,
l.pl_no plNo
FROM
enclosed_parking_lot_config l
where l.pl_no = #{plNo,jdbcType=VARCHAR}
</select>
</mapper>