rabin 1 年之前
父节点
当前提交
d5f8fffd9c
共有 1 个文件被更改,包括 9 次插入7 次删除
  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);
+            }
         };
     }
 }