<?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.item.mapper.product.ProductSpuMapper">
    <select id="getPage" resultType="com.fjhx.item.entity.product.vo.ProductSpuVo">
        SELECT
            ps.id,
            ps.`code`,
            ps.`name`,
            ps.remark,
            ps.create_user,
            ps.create_time,
            ps.update_user,
            ps.update_time,
            count( pi.id ) AS `count`
        FROM
            product_spu ps
            left JOIN product_info pi ON pi.product_spu_id = ps.id
            ${ew.customSqlSegment}
    </select>

</mapper>
