zz %!s(int64=6) %!d(string=hai) anos
pai
achega
34677eda57
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  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;