<?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="vip.xiaonuo.biz.modular.bizappointmentrecord.mapper.BizAppointmentRecordMapper">

    <select id="getPage" resultType="vip.xiaonuo.biz.modular.bizappointmentrecord.entity.BizAppointmentRecord">
        select
            bar.id,
            bar.order_id,
            bar.license_number,
            bo.order_number,
            bo.order_name,
            bc.name customerName,
            bg.GOODS_NAME goodsName,
            bg.GOODS_MODEL goodsModel,
            bar.time_id,
            bat.begin_time,
            bat.end_time,
            bar.driver_name,
            bar.driver_mobile,
            bar.status,
            bar.appointment_reason
        from biz_appointment_record bar
         left join biz_order bo on bar.order_id = bo.id
         left join biz_goods bg on bg.id = bo.good_id
         left join biz_appointment_time bat on bat.id = bar.time_id
         left join biz_customer bc on bc.id = bo.customer_id
        ${ew.customSqlSegment}
    </select>
</mapper>
