<?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.yeejoin.amos.boot.module.hygf.api.mapper.MaintenanceTrainingMapper">

    <select id="selectTrainingStatus" resultType="java.util.Map">
        SELECT
            count(ht.sequence_nbr) as total,
            count(hmt.sequence_nbr) as num
        FROM
            hygf_training AS ht
                LEFT JOIN hygf_maintenance_training hmt ON hmt.training_id = ht.sequence_nbr AND hmt.user_id = #{userId}
    </select>
</mapper>
