zhuchengjie 3 роки тому
батько
коміт
3af7b16a8d
1 змінених файлів з 2 додано та 3 видалено
  1. 2 3
      app/Modules/Book/Services/BookConfigService.php

+ 2 - 3
app/Modules/Book/Services/BookConfigService.php

@@ -154,14 +154,13 @@ class BookConfigService
                 ->where('is_enabled', 1)
                 ->get();
             $bids = $free_books->pluck('bid')->all();
-            if(empty($bids)){
-                return [];
-            }
             $book_configs = BookConfig::whereIn('bid', $bids)
                 ->where('is_on_shelf', 2)
                 ->select('bid', 'book_name', 'cover')
                 ->get();
             $books = Book::whereIn('id', $bids)->select('id', 'intro')->get();
+            \Log::info('return_empty_data:');
+            \Log::info($books);
             $book_list = $book_configs->transform(function ($item) use ($books) {
                 $book = $books->where('id', $item->bid)->first();
                 return [