瀏覽代碼

得润宝

cqp 1 月之前
父節點
當前提交
2f85a19297
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      app/Jobs/ProcessDataJob.php

+ 3 - 2
app/Jobs/ProcessDataJob.php

@@ -30,14 +30,15 @@ class ProcessDataJob implements ShouldQueue
     {
         try {
             list($bool, $msg) = $this->syncApprovedRecords($this->data);
-            if(! $bool) $this->finalDo($msg, $this->data);
+            if(! $bool) $this->finalDo($msg);
         } catch (\Throwable $e) {
             $this->finalDo("异常:" . $e->getMessage());
             $this->delete();
         }
     }
 
-    private function finalDo($msg, $record){
+    private function finalDo($msg){
+        $record = $this->data;
         Record::where('id', $record['id'])
             ->update(['result' => $msg]);
     }