|
@@ -162,7 +162,7 @@ class BookConfig extends Model
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $res->whereNotIn('book_configs.cp_source',['wutong','wutong2','wutong3','youyan2','yuyuedu','xinghe','dingtian','dingtian3']);
|
|
|
+ $res->whereNotIn('book_configs.cp_source',getHiddenCp());
|
|
|
return $res->orderBy($order[0], $order[1])->orderBy('book_configs.updated_at', 'desc')->paginate($page_size);
|
|
|
}
|
|
|
|
|
@@ -224,7 +224,7 @@ class BookConfig extends Model
|
|
|
$field = 'bid,' . $str;
|
|
|
$res->orderBy(DB::raw('field(' . $field . ')'));
|
|
|
}
|
|
|
- $res->whereNotIn('book_configs.cp_source',['wutong','wutong2','wutong3','youyan2','yuyuedu','xinghe','dingtian','dingtian3']);
|
|
|
+ $res->whereNotIn('book_configs.cp_source',getHiddenCp());
|
|
|
|
|
|
return $res->limit(30)->get();
|
|
|
}
|
|
@@ -399,6 +399,7 @@ class BookConfig extends Model
|
|
|
->where('book_configs.bid', '!=', $bid)
|
|
|
->where('book_configs.is_high_quality', 1)
|
|
|
->where('book_configs.is_on_shelf', 2)
|
|
|
+ ->whereNotIn('book_configs.cp_source',getHiddenCp())
|
|
|
->orderBy('recommend_index', 'desc')->get();
|
|
|
$count = $res->count() >= $num ? $num : $res->count();
|
|
|
return $res->random($count);
|
|
@@ -451,6 +452,7 @@ class BookConfig extends Model
|
|
|
->where('book_configs.bid', '!=', $bid)
|
|
|
->where('book_configs.is_high_quality', 1)
|
|
|
->where('book_configs.is_on_shelf', 2)
|
|
|
+ ->whereNotIn('book_configs.cp_source',getHiddenCp())
|
|
|
->orderBy('recommend_index', 'desc')->get();
|
|
|
$count = $res->count() >= $num ? $num : $res->count();
|
|
|
return $res->random($count);
|