<?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.pack.PackDetailMapper">
    <select id="getPage" resultType="com.fjhx.sale.entity.pack.vo.PackDetailVo">
        SELECT
            t1.*,
            GROUP_CONCAT(CONCAT(t3.`code`,"_",t2.product_name )) AS codeAPName
        FROM
            pack_detail t1
                LEFT JOIN pack_detail_product t2 ON t1.id = t2.pack_detail_id
                LEFT JOIN contract t3 ON t2.contract_id = t3.id
            ${ew.customSqlSegment}
    </select>

</mapper>
