<?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.system.mapper.GradDTOMapper">
    <select id="getInfo" parameterType="QueryEntity" resultType="GradDTO">
        SELECT
               a.cert_type certType,
               a.uesr_name userName,
               a.user_id userId,
               a.cert_id certId,
               a.issue_date issueDate,
               a.cert_name certName,
               a.course_name courseName,
               a.course_hours courseHours,
               a.level,
               a.train_period trainPeriod,
               a.picture,
               a.user_phone userPhone,
               a.user_email userEmail,
               a.update_date updateDate,
               a.id,
               b.url
        FROM grad_table a LEFT JOIN template_table b ON a.template_id = b.id
        WHERE a.cert_id = #{certNumber} AND a.uesr_name = #{userName}
    </select>

</mapper>
