stanley-king 4 vuotta sitten
vanhempi
commit
bbbfa8ad90
2 muutettua tiedostoa jossa 5 lisäystä ja 12 poistoa
  1. 2 8
      helper/refill/RefillBase.php
  2. 3 4
      rdispatcher/proxy.php

+ 2 - 8
helper/refill/RefillBase.php

@@ -106,15 +106,9 @@ class RefillBase
                 if(!empty($refill_info))
                 {
                     $logic_vr_order->changeOrderStateCancel($order_info, '', "{$chname}接口回调通知失败,正在重试");
-                    $params = $this->retry($refill_info, $order_info);
-                    if ($params !== false) {
+                    if ($this->retry($refill_info, $order_info)) {
                         $mod_refill->edit($order_id, ['is_retrying' => 1]);
                         $tran->commit();
-                        if(defined('USE_COROUTINE') && USE_COROUTINE) {
-                            \Swoole\Coroutine::sleep(2);
-                        }
-
-                        util::push_add($params);
                         return true;
                     }
                 }
@@ -162,7 +156,7 @@ class RefillBase
             'order_id' => $refill_info['order_id']
         ];
 
-        return $params;
+        return util::push_add($params);
     }
 
     public function zero_order($mchid, $buyer_id, $amount, $card_no,

+ 3 - 4
rdispatcher/proxy.php

@@ -71,10 +71,9 @@ class proxy
                     if($order_id > 0) {
                         $refill_order->edit($order_id, ['is_retrying' => 1]);
                     }
-
-                    if(defined('USE_COROUTINE') && USE_COROUTINE) {
-                        \Swoole\Coroutine::sleep(2);
-                    }
+//                    if(defined('USE_COROUTINE') && USE_COROUTINE) {
+//                        \Swoole\Coroutine::sleep(2);
+//                    }
                     refill\util::push_add($params);
                 }
             }