瀏覽代碼

'解除lianshang的cp屏蔽'

zhuchengjie 2 年之前
父節點
當前提交
3834557533

+ 3 - 3
app/Http/Controllers/QuickApp/Book/BookController.php

@@ -290,9 +290,9 @@ class BookController extends BaseController
     private function getCheckBooks($bid_list,$channel,$package,$is_author)
     {
         $hidden_cp = getHiddenCp();
-        if(!is_public_package($package)){
-            $hidden_cp = array_merge($hidden_cp,['lianshang']);
-        }
+//        if(!is_public_package($package)){
+//            $hidden_cp = array_merge($hidden_cp,['lianshang']);
+//        }
         //获取书本数量
         $count = count($bid_list);
         if (!$is_author){

+ 12 - 10
app/Http/Controllers/QuickApp/User/ReadRecordController.php

@@ -92,11 +92,12 @@ class ReadRecordController extends BaseController
                         $value['status'] = $val->status;
                         $value['size'] = $val->size;
                         $value['author'] = $val->author;
-                        if(is_public_package_channel_id($channel_id)){
-                            $hidden = getHiddenCp();
-                        }else{
-                            $hidden = array_merge(getHiddenCp(),['lianshang']);
-                        }
+//                        if(is_public_package_channel_id($channel_id)){
+//                            $hidden = getHiddenCp();
+//                        }else{
+//                            $hidden = array_merge(getHiddenCp(),['lianshang']);
+//                        }
+                        $hidden = getHiddenCp();
                         if((!$year_account && !in_array($val->is_on_shelf,[1,2])) || in_array($val->cp_source,$hidden)){
                             //获取书籍充值类型
                             $charge_type = $val->charge_type;
@@ -162,11 +163,12 @@ class ReadRecordController extends BaseController
                     $value['status'] =  $info['status'];
                     $value['size'] =  $info['size'];
                     $value['author'] =  $info['author'];
-                    if(is_public_package_channel_id($channel_id)){
-                        $hidden = getHiddenCp();
-                    }else{
-                        $hidden = array_merge(getHiddenCp(),['lianshang']);
-                    }
+//                    if(is_public_package_channel_id($channel_id)){
+//                        $hidden = getHiddenCp();
+//                    }else{
+//                        $hidden = array_merge(getHiddenCp(),['lianshang']);
+//                    }
+                    $hidden = getHiddenCp();
                     if((!$year_account && !in_array( $info['is_on_shelf'],[1,2])) || in_array( $info['cp_source'],$hidden)){
                         //获取书籍充值类型
                         $charge_type =  $info['charge_type'];

+ 12 - 10
app/Modules/Book/Models/BookConfig.php

@@ -165,11 +165,12 @@ class BookConfig extends Model
                 }
             }
         }
-        if(isset($where['channel_id']) &&  is_public_package_channel_id($where['channel_id'])){
-            $res->whereNotIn('book_configs.cp_source',getHiddenCp());
-        }else{
-            $res->whereNotIn('book_configs.cp_source',array_merge(getHiddenCp(),['lianshang']));
-        }
+//        if(isset($where['channel_id']) &&  is_public_package_channel_id($where['channel_id'])){
+//            $res->whereNotIn('book_configs.cp_source',getHiddenCp());
+//        }else{
+//            $res->whereNotIn('book_configs.cp_source',array_merge(getHiddenCp(),['lianshang']));
+//        }
+        $res->whereNotIn('book_configs.cp_source',getHiddenCp());
 
         return $res->orderBy($order[0], $order[1])->orderBy('book_configs.updated_at', 'desc')->paginate($page_size);
     }
@@ -294,12 +295,13 @@ class BookConfig extends Model
             $field = 'bid,' . $str;
             $res->orderBy(DB::raw('field(' . $field . ')'));
         }
-        if(isset($where['channel_id']) && is_public_package_channel_id($where['channel_id'])){
-            $res->whereNotIn('book_configs.cp_source',getHiddenCp());
-        }else{
-            $res->whereNotIn('book_configs.cp_source',array_merge(getHiddenCp(),['lianshang']));
-        }
+//        if(isset($where['channel_id']) && is_public_package_channel_id($where['channel_id'])){
+//            $res->whereNotIn('book_configs.cp_source',getHiddenCp());
+//        }else{
+//            $res->whereNotIn('book_configs.cp_source',array_merge(getHiddenCp(),['lianshang']));
+//        }
 
+        $res->whereNotIn('book_configs.cp_source',getHiddenCp());
 
         return $res->limit(30)->get();
     }

+ 3 - 3
app/Modules/Book/Services/BookAuditService.php

@@ -122,9 +122,9 @@ class BookAuditService
     private static function getCheckBooks($bid_list,$channel,$package,$is_author)
     {
         $hidden_cp = getHiddenCp();
-        if(!is_public_package($package)){
-            $hidden_cp = array_merge($hidden_cp,['lianshang']);
-        }
+//        if(!is_public_package($package)){
+//            $hidden_cp = array_merge($hidden_cp,['lianshang']);
+//        }
         //获取书本数量
         $count = count($bid_list);
         $where = [

+ 9 - 8
app/Modules/Book/Services/BookConfigService.php

@@ -257,11 +257,12 @@ class BookConfigService
             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']));
-        }
+//        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{
@@ -284,9 +285,9 @@ 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']);
-        }
+//        if(!is_public_package($package)){
+//            $hidden_cp = array_merge($hidden_cp,['lianshang']);
+//        }
         //获取书本数量
         $count = count($bid_list);
         if (!$is_author){