Kirin 3 years ago
parent
commit
329aec5772
1 changed files with 8 additions and 4 deletions
  1. 8 4
      app/api/controller/PublicController.php

+ 8 - 4
app/api/controller/PublicController.php

@@ -41,10 +41,14 @@ class PublicController
     public function test()
     {
         $order = StoreOrder::where('transaction_id', 'not null')->where('refund_status', 0)->where('is_del', 0)->where('is_system_del')->where('status', '>', 1)->select();
-        foreach ($order as $v) {
-            $res = MiniProgramService::profit_sharing_finish($v['transaction_id'], $v['order_id']);
-            var_dump($res);
-            exit;
+        try {
+            foreach ($order as $v) {
+                $res = MiniProgramService::profit_sharing_finish($v['transaction_id'], $v['order_id']);
+                var_dump($res);
+                exit;
+            }
+        } catch (\Exception $e) {
+            var_dump($e->getMessage());
         }
     }