zz 3 anni fa
parent
commit
d3b381ea32

+ 5 - 0
app/Http/Controllers/QuickApp/Book/BookController.php

@@ -30,6 +30,11 @@ class BookController extends BaseController
         if (!$book_info) {
             return response()->error('QAPP_SYS_ERROR');
         }
+        //yuyuedu、xinghe  快应用这两个cp的书屏蔽下
+        if(in_array($book_info->cp_source,['yuyuedu','xinghe'])){
+            return response()->error('QAPP_SYS_ERROR');
+        }
+
         if($this->distribution_channel_id == 7477 && $bid == 13765){
             $book_info->is_on_shelf = 2;
         }

+ 6 - 0
app/Http/Controllers/QuickApp/Book/ChapterController.php

@@ -130,6 +130,12 @@ class ChapterController extends BaseController
         $book_info = BookConfigService::getBookById($bid);
         if (empty($book_info))
             return response()->error('QAPP_SYS_ERROR');
+
+        //yuyuedu、xinghe  快应用这两个cp的书屏蔽下
+        if(in_array($book_info->cp_source,['yuyuedu','xinghe'])){
+            return response()->error('QAPP_SYS_ERROR');
+        }
+
         if($this->distribution_channel_id == 7477 && $bid == 13765){
             $book_info->is_on_shelf = 2;
         }

+ 2 - 2
app/Modules/Book/Models/BookConfig.php

@@ -162,7 +162,7 @@ class BookConfig extends Model
                 }
             }
         }
-        $res->whereNotIn('book_configs.cp_source',['wutong','wutong2','wutong3','youyan2']);
+        $res->whereNotIn('book_configs.cp_source',['wutong','wutong2','wutong3','youyan2','yuyuedu','xinghe']);
         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']);
+        $res->whereNotIn('book_configs.cp_source',['wutong','wutong2','wutong3','youyan2','yuyuedu','xinghe']);
 
         return $res->limit(30)->get();
     }