|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
2
|
+<!DOCTYPE mapper
|
|
|
3
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
4
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
5
|
+<mapper namespace="com.sundot.airport.blocked.mapper.BlockedRateMapper">
|
|
|
6
|
+
|
|
|
7
|
+ <resultMap type="BlockedRate" id="BlockedRateResult">
|
|
|
8
|
+ <result property="tenantId" column="tenant_id"/>
|
|
|
9
|
+ <result property="revision" column="revision"/>
|
|
|
10
|
+ <result property="createBy" column="create_by"/>
|
|
|
11
|
+ <result property="createTime" column="create_time"/>
|
|
|
12
|
+ <result property="updateBy" column="update_by"/>
|
|
|
13
|
+ <result property="updateTime" column="update_time"/>
|
|
|
14
|
+ <result property="remark" column="remark"/>
|
|
|
15
|
+ <result property="id" column="id"/>
|
|
|
16
|
+ <result property="statDate" column="stat_date"/>
|
|
|
17
|
+ <result property="travelInspectionDomesticAvgRatePeak" column="travel_inspection_domestic_avg_rate_peak"/>
|
|
|
18
|
+ <result property="dutyBrigadeId" column="duty_brigade_id"/>
|
|
|
19
|
+ <result property="dutyBrigadeName" column="duty_brigade_name"/>
|
|
|
20
|
+ <result property="t1AAreaRatePeak" column="t1_a_area_rate_peak"/>
|
|
|
21
|
+ <result property="t1BAreaRatePeak" column="t1_b_area_rate_peak"/>
|
|
|
22
|
+ <result property="t2DomesticRatePeak" column="t2_domestic_rate_peak"/>
|
|
|
23
|
+ <result property="t2InternationalRatePeak" column="t2_international_rate_peak"/>
|
|
|
24
|
+ <result property="shift" column="shift"/>
|
|
|
25
|
+ <result property="t2TransferRatePeak" column="t2_transfer_rate_peak"/>
|
|
|
26
|
+ <result property="internationalTransferAvgRatePeak" column="international_transfer_avg_rate_peak"/>
|
|
|
27
|
+ </resultMap>
|
|
|
28
|
+
|
|
|
29
|
+ <sql id="selectItemSeizureRateVo">
|
|
|
30
|
+ select tenant_id,
|
|
|
31
|
+ revision,
|
|
|
32
|
+ create_by,
|
|
|
33
|
+ create_time,
|
|
|
34
|
+ update_by,
|
|
|
35
|
+ update_time,
|
|
|
36
|
+ remark,
|
|
|
37
|
+ id,
|
|
|
38
|
+ stat_date,
|
|
|
39
|
+ travel_inspection_domestic_avg_rate_peak,
|
|
|
40
|
+ duty_brigade_id,
|
|
|
41
|
+ duty_brigade_name,
|
|
|
42
|
+ t1_a_area_rate_peak,
|
|
|
43
|
+ t1_b_area_rate_peak,
|
|
|
44
|
+ t2_domestic_rate_peak,
|
|
|
45
|
+ t2_international_rate_peak,
|
|
|
46
|
+ shift,
|
|
|
47
|
+ t2_transfer_rate_peak,
|
|
|
48
|
+ international_transfer_avg_rate_peak
|
|
|
49
|
+ from blocked_rate
|
|
|
50
|
+ </sql>
|
|
|
51
|
+
|
|
|
52
|
+ <select id="selectBlockedRateList" parameterType="BlockedRate" resultMap="BlockedRateResult">
|
|
|
53
|
+ <include refid="selectItemSeizureRateVo"/>
|
|
|
54
|
+ <where>
|
|
|
55
|
+ <if test="tenantId != null and tenantId != ''">and tenant_id = #{tenantId}</if>
|
|
|
56
|
+ <if test="revision != null ">and revision = #{revision}</if>
|
|
|
57
|
+ <if test="statDate != null ">and stat_date = #{statDate}</if>
|
|
|
58
|
+ <if test="travelInspectionDomesticAvgRatePeak != null ">and travel_inspection_domestic_avg_rate_peak =
|
|
|
59
|
+ #{travelInspectionDomesticAvgRatePeak}
|
|
|
60
|
+ </if>
|
|
|
61
|
+ <if test="dutyBrigadeId != null ">and duty_brigade_id = #{dutyBrigadeId}</if>
|
|
|
62
|
+ <if test="dutyBrigadeName != null and dutyBrigadeName != ''">and duty_brigade_name like concat('%',
|
|
|
63
|
+ #{dutyBrigadeName}, '%')
|
|
|
64
|
+ </if>
|
|
|
65
|
+ <if test="t1AAreaRatePeak != null ">and t1_a_area_rate_peak = #{t1AAreaRatePeak}</if>
|
|
|
66
|
+ <if test="t1BAreaRatePeak != null ">and t1_b_area_rate_peak = #{t1BAreaRatePeak}</if>
|
|
|
67
|
+ <if test="t2DomesticRatePeak != null ">and t2_domestic_rate_peak = #{t2DomesticRatePeak}</if>
|
|
|
68
|
+ <if test="t2InternationalRatePeak != null ">and t2_international_rate_peak = #{t2InternationalRatePeak}</if>
|
|
|
69
|
+ <if test="shift != null and shift != ''">and shift = #{shift}</if>
|
|
|
70
|
+ <if test="t2TransferRatePeak != null ">and t2_transfer_rate_peak = #{t2TransferRatePeak}</if>
|
|
|
71
|
+ <if test="internationalTransferAvgRatePeak != null ">and international_transfer_avg_rate_peak =
|
|
|
72
|
+ #{internationalTransferAvgRatePeak}
|
|
|
73
|
+ </if>
|
|
|
74
|
+ </where>
|
|
|
75
|
+ </select>
|
|
|
76
|
+
|
|
|
77
|
+ <select id="selectBlockedRateById" parameterType="Long" resultMap="BlockedRateResult">
|
|
|
78
|
+ <include refid="selectItemSeizureRateVo"/>
|
|
|
79
|
+ where id = #{id}
|
|
|
80
|
+ </select>
|
|
|
81
|
+
|
|
|
82
|
+ <insert id="insertBlockedRate" parameterType="BlockedRate" useGeneratedKeys="true" keyProperty="id">
|
|
|
83
|
+ insert into blocked_rate
|
|
|
84
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
85
|
+ <if test="tenantId != null">tenant_id,</if>
|
|
|
86
|
+ <if test="revision != null">revision,</if>
|
|
|
87
|
+ <if test="createBy != null">create_by,</if>
|
|
|
88
|
+ <if test="createTime != null">create_time,</if>
|
|
|
89
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
90
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
91
|
+ <if test="remark != null">remark,</if>
|
|
|
92
|
+ <if test="statDate != null">stat_date,</if>
|
|
|
93
|
+ <if test="travelInspectionDomesticAvgRatePeak != null">travel_inspection_domestic_avg_rate_peak,</if>
|
|
|
94
|
+ <if test="dutyBrigadeId != null">duty_brigade_id,</if>
|
|
|
95
|
+ <if test="dutyBrigadeName != null and dutyBrigadeName != ''">duty_brigade_name,</if>
|
|
|
96
|
+ <if test="t1AAreaRatePeak != null">t1_a_area_rate_peak,</if>
|
|
|
97
|
+ <if test="t1BAreaRatePeak != null">t1_b_area_rate_peak,</if>
|
|
|
98
|
+ <if test="t2DomesticRatePeak != null">t2_domestic_rate_peak,</if>
|
|
|
99
|
+ <if test="t2InternationalRatePeak != null">t2_international_rate_peak,</if>
|
|
|
100
|
+ <if test="shift != null and shift != ''">shift,</if>
|
|
|
101
|
+ <if test="t2TransferRatePeak != null">t2_transfer_rate_peak,</if>
|
|
|
102
|
+ <if test="internationalTransferAvgRatePeak != null">international_transfer_avg_rate_peak,</if>
|
|
|
103
|
+ </trim>
|
|
|
104
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
105
|
+ <if test="tenantId != null">#{tenantId},</if>
|
|
|
106
|
+ <if test="revision != null">#{revision},</if>
|
|
|
107
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
108
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
109
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
110
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
111
|
+ <if test="remark != null">#{remark},</if>
|
|
|
112
|
+ <if test="statDate != null">#{statDate},</if>
|
|
|
113
|
+ <if test="travelInspectionDomesticAvgRatePeak != null">#{travelInspectionDomesticAvgRatePeak},</if>
|
|
|
114
|
+ <if test="dutyBrigadeId != null">#{dutyBrigadeId},</if>
|
|
|
115
|
+ <if test="dutyBrigadeName != null and dutyBrigadeName != ''">#{dutyBrigadeName},</if>
|
|
|
116
|
+ <if test="t1AAreaRatePeak != null">#{t1AAreaRatePeak},</if>
|
|
|
117
|
+ <if test="t1BAreaRatePeak != null">#{t1BAreaRatePeak},</if>
|
|
|
118
|
+ <if test="t2DomesticRatePeak != null">#{t2DomesticRatePeak},</if>
|
|
|
119
|
+ <if test="t2InternationalRatePeak != null">#{t2InternationalRatePeak},</if>
|
|
|
120
|
+ <if test="shift != null and shift != ''">#{shift},</if>
|
|
|
121
|
+ <if test="t2TransferRatePeak != null">#{t2TransferRatePeak},</if>
|
|
|
122
|
+ <if test="internationalTransferAvgRatePeak != null">#{internationalTransferAvgRatePeak},</if>
|
|
|
123
|
+ </trim>
|
|
|
124
|
+ </insert>
|
|
|
125
|
+
|
|
|
126
|
+ <update id="updateBlockedRate" parameterType="BlockedRate">
|
|
|
127
|
+ update blocked_rate
|
|
|
128
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
129
|
+ <if test="tenantId != null">tenant_id = #{tenantId},</if>
|
|
|
130
|
+ <if test="revision != null">revision = #{revision},</if>
|
|
|
131
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
132
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
133
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
134
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
135
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
136
|
+ <if test="statDate != null">stat_date = #{statDate},</if>
|
|
|
137
|
+ <if test="travelInspectionDomesticAvgRatePeak != null">travel_inspection_domestic_avg_rate_peak =
|
|
|
138
|
+ #{travelInspectionDomesticAvgRatePeak},
|
|
|
139
|
+ </if>
|
|
|
140
|
+ <if test="dutyBrigadeId != null">duty_brigade_id = #{dutyBrigadeId},</if>
|
|
|
141
|
+ <if test="dutyBrigadeName != null and dutyBrigadeName != ''">duty_brigade_name = #{dutyBrigadeName},</if>
|
|
|
142
|
+ <if test="t1AAreaRatePeak != null">t1_a_area_rate_peak = #{t1AAreaRatePeak},</if>
|
|
|
143
|
+ <if test="t1BAreaRatePeak != null">t1_b_area_rate_peak = #{t1BAreaRatePeak},</if>
|
|
|
144
|
+ <if test="t2DomesticRatePeak != null">t2_domestic_rate_peak = #{t2DomesticRatePeak},</if>
|
|
|
145
|
+ <if test="t2InternationalRatePeak != null">t2_international_rate_peak = #{t2InternationalRatePeak},</if>
|
|
|
146
|
+ <if test="shift != null and shift != ''">shift = #{shift},</if>
|
|
|
147
|
+ <if test="t2TransferRatePeak != null">t2_transfer_rate_peak = #{t2TransferRatePeak},</if>
|
|
|
148
|
+ <if test="internationalTransferAvgRatePeak != null">international_transfer_avg_rate_peak =
|
|
|
149
|
+ #{internationalTransferAvgRatePeak},
|
|
|
150
|
+ </if>
|
|
|
151
|
+ </trim>
|
|
|
152
|
+ where id = #{id}
|
|
|
153
|
+ </update>
|
|
|
154
|
+
|
|
|
155
|
+ <delete id="deleteBlockedRateById" parameterType="Long">
|
|
|
156
|
+ delete
|
|
|
157
|
+ from blocked_rate
|
|
|
158
|
+ where id = #{id}
|
|
|
159
|
+ </delete>
|
|
|
160
|
+
|
|
|
161
|
+ <delete id="deleteBlockedRateByIds" parameterType="String">
|
|
|
162
|
+ delete from blocked_rate where id in
|
|
|
163
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
164
|
+ #{id}
|
|
|
165
|
+ </foreach>
|
|
|
166
|
+ </delete>
|
|
|
167
|
+</mapper>
|