SupervisionThreestepMapper.xml
11 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<?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.trash.business.mapper.SupervisionThreestepMapper">
<resultMap type="SupervisionThreestep" id="SupervisionThreestepResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="type" column="type" />
<result property="place" column="place" />
<result property="selfCheckTime" column="self_check_time" />
<result property="objectId" column="object_id" />
<result property="earthsitesId" column="earthsites_id" />
<result property="createTime" column="create_time" />
<result property="checkTime" column="check_time" />
<result property="earthsitesName" column="earthsites_name" />
<result property="contract" column="contract" />
<result property="companys" column="companys" />
<result property="companyTrucks" column="company_trucks" />
<result property="img0" column="img0" />
<result property="img1" column="img1" />
<result property="img2" column="img2" />
<result property="img3" column="img3" />
<result property="img4" column="img4" />
<result property="img5" column="img5" />
<result property="img6" column="img6" />
<result property="img7" column="img7" />
<result property="img8" column="img8" />
<result property="img9" column="img9" />
<result property="img10" column="img10" />
<result property="img11" column="img11" />
<result property="img12" column="img12" />
<result property="person" column="person" />
<result property="phone" column="phone" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
</resultMap>
<sql id="selectSupervisionThreestepVo">
select id, name, type, place, self_check_time, object_id, earthsites_id, create_time, check_time, earthsites_name, contract, companys, company_trucks, img0, img1, img2, img3, img4, img5, img6, img7, img8, img9, img10, img11, img12, person, phone,status,create_by from supervision_threestep
</sql>
<select id="selectSupervisionThreestepList" parameterType="SupervisionThreestep" resultMap="SupervisionThreestepResult">
<include refid="selectSupervisionThreestepVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="type != null "> and type = #{type}</if>
<if test="place != null and place != ''"> and place = #{place}</if>
<if test="selfCheckTime != null "> and self_check_time = #{selfCheckTime}</if>
<if test="objectId != null and objectId != ''"> and object_id = #{objectId}</if>
<if test="earthsitesId != null and earthsitesId != ''"> and earthsites_id = #{earthsitesId}</if>
<if test="checkTime != null "> and check_time = #{checkTime}</if>
<if test="earthsitesName != null and earthsitesName != ''"> and earthsites_name like concat('%', #{earthsitesName}, '%')</if>
<if test="contract != null and contract != ''"> and contract = #{contract}</if>
<if test="companys != null and companys != ''"> and companys = #{companys}</if>
<if test="companyTrucks != null and companyTrucks != ''"> and company_trucks = #{companyTrucks}</if>
<if test="img0 != null and img0 != ''"> and img0 = #{img0}</if>
<if test="img1 != null and img1 != ''"> and img1 = #{img1}</if>
<if test="img2 != null and img2 != ''"> and img2 = #{img2}</if>
<if test="img3 != null and img3 != ''"> and img3 = #{img3}</if>
<if test="img4 != null and img4 != ''"> and img4 = #{img4}</if>
<if test="img5 != null and img5 != ''"> and img5 = #{img5}</if>
<if test="img6 != null and img6 != ''"> and img6 = #{img6}</if>
<if test="img7 != null and img7 != ''"> and img7 = #{img7}</if>
<if test="img8 != null and img8 != ''"> and img8 = #{img8}</if>
<if test="img9 != null and img9 != ''"> and img9 = #{img9}</if>
<if test="img10 != null and img10 != ''"> and img10 = #{img10}</if>
<if test="img11 != null and img11 != ''"> and img11 = #{img11}</if>
<if test="img12 != null and img12 != ''"> and img12 = #{img12}</if>
<if test="person != null and person != ''"> and person = #{person}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
</where>
</select>
<select id="selectSupervisionThreestepById" parameterType="Long" resultMap="SupervisionThreestepResult">
<include refid="selectSupervisionThreestepVo"/>
where id = #{id}
</select>
<insert id="insertSupervisionThreestep" parameterType="SupervisionThreestep" useGeneratedKeys="true" keyProperty="id">
insert into supervision_threestep
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="type != null">type,</if>
<if test="place != null">place,</if>
<if test="selfCheckTime != null">self_check_time,</if>
<if test="objectId != null">object_id,</if>
<if test="earthsitesId != null">earthsites_id,</if>
<if test="createTime != null">create_time,</if>
<if test="checkTime != null">check_time,</if>
<if test="earthsitesName != null">earthsites_name,</if>
<if test="contract != null">contract,</if>
<if test="companys != null">companys,</if>
<if test="companyTrucks != null">company_trucks,</if>
<if test="img0 != null">img0,</if>
<if test="img1 != null">img1,</if>
<if test="img2 != null">img2,</if>
<if test="img3 != null">img3,</if>
<if test="img4 != null">img4,</if>
<if test="img5 != null">img5,</if>
<if test="img6 != null">img6,</if>
<if test="img7 != null">img7,</if>
<if test="img8 != null">img8,</if>
<if test="img9 != null">img9,</if>
<if test="img10 != null">img10,</if>
<if test="img11 != null">img11,</if>
<if test="img12 != null">img12,</if>
<if test="person != null">person,</if>
<if test="phone != null">phone,</if>
<if test="status != null">status,</if>
<if test="createBy != null">create_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="type != null">#{type},</if>
<if test="place != null">#{place},</if>
<if test="selfCheckTime != null">#{selfCheckTime},</if>
<if test="objectId != null">#{objectId},</if>
<if test="earthsitesId != null">#{earthsitesId},</if>
<if test="createTime != null">#{createTime},</if>
<if test="checkTime != null">#{checkTime},</if>
<if test="earthsitesName != null">#{earthsitesName},</if>
<if test="contract != null">#{contract},</if>
<if test="companys != null">#{companys},</if>
<if test="companyTrucks != null">#{companyTrucks},</if>
<if test="img0 != null">#{img0},</if>
<if test="img1 != null">#{img1},</if>
<if test="img2 != null">#{img2},</if>
<if test="img3 != null">#{img3},</if>
<if test="img4 != null">#{img4},</if>
<if test="img5 != null">#{img5},</if>
<if test="img6 != null">#{img6},</if>
<if test="img7 != null">#{img7},</if>
<if test="img8 != null">#{img8},</if>
<if test="img9 != null">#{img9},</if>
<if test="img10 != null">#{img10},</if>
<if test="img11 != null">#{img11},</if>
<if test="img12 != null">#{img12},</if>
<if test="person != null">#{person},</if>
<if test="phone != null">#{phone},</if>
<if test="status != null">#{status},</if>
<if test="createBy != null"> #{createBy},</if>
</trim>
</insert>
<update id="updateSupervisionThreestep" parameterType="SupervisionThreestep">
update supervision_threestep
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="type != null">type = #{type},</if>
<if test="place != null">place = #{place},</if>
<if test="selfCheckTime != null">self_check_time = #{selfCheckTime},</if>
<if test="objectId != null">object_id = #{objectId},</if>
<if test="earthsitesId != null">earthsites_id = #{earthsitesId},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="checkTime != null">check_time = #{checkTime},</if>
<if test="earthsitesName != null">earthsites_name = #{earthsitesName},</if>
<if test="contract != null">contract = #{contract},</if>
<if test="companys != null">companys = #{companys},</if>
<if test="companyTrucks != null">company_trucks = #{companyTrucks},</if>
<if test="img0 != null">img0 = #{img0},</if>
<if test="img1 != null">img1 = #{img1},</if>
<if test="img2 != null">img2 = #{img2},</if>
<if test="img3 != null">img3 = #{img3},</if>
<if test="img4 != null">img4 = #{img4},</if>
<if test="img5 != null">img5 = #{img5},</if>
<if test="img6 != null">img6 = #{img6},</if>
<if test="img7 != null">img7 = #{img7},</if>
<if test="img8 != null">img8 = #{img8},</if>
<if test="img9 != null">img9 = #{img9},</if>
<if test="img10 != null">img10 = #{img10},</if>
<if test="img11 != null">img11 = #{img11},</if>
<if test="img12 != null">img12 = #{img12},</if>
<if test="person != null">person = #{person},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="status != null">status = #{status},</if>
<if test="createBy != null">create_by,</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSupervisionThreestepById" parameterType="Long">
delete from supervision_threestep where id = #{id}
</delete>
<delete id="deleteSupervisionThreestepByIds" parameterType="String">
delete from supervision_threestep where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>