|
@@ -51,9 +51,9 @@ class RefillBase
|
|
return $this->mPolicy->find_quality($order,$skip);
|
|
return $this->mPolicy->find_quality($order,$skip);
|
|
}
|
|
}
|
|
|
|
|
|
- private function third_can_retry(order $order) : bool
|
|
|
|
|
|
+ private function third_can_retry(order $order) : array
|
|
{
|
|
{
|
|
-
|
|
|
|
|
|
+ return $this->mPolicy->third_retry($order);
|
|
}
|
|
}
|
|
|
|
|
|
public function notify($chname, $input)
|
|
public function notify($chname, $input)
|
|
@@ -207,10 +207,17 @@ class RefillBase
|
|
$mod_refill->partition(util::part_refill($order_time))->edit($order_id, ['is_retrying' => 1,'notify_time' => time()]);
|
|
$mod_refill->partition(util::part_refill($order_time))->edit($order_id, ['is_retrying' => 1,'notify_time' => time()]);
|
|
$tran->commit();
|
|
$tran->commit();
|
|
|
|
|
|
- [$can_retry,$params] = $this->retry($refill_info, $order_info);
|
|
|
|
|
|
+ $order = order::from_db($refill_info,$order_info);
|
|
|
|
+ [$can_retry,$params] = $this->retry($order);
|
|
if ($can_retry)
|
|
if ($can_retry)
|
|
{
|
|
{
|
|
- if(util::push_add($params)) {
|
|
|
|
|
|
+ if($order->is_third())
|
|
|
|
+ {
|
|
|
|
+ if(util::push_addthird($params)) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ elseif(util::push_add($params)) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -237,14 +244,19 @@ class RefillBase
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private function retry(array $refill_info, array $order_info)
|
|
|
|
|
|
+ private function retry(order $order)
|
|
{
|
|
{
|
|
$trace = new scope_trace(__METHOD__);
|
|
$trace = new scope_trace(__METHOD__);
|
|
- $order = order::from_db($refill_info,$order_info);
|
|
|
|
if($order->is_third())
|
|
if($order->is_third())
|
|
{
|
|
{
|
|
- if($this->third_can_retry($order))
|
|
|
|
- return [false,null];
|
|
|
|
|
|
+ [$can_retry,$next_pcode] = $this->third_can_retry($order);
|
|
|
|
+ if($can_retry) {
|
|
|
|
+ $params = $order->third_requeue_params($next_pcode);
|
|
|
|
+ return [$can_retry,$params];
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ return [false,null];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
[$org_quality,$quality] = $this->find_quality($order);
|
|
[$org_quality,$quality] = $this->find_quality($order);
|