教育训练处考试制证系统后端
heheng
2025-05-19 3a762add44449332d6d379e361698850f6066e16
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
<?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.institutionalaccess.mapper.ThCertMapper">
 
    <select id="listByPage" resultType="com.gkhy.exam.institutionalaccess.entity.ThCert"
            parameterType="com.gkhy.exam.institutionalaccess.model.query.ThCertQuery">
        select a.*,b.batch_name  from th_cert a
        left join th_batch b on a.batch_uuid=b.uuid
        <where>
            and a.del_flag=0 and b.del_flag =0
            <if test="institutionName!=null and institutionName!=''">
                 and a.institution_name =#{institutionName}
            </if>
            <if test="startTime!=null and startTime!=''">
                and a.cert_time &gt;= #{startTime}
            </if>
            <if test="endTime!=null and endTime!=''">
                and a.cert_time &lt;= #{endTime}
            </if>
            <if test="trainOrgName!=null and trainOrgName!=''">
                and a.train_org_name =#{trainOrgName}
            </if>
            <if test="idcard!=null and idcard!=''">
                and a.idcard like concat('%',#{idcard},'%')
            </if>
        </where>
        order by a.create_time desc
    </select>
</mapper>