|
@@ -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 [
|