<?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.ozs.pm.mapper.PmDemandExpertRefHisMapper">

    <select id="getPmBaseExpertResVoList" resultType="com.ozs.pm.doman.vo.responseVo.PmBaseExpertResVo">
        SELECT
        t.demand_id as demandId,
        DATE_FORMAT(t.access_time,'%Y-%m-%d') accessTime,
        count(1) expertCount
        from pm_demand_expert_ref_his t
        where t.demand_id = #{demandId} and t.return_order_number = #{returnOrderNumber}
        group by accessTime
        order by accessTime desc
    </select>
</mapper>
