<?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.product.ProductExMapper">

    <select id="getPage" resultType="java.util.LinkedHashMap">
        select p.id,
               p.classify_id classifyId,
               p.code,
               p.name,
               pe.model,
               p.unit,
               p.introduce,
               wr.name       workingRouteName
        from product p
                 left join product_ex pe on p.id = pe.id
                 left join working_route wr on pe.working_route_id = wr.id
            ${ew.customSqlSegment}
    </select>

    <select id="getList" resultType="java.util.Map">
        select p.id,
               p.code,
               p.name,
               wr.id   workingRouteId,
               wr.name workingRouteName
        from product p
                 left join product_ex pe on p.id = pe.id
                 left join working_route wr on pe.working_route_id = wr.id
            ${ew.customSqlSegment}
    </select>

</mapper>
