zouyu
2025-03-01 e7a77fffb72595958d245598c4abe87c6b4b84b6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?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.ruoyi.basic.mapper.CertificationMapper">
    <select id="getCertificationDetail" resultType="com.ruoyi.basic.pojo.Certification">
        select b.*
        from ( select a.`name`, a.`code`,a.organization,a.explanation,a.first_issuance_date,a.latest_issuance_date,c.expire_time FROM
            (SELECT id,name,MIN(date_of_issuance) AS first_issuance_date,
                    MAX(date_of_issuance) AS latest_issuance_date,
                    c.`code`,c.organization,c.explanation
             FROM
                 certification c
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
            ${ew.customSqlSegment}
        </if>
             GROUP BY
                 name) a left join certification c on a.id=c.id
        ) b
    </select>
</mapper>