<?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="org.jeecg.modules.basedata.mapper.FdQuotationTemplateItemMapper">
        <select id="findByPage" resultType="org.jeecg.modules.basedata.entity.FdQuotationTemplateItem">
            SELECT
                fqti.id,
                fqti.`code`,
                fqti.`name`,
                fqti.description,
                fqt.fee_category1,
                fqt.fee_category2
                FROM fd_quotation_template_item fqti
                LEFT JOIN fd_quotation_template fqt ON fqti.pk_quotation_template=fqt.id
                 ${ew.customSqlSegment}
        </select>

        <select id="findOrderByCode" resultType="org.jeecg.modules.basedata.entity.FdQuotationTemplateItem">
            SELECT
                *
            FROM
                `fd_quotation_template_item`
            WHERE
                pk_quotation_template = #{0}
            ORDER BY
             `code`+0 asc,CONVERT(code USING gbk)asc
        </select>
</mapper>