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
| <?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.gkhy.exam.noncoalmine.mapper.WorkRegistrationMapper">
| <select id="listByPage" resultType="com.gkhy.exam.noncoalmine.entity.WorkRegistration">
| select
| work_id,
| name,
| id_card,
| elect_num,
| ic_num,
| work_time,
| dept,
| operate_type_id,
| is_cm,
| remark,
| del_flag,
| create_by,
| create_time,
| update_by,
| update_time
| from work_registration
| where del_flag = 0
| <if test="query.dept != null and query.dept != ''">
| and dept like concat('%', #{query.dept}, '%')
| </if>
| <if test="query.name != null and query.name != ''">
| and name like concat('%', #{query.name}, '%')
| </if>
| <if test="query.idCard != null and query.idCard != ''">
| and id_card like concat('%', #{query.idCard}, '%')
| </if>
| <if test="query.operateTypeId != null">
| and (operate_type_id = #{query.operateTypeId} OR operate_type_id IN ( SELECT t.id FROM sys_operate_type t WHERE find_in_set(#{query.operateTypeId}, ancestors)))
| </if>
| <if test="query.isCm != null">
| and is_cm = #{query.isCm}
| </if>
| order by create_time desc
| </select>
|
| </mapper>
|
|