浏览代码

modify errmsg to vr_order table

stanley-king 1 年之前
父节点
当前提交
d026f4cda3
共有 3 个文件被更改,包括 7 次插入4 次删除
  1. 4 3
      helper/refill/RefillBase.php
  2. 1 1
      helper/refill/util.php
  3. 2 0
      rdispatcher/proxy.php

+ 4 - 3
helper/refill/RefillBase.php

@@ -450,7 +450,7 @@ class RefillBase
 
         if (empty($providers)) {
             Log::record("canot find any providers", Log::DEBUG);
-            return [errcode::CANNOT_MATCH_PROVIDER, "匹配不到合适的充值通道", $last_orderid, false, 0];
+            return [errcode::CANNOT_MATCH_PROVIDER, "匹配不到任何通道", $last_orderid, false, 0];
         }
 
         try
@@ -472,8 +472,9 @@ class RefillBase
 
         $available = $minfo->available_predeposit();
         if ($mch_amount > $available) {
-            Log::record("下单时机构余额不足,可用余额为:$available", Log::DEBUG);
-            return [errcode::MERCHANT_SHORT_MONEY, "余额不足支付订单",$last_orderid,false,0];
+            $errmsg = "余额不足=$available";
+            Log::record($errmsg, Log::DEBUG);
+            return [errcode::MERCHANT_SHORT_MONEY, $errmsg,$last_orderid,false,0];
         }
 
         foreach ($providers as $provider)

+ 1 - 1
helper/refill/util.php

@@ -946,7 +946,7 @@ class util
             else
             {
                 $a = $namer($order_time);
-                $b = $namer(time() + 3600);
+                $b = $namer(time() + 3600); //当前时间加上一个小时误差
                 if ($a == $b) {
                     return $a;
                 } else {

+ 2 - 0
rdispatcher/proxy.php

@@ -34,6 +34,8 @@ class proxy
             $last_order_id = $order_id;
         } else {
             $mod_refill->partition(util::part_refill($order_time))->edit($last_order_id, ['notify_time' => time(), 'notify_state' => 1, 'is_retrying' => 0]);
+            $mod_order = Model('vr_order');
+            $mod_order->partition(util::part_vr_order_time($order_time))->editOrder(['close_reason' => $errmsg], ['order_id' => $last_order_id]);
         }
 
         refill\util::pop_queue_order($mchid, $mch_order,$order_time);