gongchunyi
14 小时以前 93b93bacbe43fcd2f13884ec02782baf77193d35
src/main/resources/mapper/sales/SalesLedgerMapper.xml
@@ -95,6 +95,20 @@
            <if test="salesLedgerDto.stockStatus != null">
                AND T1.stock_status = #{salesLedgerDto.stockStatus}
            </if>
            <if test="salesLedgerDto.width != null or salesLedgerDto.height != null">
                AND EXISTS (
                SELECT 1
                FROM sales_ledger_product SLP
                WHERE SLP.sales_ledger_id = T1.id
                AND SLP.type = 1
                <if test="salesLedgerDto.width != null">
                    AND SLP.width = #{salesLedgerDto.width}
                </if>
                <if test="salesLedgerDto.height != null">
                    AND SLP.height = #{salesLedgerDto.height}
                </if>
                )
            </if>
        </where>
        ORDER BY T1.entry_date DESC,T1.id DESC
    </select>