|
|
@@ -34,6 +34,21 @@ class Channel
|
|
|
return [$channelId, $channelGoodsId, $discount];
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 订单被人工处理时,移除渠道队列里的遗留任务
|
|
|
+ */
|
|
|
+ public function removeQueuedOrder($channelId, $orderId): void
|
|
|
+ {
|
|
|
+ $channelId = (int)$channelId;
|
|
|
+ $orderId = (int)$orderId;
|
|
|
+ if ($channelId <= 0 || $orderId <= 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ $queueKey = "channel_queue:$channelId";
|
|
|
+ Redis::connect()->lRem($queueKey, $orderId, 0);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* =====================================
|