tuqin
2026-09-24 034f720f0bbc7f253c15613c28d994d7abf401eb
src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
@@ -241,7 +241,19 @@
            AND slp.product_category = #{req.productCategory}
        </if>
        GROUP BY slp.product_category, slp.specification_model, sl.supplier_name
        ORDER BY slp.product_category
        <!-- 排序:支持按录入日期(聚合列)排序,白名单防止注入;默认按产品大类 -->
        <choose>
            <when test="req.orderByColumn == 'entryDate'">
                ORDER BY MAX(sl.entry_date)
                <choose>
                    <when test="req.isAsc == 'asc'">ASC</when>
                    <otherwise>DESC</otherwise>
                </choose>
            </when>
            <otherwise>
                ORDER BY slp.product_category ASC
            </otherwise>
        </choose>
    </select>
    <select id="selectProductBomStructure" resultType="com.ruoyi.sales.dto.LossProductModelDto">
        select