zz 6 年 前
コミット
34677eda57
1 ファイル変更4 行追加3 行削除
  1. 4 3
      app/Console/Commands/BookUpdate.php

+ 4 - 3
app/Console/Commands/BookUpdate.php

@@ -104,13 +104,14 @@ class BookUpdate extends Command
         }
         $j = 0;
 
-        $local_count = Chapter::where('bid', $bid)->where('ly_chapter_id', '>', 0)->count();
-        $remote_count = 0;
         if (isset($res['data']) && $res['data'] && is_array($res['data'])) {
-
         } else {
             return '';
         }
+
+        $local_count = Chapter::where('bid', $bid)->where('ly_chapter_id', '>', 0)->count();
+        $remote_count = 0;
+
         foreach ($res['data'] as $item1) {
             $remote_count += count($item1['chapters']);
             $item1 = null;