订单软删除

This commit is contained in:
liu
2026-08-12 09:42:48 +08:00
parent fa4bf6fe61
commit ce1f36b5b4
10 changed files with 127 additions and 6 deletions
+1
View File
@@ -41,6 +41,7 @@ class PurchaseAllocateService
$orderItems = StoreOrderItemModel::query()
->join('store_order', 'store_order.id', '=', 'store_order_item.order_id')
->where('store_order.purchase_id', $purchase->id)
->whereNull('store_order.deleted_at')
->select('store_order_item.*')
->get()
->groupBy('product_id');
@@ -39,6 +39,7 @@ class StatementGenerateService
->whereDate('store_order.order_date', '>=', $periodStart)
->whereDate('store_order.order_date', '<=', $periodEnd)
->where('store_order.status', '<>', StoreOrderModel::STATUS_CANCELLED)
->whereNull('store_order.deleted_at')
->select('store_order_item.*')
->get();