maven
9 小时以前 f8dc8889897431d908c658fb415186d39b963eb6
src/main/resources/mapper/sales/SalesQuotationMapper.xml
@@ -4,16 +4,19 @@
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.sales.mapper.SalesQuotationMapper">
    <select id="listPage" resultType="com.ruoyi.sales.dto.SalesQuotationDto">
        SELECT * FROM sales_quotation
        SELECT t1.*,
               t2.approve_user_ids
        FROM sales_quotation t1
        LEFT JOIN approve_process t2 ON t1.quotation_no = t2.approve_reason and t2.approve_type = 6
        WHERE 1=1
        <if test="salesQuotationDto.quotationNo != null and salesQuotationDto.quotationNo != '' ">
            AND quotation_no LIKE CONCAT('%',#{salesQuotationDto.quotationNo},'%')
            AND t1.quotation_no LIKE CONCAT('%',#{salesQuotationDto.quotationNo},'%')
        </if>
        <if test="salesQuotationDto.customer != null and salesQuotationDto.customer != '' ">
            AND customer = #{salesQuotationDto.customer}
            AND t1.customer = #{salesQuotationDto.customer}
        </if>
        <if test="salesQuotationDto.status != null and salesQuotationDto.status != '' ">
            AND status = #{salesQuotationDto.status}
            AND t1.status = #{salesQuotationDto.status}
        </if>
    </select>
</mapper>