kevin_zhangl %!s(int64=3) %!d(string=hai) anos
pai
achega
688db05532
Modificáronse 1 ficheiros con 9 adicións e 8 borrados
  1. 9 8
      common/helpers/Tool.php

+ 9 - 8
common/helpers/Tool.php

@@ -499,13 +499,14 @@ class Tool {
      */
     public static function approachOrderCall($call)
     {
-        LoggerTool::debug($call);
-        LoggerTool::debug($call['event']);
-        LoggerTool::debug($call['data']);
-
-        $model = new ApproachOrderCall();
-        $model->event = $call['event'];
-        $model->data = $call['data'];
-        $model->insert();
+        try {
+            $model = new ApproachOrderCall();
+            $model->event = $call['event'];
+            $model->data = $call['data'];
+            $response = $model->insert();
+            LoggerTool::info($response);
+        } catch (\Exception $e) {
+            LoggerTool::error(sprintf('[%s] [%s] [%s]', $e->getFile(), $e->getLine(), $e->getMessage()));
+        }
     }
 }