|
@@ -339,7 +339,7 @@ class RefillFactory
|
|
|
|
|
|
$mod_refill = Model('refill_order');
|
|
|
$mod_refill->edit($order_id, ['notify_time' => time(), 'notify_state' => 1]);
|
|
|
- QueueClient::push("NotifyMerchantComplete", ['order_id' => $order_id]);
|
|
|
+ QueueClient::push("NotifyMerchantComplete", ['order_id' => $order_id,'manual' => false]);
|
|
|
} else {
|
|
|
Log::record("系统无此订单ID:{$order_id}", Log::ERR);
|
|
|
|
|
@@ -542,7 +542,7 @@ class RefillFactory
|
|
|
return $checker($url, "http://") || $checker($url, "https://");
|
|
|
}
|
|
|
|
|
|
- public function notify_merchant($order_id)
|
|
|
+ public function notify_merchant($order_id,$manual)
|
|
|
{
|
|
|
if ($order_id <= 0) {
|
|
|
return [false, "订单ID小于0"];
|
|
@@ -557,7 +557,9 @@ class RefillFactory
|
|
|
if (empty($order_info) || empty($refill_info)) {
|
|
|
return [false, "无此订单"];
|
|
|
}
|
|
|
- if ($refill_info['mch_notify_state'] != 0) {
|
|
|
+
|
|
|
+ //手动通知,之所以不做尝试,是担心客户方状态处理不当
|
|
|
+ if (!$manual && $refill_info['mch_notify_state'] != 0) {
|
|
|
return [false, "已经通知客户方"];
|
|
|
}
|
|
|
|
|
@@ -601,7 +603,7 @@ class RefillFactory
|
|
|
} else {
|
|
|
$N = intval($times / 5);
|
|
|
$period = intval(pow(2, $N));
|
|
|
- QueueClient::async_push("NotifyMerchantComplete", ['order_id' => $order_id], $period);
|
|
|
+ QueueClient::async_push("NotifyMerchantComplete", ['order_id' => $order_id,'manual' => false], $period);
|
|
|
}
|
|
|
return [false, "通知{$times}次,失败."];
|
|
|
}
|
|
@@ -658,7 +660,7 @@ class RefillFactory
|
|
|
|
|
|
if($modify_able) {
|
|
|
$mod_refill->edit($order_id, ['notify_time' => time(), 'notify_state' => 1]);
|
|
|
- QueueClient::push("NotifyMerchantComplete", ['order_id' => $order_id]);
|
|
|
+ QueueClient::push("NotifyMerchantComplete", ['order_id' => $order_id,'manual' => false]);
|
|
|
}
|
|
|
}
|
|
|
|