zouyu
2025-03-06 f3bb76fa668530d5613700e57a30e6c7394d5224
basic-server/src/main/resources/mapper/CertificationMapper.xml
@@ -3,17 +3,17 @@
<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
        from ( select a.id, 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
        GROUP BY
        name) a left join certification c on a.id=c.id
        ) b
    </select>
</mapper>