stanley-king 4 سال پیش
والد
کامیت
ba32b716e4
2فایلهای تغییر یافته به همراه10 افزوده شده و 8 حذف شده
  1. 5 3
      helper/refill/RefillBase.php
  2. 5 5
      rdispatcher/proxy.php

+ 5 - 3
helper/refill/RefillBase.php

@@ -223,6 +223,8 @@ class RefillBase
             $card_type = mtopcard\card_type($card_no);
         }
         [$providers,$overload] = $this->mPolicy->find_providers($amount,$card_type,$quality);
+        Log::record("RefillBase::add 1",Log::DEBUG);
+
 
         if (empty($providers))
         {
@@ -234,7 +236,7 @@ class RefillBase
                 return [errcode::CANNOT_MATCH_PROVIDER, "匹配不到合适的充值通道",$last_orderid,false];
             }
         }
-        Log::record(__CLASS__ . __FUNCTION__ . " 1",Log::DEBUG);
+        Log::record("RefillBase::add 2",Log::DEBUG);
         if (empty($notify_url)) {
             $notify_url = "";
         }
@@ -242,14 +244,14 @@ class RefillBase
         $minfo = new member_info($buyer_id);
         $calc = new CalcMerchantPrice($mchid, $amount, $card_type,$quality);
         $mch_amount = $calc->calc_vgoods_price([]);
-        Log::record(__CLASS__ . __FUNCTION__ . " 2",Log::DEBUG);
+        Log::record("RefillBase::add 3",Log::DEBUG);
 
         $available = $minfo->available_predeposit();
         if ($mch_amount > $available) {
             Log::record("下单时机构余额不足,可用余额为:{$available}", Log::DEBUG);
             return [errcode::MERCHANT_SHORT_MONEY, "余额不足支付订单",$last_orderid,false];
         }
-        Log::record(__CLASS__ . __FUNCTION__ . " 3",Log::DEBUG);
+        Log::record("RefillBase::add 4",Log::DEBUG);
 
         $refill_state = false;
         $order_success = false;

+ 5 - 5
rdispatcher/proxy.php

@@ -31,7 +31,7 @@ class proxy
         $org_quality = intval($params['org_quality']) ?? 0;
         $card_type   = intval($params['card_type']) ?? 0;
 
-        Log::record(__FUNCTION__ . " 1" ,Log::DEBUG);
+        Log::record("proxy::add 1" ,Log::DEBUG);
 
         $need_check = false;
         if($card_type == 0)
@@ -41,7 +41,7 @@ class proxy
                 $need_check = true;
             }
         }
-        Log::record(__FUNCTION__ . " 2" ,Log::DEBUG);
+        Log::record("proxy::add 2" ,Log::DEBUG);
 
         [$org_quality,$quality] = refill\RefillFactory::instance()->find_quality($mchid,$amount,$card_type,$org_quality,$commit_times,time() - $order_time);
         Log::record("org_quality = {$org_quality} quality = {$quality}",Log::DEBUG);
@@ -58,7 +58,7 @@ class proxy
             }
         }
 
-        Log::record(__FUNCTION__ . " 3" ,Log::DEBUG);
+        Log::record("proxy::add 3" ,Log::DEBUG);
 
         [$errcode, $errmsg, $order_id, $neterr] = refill\RefillFactory::instance()->add($mchid, $buyer_id, $amount, $card_no,
             $mch_order, $idcard, $card_name, $notify_url, $quality,$org_quality,
@@ -66,7 +66,7 @@ class proxy
         $params['commit_times'] += 1;
         $commit_times += 1;
 
-        Log::record(__FUNCTION__ . " 4" ,Log::DEBUG);
+        Log::record("proxy::add 4" ,Log::DEBUG);
 
         if($errcode !== true)
         {
@@ -80,7 +80,7 @@ class proxy
                     if($order_id > 0) {
                         $refill_order->edit($order_id, ['is_retrying' => 1]);
                     }
-                    \Swoole\Coroutine::sleep(5);
+                    \Swoole\Coroutine::sleep(2);
                     refill\util::push_add($params);
                 }
             }