<?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.fjhx.sale.mapper.arrival.ArrivalDetailMapper">
    <select id="getList" resultType="com.fjhx.sale.entity.arrival.vo.ArrivalDetailVo">
        SELECT ad.*,
               a.arrival_time AS arrivalTime,
               a.`code`       AS arrivalCode,
               pi.`name`      AS productName,
               pi.custom_code AS productCode,
               pi.length      AS productLength,
               pi.width       AS productWidth,
               pi.height      AS productHeight,
               pi.color       AS productColor
        FROM arrival_detail ad
                 JOIN arrival a ON ad.arrival_id = a.id
                 LEFT JOIN product_info pi ON ad.product_id = pi.id
            ${ew.customSqlSegment}
    </select>
</mapper>
