rabin 1 year ago
parent
commit
d5f8fffd9c
1 changed files with 9 additions and 7 deletions
  1. 9 7
      src/dai/seller/api/Test.php

+ 9 - 7
src/dai/seller/api/Test.php

@@ -36,13 +36,15 @@ class Test
     {
         while(1) {
             $order = Dever::db('order', 'seller')->find(array('seller_id' => 1, 'status' => 2));
-            $msg = 'error';
-            $update = array();
-            $update['official_msg'] = '';
-            $update['official_order_num'] = '';
-            $update['channel_callback'] = '';
-            $update['channel_callback_date'] = time();
-            Dever::load('order', 'seller')->notify($order, $msg, $update);
+            if ($order) {
+                $msg = 'error';
+                $update = array();
+                $update['official_msg'] = '';
+                $update['official_order_num'] = '';
+                $update['channel_callback'] = '';
+                $update['channel_callback_date'] = time();
+                Dever::load('order', 'seller')->notify($order, $msg, $update);
+            }
         };
     }
 }