linzhijie
2021-04-12 c632636e2f5b4188b430f5efc9d9f68c8dbe3d6d
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<?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.ots.project.exam.mapper.TExamReportMapper">
    
    <resultMap type="TExamReport" id="TExamReportResult">
        <result property="id"    column="id"    />
        <result property="productId"    column="product_id"    />
        <result property="productName"    column="product_name"    />
        <result property="content"    column="content"    />
        <result property="tokenId"    column="token_id"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
        <result property="states"    column="states"    />
        <result property="lastContent"    column="last_content"    />
        <result property="choice"    column="choice"    />
        <result property="doTime"    column="do_time"    />
        <result property="questionCount"    column="question_count"    />
        <result property="memberId"    column="member_id"    />
        <result property="userId"    column="user_id"    />
        <result property="parentId"    column="parent_id"    />
        <result property="downloadTimes"    column="downloadTimes"    />
        <result property="verifyStatus"    column="verifyStatus"    />
        <result property="testId"    column="test_id"    />
        <result property="userName"    column="user_name"    />
        <result property="memberName"    column="member_name"    />
        <result property="testName"    column="test_name"    />
        <result property="finish"    column="finish"    />
        <result property="questionOrder"    column="question_order"    />
        <result property="questionReport"    column="question_report"    />
        <result property="questionTemplateId"    column="question_template_id"    />
        <result property="interfaceContent"    column="interface_content"    />
        <result property="langType"    column="lang_type"    />
        <result property="status"    column="status"    />
        <result property="reportAddress"    column="report_address"    />
        <result property="reportTemplateId"    column="report_template_id"    />
        <result property="sendHrStatus"    column="send_hr_status"    />
        <result property="sendTesterStatus"    column="send_tester_status"    />
        <result property="memberEmail"    column="member_email"    />
        <result property="testEmail"    column="test_email"    />
        <result property="memberName"    column="member_name"    />
        <result property="autoSendReport"    column="auto_send_report"    />
        <result property="hrEmail"    column="hr_email"    />
        <result property="mailContent"    column="mail_content"    />
        <result property="optionOrder"    column="option_order"    />
        <result property="remainPartTime"    column="remain_part_time"    />
        <result property="reportAddressNew"    column="report_address_new"    />
        <result property="memberDept"    column="member_dept"    />
        <result property="hrReportEmail"    column="hrReportEmail"    />
        <result property="hrTitle"    column="hrTitle"    />
        <result property="hrSendTime"    column="hrSendTime"    />
        <result property="hrUpdateTime"    column="hrUpdateTime"    />
        <result property="retriesTime"    column="retriesTime"    />
    </resultMap>
 
    <sql id="selectTExamReportVo">
        select id, product_id, product_name, content, token_id, create_time, update_time, states,last_content,choice,do_time, question_count, member_id,user_id,parent_id,downloadTimes,verifyStatus,test_id,finish, question_order, question_report, question_template_id, interface_content, lang_type, report_address, report_template_id, send_hr_status, send_tester_status, member_name, option_order, remain_part_time,hrReportEmail,hrTitle,hrSendTime,hrUpdateTime,retriesTime from t_exam_report t
    </sql>
 
    <sql id = "selectTExamReportListVo">
        select m.member_dept,p.status,t.id, t.product_id, t.product_name, t.content, t.token_id, t.create_time, t.update_time, t.states,
        t.last_content,t.choice,t.do_time, t.question_count, t.member_id,t.user_id,t.parent_id,t.downloadTimes,t.verifyStatus,t.test_id,
        t.finish,m.member_name,p.test_name,u.user_name,t.question_order, t.question_report, t.question_template_id, t.interface_content,
        t.lang_type, t.report_address, p.report_template_id, t.send_hr_status, t.send_tester_status, m.member_email, p.test_email,
        t.member_name, p.auto_send_report, e.hr_email, e.mail_content, t.option_order, t.remain_part_time,
         t.report_address_new,t.hrReportEmail,t.hrTitle,t.hrSendTime,t.hrUpdateTime,t.retriesTime
         from t_exam_report t
        left join sys_user u on u.user_id = t.user_id
        left join ent_test_member m on m.member_id = t.member_id
        left join ent_test_package p on p.id = t.test_id
        left join sys_user_extend e on e.user_id = u.user_id
    </sql>
 
    <select id="selectTExamReportList" parameterType="TExamReport" resultMap="TExamReportResult">
        <include refid="selectTExamReportListVo"/>
        <where>  
            <if test="id != null "> and t.id = #{id}</if>
            <if test="productId != null "> and t.product_id = #{productId}</if>
            <if test="tokenId != null  and tokenId != ''"> and t.token_id = #{tokenId}</if>
            <if test="downloadTimes != null "> and t.downloadTimes = #{downloadTimes}</if>
            <if test="verifyStatus != null "> and t.verifyStatus = #{verifyStatus}</if>
            <if test="memberId != null  and memberId != ''"> and t.member_id = #{memberId}</if>
            <if test="productName != null  and productName != ''"> and t.product_name like concat('%', #{productName}, '%')</if>
            <if test="userName != null  and userName != ''"> and u.user_name like concat('%', #{userName}, '%')</if>
            <if test="testName != null  and testName != ''"> and u.test_name like concat('%', #{testName}, '%')</if>
            <if test="memberName != null  and memberName != ''"> and m.member_name like concat('%', #{memberName}, '%')</if>
            <if test="testId != null  and testId != ''"> and t.test_id = #{testId}</if>
            <if test="status != null  and status != ''"> and p.status = #{status}</if>
            <if test="finish != null  and finish != ''"> and t.finish = #{finish}</if>
            <if test="sendTesterStatus != null"> and t.send_tester_status = #{sendTesterStatus}</if>
            <if test="hrReportEmail != null"> and t.hrReportEmail = #{hrReportEmail}</if>
            <if test="sendHrStatus != null"> and t.send_hr_status = #{sendHrStatus}</if>
            <if test="sendHrStatusList != null"> and t.send_hr_status in
                <foreach collection="sendHrStatusList" item="sendStatus" open="(" separator="," close=")">
                    #{sendStatus}
                </foreach>
            </if>
            <if test="userIds != null"> and t.user_id in
                <foreach collection="userIds" item="userId" open="(" separator="," close=")">
                    #{userId}
                </foreach>
            </if>
        </where>
    </select>
 
    <select id="selectTExamHrEmailiReportList" parameterType="TExamReport" resultMap="TExamReportResult">
        select id, product_id, product_name, content, token_id, create_time, update_time, states,last_content,choice,do_time, question_count, member_id,user_id,parent_id,downloadTimes,verifyStatus,test_id,finish, question_order, question_report, question_template_id, interface_content, lang_type, report_address, report_template_id, send_hr_status, send_tester_status, member_name, option_order, remain_part_time from t_exam_report
        <where>
            <if test="id != null "> and t.id = #{id}</if>
            <if test="productId != null "> and t.product_id = #{productId}</if>
            <if test="tokenId != null  and tokenId != ''"> and t.token_id = #{tokenId}</if>
            <if test="downloadTimes != null "> and t.downloadTimes = #{downloadTimes}</if>
            <if test="verifyStatus != null "> and t.verifyStatus = #{verifyStatus}</if>
            <if test="memberId != null  and memberId != ''"> and t.member_id = #{memberId}</if>
            <if test="productName != null  and productName != ''"> and u.product_name like concat('%', #{productName}, '%')</if>
            <if test="userName != null  and userName != ''"> and u.user_name like concat('%', #{userName}, '%')</if>
            <if test="testName != null  and testName != ''"> and u.test_name like concat('%', #{testName}, '%')</if>
            <if test="memberName != null  and memberName != ''"> and u.member_name like concat('%', #{memberName}, '%')</if>
            <if test="testId != null  and testId != ''"> and t.test_id = #{testId}</if>
            <if test="status != null  and status != ''"> and p.status = #{status}</if>
            <if test="finish != null  and finish != ''"> and t.finish = #{finish}</if>
            <if test="sendTesterStatus != null"> and t.send_tester_status = #{sendTesterStatus}</if>
            <if test="sendHrStatus != null"> and t.send_hr_status = #{sendHrStatus}</if>
            <if test="sendHrStatusList != null"> and t.send_hr_status in
                <foreach collection="sendHrStatusList" item="sendStatus" open="(" separator="," close=")">
                    #{sendStatus}
                </foreach>
            </if>
        </where>
    </select>
 
 
    <select id="selectViewReportList" parameterType="TExamReport" resultMap="TExamReportResult">
        <include refid="selectTExamReportListVo"/>
        <where>
            <if test="id != null "> and t.id = #{id}</if>
            <if test="productId != null "> and t.product_id = #{productId}</if>
            <if test="tokenId != null  and tokenId != ''"> and t.token_id = #{tokenId}</if>
            <if test="downloadTimes != null "> and t.downloadTimes = #{downloadTimes}</if>
            <if test="verifyStatus != null "> and t.verifyStatus = #{verifyStatus}</if>
            <if test="memberId != null  and memberId != ''"> and t.member_id = #{memberId}</if>
            <if test="productName != null  and productName != ''"> and u.product_name like concat('%', #{productName}, '%')</if>
            <if test="userName != null  and userName != ''"> and u.user_name like concat('%', #{userName}, '%')</if>
            <if test="testName != null  and testName != ''"> and u.test_name like concat('%', #{testName}, '%')</if>
            <if test="memberName != null  and memberName != ''"> and u.member_name like concat('%', #{memberName}, '%')</if>
            <if test="testId != null  and testId != ''"> and t.test_id = #{testId}</if>
            <if test="status != null  and status != ''"> and p.status = #{status}</if>
            <if test="finish == 1"> and t.finish in (1,2,6) </if>
            <if test="sendTesterStatus != null"> and t.send_tester_status = #{sendTesterStatus}</if>
            <if test="sendHrStatus != null"> and t.send_hr_status = #{sendHrStatus}</if>
            <if test="sendHrStatusList != null"> and t.send_hr_status in
                <foreach collection="sendHrStatusList" item="sendStatus" open="(" separator="," close=")">
                    #{sendStatus}
                </foreach>
            </if>
        </where>
    </select>
 
    <select id="selectHrResendTask" parameterType="TExamReport" resultMap="TExamReportResult">
    <include refid="selectTExamReportVo"/>
        <where>
            <if test="sendHrStatus != null"> and t.send_hr_status = #{sendHrStatus}</if>
            <if test="retriesTime != null"> and 3 > t.retriesTime AND TO_DAYS(t.create_time) > TO_DAYS('2020-09-13 19:46:12') </if>
            <if test="finish == 1"> and t.finish in (1,2,6) </if>
        </where>
    </select>
 
    <select id="selectTExamReportById" parameterType="Long" resultMap="TExamReportResult">
        <include refid="selectTExamReportVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertTExamReport" parameterType="TExamReport" useGeneratedKeys="true" keyProperty="id">
        insert into t_exam_report
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="productId != null ">product_id,</if>
            <if test="productName != null  and productName != ''">product_name,</if>
            <if test="content != null  and content != ''">content,</if>
            <if test="tokenId != null  and tokenId != ''">token_id,</if>
            <if test="createTime != null ">create_time,</if>
            <if test="updateTime != null ">update_time,</if>
            <if test="states != null  and states != ''">states,</if>
            <if test="lastContent != null  and lastContent != ''">last_content,</if>
            <if test="choice != null  and choice != ''">choice,</if>
            <if test="doTime != null  and doTime != ''">do_time,</if>
            <if test="questionCount != null  and questionCount != ''">question_count,</if>
            <if test="memberId != null  and memberId != ''">member_id,</if>
            <if test="userId != null  and userId != ''">user_id,</if>
            <if test="parentId != null  and parentId != ''">parent_id,</if>
            <if test="downloadTimes != null ">downloadTimes,</if>
            <if test="verifyStatus != null  and verifyStatus != ''">verifyStatus,</if>
            <if test="testId != null  and testId != ''">test_id,</if>
            <if test="finish != null  and finish != ''">finish,</if>
            <if test="questionOrder != null  and questionOrder != ''">question_order,</if>
            <if test="questionReport != null  and questionReport != ''">question_report,</if>
            <if test="questionTemplateId != null  and questionTemplateId != ''">question_template_id,</if>
            <if test="interfaceContent != null  and interfaceContent != ''">interface_content,</if>
            <if test="langType != null  and langType != ''">lang_type,</if>
            <if test="reportAddress != null  and reportAddress != ''">report_address,</if>
            <if test="reportTemplateId != null  and reportTemplateId != ''">report_template_id,</if>
            <if test="sendHrStatus != null  and sendHrStatus != ''">send_hr_status,</if>
            <if test="sendTesterStatus != null  and sendTesterStatus != ''">send_tester_status,</if>
            <if test="memberName != null  and memberName != ''">member_name,</if>
            <if test="optionOrder != null  and optionOrder != ''">option_order,</if>
            <if test="remainPartTime != null  and remainPartTime != ''">remain_part_time,</if>
            <if test="hrReportEmail != null  and hrReportEmail != ''">hrReportEmail,</if>
            <if test="hrTitle != null  and hrTitle != ''">hrTitle,</if>
            <if test="hrSendTime != null  and hrSendTime != ''">hrSendTime,</if>
            <if test="hrUpdateTime != null  and hrUpdateTime != ''">hrUpdateTime,</if>
            <if test="retriesTime != null  and retriesTime != ''">retriesTime,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="productId != null ">#{productId},</if>
            <if test="productName != null  and productName != ''">#{productName},</if>
            <if test="content != null  and content != ''">#{content},</if>
            <if test="tokenId != null  and tokenId != ''">#{tokenId},</if>
            <if test="createTime != null ">#{createTime},</if>
            <if test="updateTime != null ">#{updateTime},</if>
            <if test="states != null  and states != ''">#{states},</if>
            <if test="lastContent != null  and lastContent != ''">#{lastContent},</if>
            <if test="choice != null  and choice != ''">#{choice},</if>
            <if test="doTime != null  and doTime != ''">#{doTime},</if>
            <if test="questionCount != null  and questionCount != ''">#{questionCount},</if>
            <if test="memberId != null  and memberId != ''">#{memberId},</if>
            <if test="userId != null  and userId != ''">#{userId},</if>
            <if test="parentId != null  and parentId != ''">#{parentId},</if>
            <if test="downloadTimes != null  ">#{downloadTimes},</if>
            <if test="verifyStatus != null  and verifyStatus != ''">#{verifyStatus},</if>
            <if test="testId != null  and testId != ''">#{testId},</if>
            <if test="finish != null  and finish != ''">#{finish},</if>
            <if test="questionOrder != null  and questionOrder != ''">#{questionOrder},</if>
            <if test="questionReport != null  and questionReport != ''">#{questionReport},</if>
            <if test="questionTemplateId != null  and questionTemplateId != ''">#{questionTemplateId},</if>
            <if test="interfaceContent != null  and interfaceContent != ''">#{interfaceContent},</if>
            <if test="langType != null  and langType != ''">#{langType},</if>
            <if test="reportAddress != null  and reportAddress != ''">#{reportAddress},</if>
            <if test="reportTemplateId != null  and reportTemplateId != ''">#{reportTemplateId},</if>
            <if test="sendHrStatus != null  and sendHrStatus != ''">#{sendHrStatus},</if>
            <if test="sendTesterStatus != null  and sendTesterStatus != ''">#{sendTesterStatus},</if>
            <if test="memberName != null  and memberName != ''">#{memberName},</if>
            <if test="optionOrder != null  and optionOrder != ''">#{optionOrder},</if>
            <if test="remainPartTime != null  and remainPartTime != ''">#{remainPartTime},</if>
            <if test="hrReportEmail != null  and hrReportEmail != ''">#{hrReportEmail},</if>
            <if test="hrTitle != null  and hrTitle != ''">#{hrTitle},</if>
            <if test="hrSendTime != null  and hrSendTime != ''">#{hrSendTime},</if>
            <if test="hrUpdateTime != null  and hrUpdateTime != ''">#{hrUpdateTime},</if>
            <if test="retriesTime != null  and retriesTime != ''">#{retriesTime},</if>
         </trim>
    </insert>
 
    <update id="updateTExamReport" parameterType="TExamReport">
        update t_exam_report
        <trim prefix="SET" suffixOverrides=",">
            <if test="productId != null ">product_id = #{productId},</if>
            <if test="productName != null  and productName != ''">product_name = #{productName},</if>
            <if test="content != null  and content != ''">content = #{content},</if>
            <if test="tokenId != null  and tokenId != ''">token_id = #{tokenId},</if>
            <if test="createTime != null ">create_time = #{createTime},</if>
            <if test="updateTime != null ">update_time = #{updateTime},</if>
            <if test="states != null  and states != ''">states = #{states},</if>
            <if test="finish != null  and finish != ''">finish = #{finish},</if>
            <if test="downloadTimes != null ">downloadTimes = #{downloadTimes},</if>
            <if test="questionReport != null ">question_report = #{questionReport},</if>
            <if test="questionTemplateId != null ">question_template_id = #{questionTemplateId},</if>
            <if test="interfaceContent != null ">interface_content = #{interfaceContent},</if>
            <if test="langType != null ">lang_type = #{langType},</if>
            <if test="reportAddress != null ">report_address = #{reportAddress},</if>
            <if test="reportTemplateId != null ">report_template_id = #{reportTemplateId},</if>
            <if test="sendHrStatus != null ">send_hr_status = #{sendHrStatus},</if>
            <if test="sendTesterStatus != null ">send_tester_status = #{sendTesterStatus},</if>
            <if test="memberName != null ">member_name = #{memberName},</if>
            <if test="reportAddressNew != null ">report_address_new = #{reportAddressNew},</if>
            <if test="hrReportEmail != null ">hrReportEmail = #{hrReportEmail},</if>
            <if test="hrTitle != null ">hrTitle = #{hrTitle},</if>
            <if test="hrSendTime != null ">hrSendTime = #{hrSendTime},</if>
            <if test="hrUpdateTime != null ">hrUpdateTime = #{hrUpdateTime},</if>
            <if test="retriesTime != null ">retriesTime = #{retriesTime},</if>
        </trim>
        where id = #{id}
    </update>
 
    <update id="updateTExamReportStatus" parameterType="TExamReport">
        update t_exam_report
        <trim prefix="SET" suffixOverrides=",">
            <if test="sendHrStatus != null">send_hr_status = #{sendHrStatus},</if>
            <if test="sendTesterStatus != null">send_tester_status = #{sendTesterStatus},</if>
        </trim>
        where id = #{id}
    </update>
 
    <update id="updateTExamReportByTokenId" parameterType="TExamReport">
        update t_exam_report
        <trim prefix="SET" suffixOverrides=",">
            <if test="productId != null ">product_id = #{productId},</if>
            <if test="productName != null  and productName != ''">product_name = #{productName},</if>
            <if test="content != null  and content != ''">content = #{content},</if>
            <if test="createTime != null ">create_time = #{createTime},</if>
            <if test="updateTime != null ">update_time = #{updateTime},</if>
            <if test="states != null">states = #{states},</if>
            <if test="lastContent != null">last_content = #{lastContent},</if>
            <if test="choice != null">choice = #{choice},</if>
            <if test="doTime != null">do_time = #{doTime},</if>
            <if test="memberId != null">member_id = #{memberId},</if>
            <if test="questionCount != null">question_count = #{questionCount},</if>
            <if test="userId != null">user_id = #{userId},</if>
            <if test="parentId != null">parent_id = #{parentId},</if>
            <if test="downloadTimes != null">downloadTimes = #{downloadTimes},</if>
            <if test="verifyStatus != null">verifyStatus = #{verifyStatus},</if>
            <if test="testId != null">test_id = #{testId},</if>
            <if test="finish != null">finish = #{finish},</if>
            <if test="questionReport != null ">question_report = #{questionReport},</if>
            <if test="questionTemplateId != null ">question_template_id = #{questionTemplateId},</if>
            <if test="interfaceContent != null ">interface_content = #{interfaceContent},</if>
            <if test="langType != null ">lang_type = #{langType},</if>
            <if test="reportAddress != null ">report_address = #{reportAddress},</if>
            <if test="reportTemplateId != null ">report_template_id = #{reportTemplateId},</if>
            <if test="sendHrStatus != null ">send_hr_status = #{sendHrStatus},</if>
            <if test="sendTesterStatus != null ">send_tester_status = #{sendTesterStatus},</if>
            <if test="memberName != null ">member_name = #{memberName},</if>
            <if test="remark != null ">remark = #{remark},</if>
            <if test="optionOrder != null ">option_order = #{optionOrder},</if>
            <if test="remainPartTime != null ">remain_part_time = #{remainPartTime},</if>
            <if test="reportAddressNew != null ">report_address_new = #{reportAddressNew},</if>
            <if test="hrReportEmail != null ">hrReportEmail = #{hrReportEmail},</if>
            <if test="hrTitle != null ">hrTitle = #{hrTitle},</if>
            <if test="hrSendTime != null ">hrSendTime = #{hrSendTime},</if>
            <if test="hrUpdateTime != null ">hrUpdateTime = #{hrUpdateTime},</if>
            <if test="retriesTime != null ">retriesTime = #{retriesTime},</if>
        </trim>
        where token_id = #{tokenId}
    </update>
 
    <update id="updateTExamReportByIds" parameterType="java.util.Map">
        update t_exam_report
        <trim prefix="SET" suffixOverrides=",">
            <if test="downloadTimes != null ">downloadTimes = #{downloadTimes},</if>
        </trim>
         where id in
        <foreach item="id" collection="ids" open="(" separator="," close=")">
            #{id}
        </foreach>
 
    </update>
 
    <update id="updateTExamReportDeleteLastOneByTokenId">
        update t_exam_report ter
        <trim prefix="SET" suffixOverrides=",">
            <if test="remark != null ">ter.remark = #{remark},</if>
            <if test="finish != null">finish = #{finish},</if>
            <if test="updateTime != null ">update_time = #{updateTime},</if>
            ter.choice = concat(SUBSTRING(ter.choice,1,LENGTH(ter.choice)-INStr(REVERSE(ter.choice),',')),'}' ),
        </trim>
        where ter.token_id = #{tokenId}
    </update>
 
    <delete id="deleteTExamReportById" parameterType="Long">
        delete from t_exam_report where id = #{id}
    </delete>
 
    <delete id="deleteTExamReportByIds" parameterType="String">
        delete from t_exam_report where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
 
    <select id="selectTExamReportByTokenList" parameterType="String" resultMap="TExamReportResult">
        <include refid="selectTExamReportListVo"/>
        <where>
        t.token_id in
            <foreach item="tokenIds" collection="array" open="(" separator="," close=")">
                #{tokenIds}
            </foreach>
        </where>
    </select>
 
    <select id="selectTExamReportByIds" parameterType="String" resultMap="TExamReportResult">
        <include refid="selectTExamReportListVo"/>
        <where>
            t.id in
            <foreach item="ids" collection="array" open="(" separator="," close=")">
                #{ids}
            </foreach>
        </where>
    </select>
 
    <select id="selectTReportTemplatesByMemberId" parameterType="String" resultMap="TExamReportResult">
        <include refid="selectTExamReportListVo"/>
        <where>
            t.member_id in
            <foreach item="id" collection="array" open="(" separator="," close=")">
                #{id}
            </foreach>
        </where>
    </select>
    
</mapper>