浏览代码

content f

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;
         $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'])) {
         if (isset($res['data']) && $res['data'] && is_array($res['data'])) {
-
         } else {
         } else {
             return '';
             return '';
         }
         }
+
+        $local_count = Chapter::where('bid', $bid)->where('ly_chapter_id', '>', 0)->count();
+        $remote_count = 0;
+
         foreach ($res['data'] as $item1) {
         foreach ($res['data'] as $item1) {
             $remote_count += count($item1['chapters']);
             $remote_count += count($item1['chapters']);
             $item1 = null;
             $item1 = null;