add package filter for SalesOrderPage

This commit is contained in:
Timi
2026-09-18 18:28:15 +08:00
parent cee7dd2442
commit 76c5495c32
2 changed files with 11 additions and 0 deletions
@@ -19,6 +19,9 @@ public class GaoSalesOrderPage extends BasePage {
/// 客户 ID
private String customerId;
/// 套餐配置 ID
private String packageConfigId;
/// 订单类型
private GaoSalesOrder.OrderType orderType;
@@ -23,6 +23,14 @@
o.`deleted_at` IS NULL
<if test="storeId != null and storeId != ''">AND o.`store_id` = #{storeId}</if>
<if test="customerId != null and customerId != ''">AND o.`customer_id` = #{customerId}</if>
<if test="packageConfigId != null and packageConfigId != ''">
AND EXISTS (
SELECT 1 FROM `gao_customer_package` cp
WHERE cp.`sales_order_id` = o.`id`
AND cp.`package_config_id` = #{packageConfigId}
AND cp.`deleted_at` IS NULL
)
</if>
<if test="orderType != null">AND o.`order_type` = #{orderType}</if>
<if test="status != null">AND o.`status` = #{status}</if>
<if test="paymentStatus != null">AND o.`payment_status` = #{paymentStatus}</if>