<?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.mapper.supplier.SupplierPriceMapper">

    <select id="getList" resultType="java.util.LinkedHashMap">
        <include refid="selectPrice"/>
    </select>

    <select id="getPage" resultType="java.util.LinkedHashMap">
        <include refid="selectPrice"/>
    </select>

    <sql id="selectPrice">
        select sp.id,
               m.code            materialCode,
               m.name            materialName,
               m.width,
               m.unit_weight     unitWeight,
               s.name            supplierName,
               sp.price,
               m.safety_warn_day safetyWarnDay
        from supplier_price sp
                 inner join supplier s on sp.supplier_id = s.id
                 inner join material m on sp.material_id = m.id
            ${ew.customSqlSegment}
    </sql>

</mapper>
