stanley-king 1 tháng trước cách đây
mục cha
commit
8bbc0af885
2 tập tin đã thay đổi với 9 bổ sung10 xóa
  1. 4 5
      admin/control/merchant.php
  2. 5 5
      core/framework/libraries/model.php

+ 4 - 5
admin/control/merchant.php

@@ -1393,7 +1393,7 @@ class merchantControl extends SystemControl
         $order_id = $_GET['order_id'];
         $mod_order = Model('vr_order');
         $mod_refill = Model('refill_order');
-        $tran = new trans_wapper($mod_refill, 'merchant readd trans');
+        $tran = new trans_wapper($mod_refill, __METHOD__);
 
         try
         {
@@ -1406,7 +1406,7 @@ class merchantControl extends SystemControl
                 $tran->commit();
                 Log::record("readd 2", Log::DEBUG);
 
-                showMessage('操作成功', '');
+//                showMessage('操作成功', '');
                 return false;
             }
 
@@ -1415,7 +1415,7 @@ class merchantControl extends SystemControl
                 $tran->commit();
                 Log::record("readd 3", Log::DEBUG);
 
-                showMessage('只有失败的订单才可以重新补充', '');
+//                showMessage('只有失败的订单才可以重新补充', '');
             }
             else {
                 $mod_refill>edit($order_id, ['is_retrying' => 1]);
@@ -1431,11 +1431,10 @@ class merchantControl extends SystemControl
             Log::record("readd 5", Log::DEBUG);
 
 
-            showMessage('操作成功', '');
+//            showMessage('操作成功', '');
         }
         catch (Exception $ex) {
             Log::record("readd 6", Log::DEBUG);
-
             $tran->rollback();
             return false;
         }

+ 5 - 5
core/framework/libraries/model.php

@@ -32,7 +32,7 @@ class trans_wapper
         } else {
             $this->mMod->beginTransaction();
         }
-        Log::record("trans_wapper begin {$this->mName}",Log::DEBUG);
+        Log::record("trans_wapper begin $this->mName", Log::DEBUG);
     }
     public function commit()
     {
@@ -42,7 +42,7 @@ class trans_wapper
         } else {
             $this->mMod->commit();
         }
-        $msg = sprintf("trans_wapper commit {$this->mName} use_time=%.6f",microtime(true) - $this->mStart);
+        $msg = sprintf("trans_wapper commit $this->mName use_time=%.6f",microtime(true) - $this->mStart);
         Log::record($msg,Log::DEBUG);
     }
     public function rollback()
@@ -54,15 +54,15 @@ class trans_wapper
         } else {
             $this->mMod->rollback();
         }
-        $msg = sprintf("trans_wapper rollback {$this->mName} use_time=%.6f",microtime(true) - $this->mStart);
+        $msg = sprintf("trans_wapper rollback $this->mName use_time=%.6f",microtime(true) - $this->mStart);
         Log::record($msg,Log::DEBUG);
     }
 
     public function __destruct()
     {
         if($this->mState <= 1) {
-            $msg = sprintf("trans_wapper uncommit or unrollback {$this->mName} state={$this->mState} use_time=%.6f",microtime(true) - $this->mStart);
-            Log::record($msg,Log::ERR);
+            $msg = sprintf("trans_wapper uncommit or unrollback $this->mName state=$this->mState use_time=%.6f",microtime(true) - $this->mStart);
+            Log::record($msg, Log::ERR);
         }
     }
 }