|
@@ -257,17 +257,19 @@ class BookConfigService
|
|
|
if (empty($bids)) {
|
|
|
return [];
|
|
|
}
|
|
|
- $res = BookConfig::whereIn('bid', $bids);
|
|
|
- // if($channel_id == config('qapp_public_package_channel')){
|
|
|
- // $res->whereNotIn('cp_source',getHiddenCp());
|
|
|
- // }else{
|
|
|
- // $res->whereNotIn('cp_source',array_merge(getHiddenCp(),['lianshang']));
|
|
|
- // }
|
|
|
- $res->whereNotIn('cp_source', getHiddenCp());
|
|
|
- if ($is_external_shelf) {
|
|
|
- $res->where('is_on_shelf', 2);
|
|
|
- } else {
|
|
|
- $res->whereIn('is_on_shelf', [1, 2]);
|
|
|
+
|
|
|
+ $res = BookConfig::whereIn('bid',$bids);
|
|
|
+// if($channel_id == config('qapp_public_package_channel')){
|
|
|
+// $res->whereNotIn('cp_source',getHiddenCp());
|
|
|
+// }else{
|
|
|
+// $res->whereNotIn('cp_source',array_merge(getHiddenCp(),['lianshang']));
|
|
|
+// }
|
|
|
+ $res->whereNotIn('cp_source',getHiddenCp($channel_id,2));
|
|
|
+ if ($is_external_shelf){
|
|
|
+ $res->where('is_on_shelf',2);
|
|
|
+ }else{
|
|
|
+ $res->whereIn('is_on_shelf',[1,2]);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return $res->pluck("bid")->toArray();
|
|
@@ -285,10 +287,11 @@ class BookConfigService
|
|
|
*/
|
|
|
public static function getCheckBooks($bid_list, $channel, $package, $is_author)
|
|
|
{
|
|
|
- $hidden_cp = getHiddenCp();
|
|
|
- // if(!is_public_package($package)){
|
|
|
- // $hidden_cp = array_merge($hidden_cp,['lianshang']);
|
|
|
- // }
|
|
|
+
|
|
|
+ $hidden_cp = getHiddenCp($package);
|
|
|
+// if(!is_public_package($package)){
|
|
|
+// $hidden_cp = array_merge($hidden_cp,['lianshang']);
|
|
|
+// }
|
|
|
//获取书本数量
|
|
|
$count = count($bid_list);
|
|
|
if (!$is_author) {
|