support sku filter

This commit is contained in:
Timi
2026-09-25 22:07:31 +08:00
parent b30434777d
commit cd8e552d21
2 changed files with 13 additions and 0 deletions
@@ -5,6 +5,8 @@ import com.imyeyu.java.bean.BasePage;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/// GAO 统一履约分页查询请求
///
/// @author Codex
@@ -22,6 +24,9 @@ public class GaoOrderFulfillmentPage extends BasePage {
/// 客户 ID
private String customerId;
/// SKU ID 列表,任一 SKU 命中即匹配
private List<String> skuIdList;
/// 履约状态
private GaoOrderFulfillment.Status status;
@@ -39,6 +39,14 @@
<if test="storeId != null and storeId != ''">AND `store_id` = #{storeId}</if>
<if test="salesOrderId != null and salesOrderId != ''">AND `sales_order_id` = #{salesOrderId}</if>
<if test="customerId != null and customerId != ''">AND `customer_id` = #{customerId}</if>
<if test="skuIdList != null and skuIdList.size() > 0">
AND EXISTS (
SELECT 1 FROM `gao_order_fulfillment_item` fulfillment_item
WHERE fulfillment_item.`fulfillment_id` = `gao_order_fulfillment`.`id`
AND fulfillment_item.`sku_id` IN
<foreach collection="skuIdList" item="skuId" open="(" separator="," close=")">#{skuId}</foreach>
)
</if>
<if test="status != null">AND `status` = #{status}</if>
<if test="beginAt != null">AND `delivered_at` &gt;= #{beginAt}</if>
<if test="endAt != null">AND `delivered_at` &lt;= #{endAt}</if>