|
@@ -265,6 +265,7 @@ class BookController extends BaseController
|
|
|
$book_count = BookConfig::join('books', 'book_configs.bid', '=', 'books.id')
|
|
|
->leftjoin('book_categories', 'books.category_id', 'book_categories.id')
|
|
|
->whereIn('book_configs.bid',$bid_list)
|
|
|
+ ->where('book_configs.is_on_shelf',2)
|
|
|
->whereNotIn('book_configs.cp_source',getHiddenCp())
|
|
|
->where('book_categories.pid',$channel)
|
|
|
->count();
|
|
@@ -279,12 +280,12 @@ class BookController extends BaseController
|
|
|
//获取随机的有效的书籍bid
|
|
|
$rand_bid = BookConfig::join('books', 'book_configs.bid', '=', 'books.id')
|
|
|
->leftjoin('book_categories', 'books.category_id', 'book_categories.id')
|
|
|
- ->where('book_configs.is_on_shelf',1)
|
|
|
+ ->where('book_configs.is_on_shelf',2)
|
|
|
->whereNotIn('book_configs.cp_source',getHiddenCp())
|
|
|
+ ->where('book_categories.pid',$channel)
|
|
|
->inRandomOrder()
|
|
|
->limit($supplement_count)
|
|
|
- ->where('book_categories.pid',$channel)
|
|
|
- ->get()->pluck('book_configs.bid')->toArray();
|
|
|
+ ->get()->pluck('bid')->toArray();
|
|
|
|
|
|
return array_filter(array_merge($bid_list,$rand_bid));
|
|
|
}
|