<?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.hotwj.platform.driverManagement.driver.mapper.HotDriverMapper">

    <select id="selectDriverCategoryStat"
            resultType="com.hotwj.platform.driverManagement.driver.domain.vo.HotDriverCategoryStatVo">
        SELECT person_type AS personType, COUNT(1) AS count
        FROM hot_driver
        <where>
            <if test="companyId != null">
                AND company_id = #{companyId}
            </if>
            AND is_deleted = 0
        </where>
        GROUP BY person_type
    </select>

</mapper>
