Explorar el Código

默认原创书殿

zqwang hace 1 año
padre
commit
caf77ff28b
Se han modificado 2 ficheros con 12 adiciones y 3 borrados
  1. 11 2
      app/Modules/Book/Services/BookConfigService.php
  2. 1 1
      config/app.php

+ 11 - 2
app/Modules/Book/Services/BookConfigService.php

@@ -267,6 +267,9 @@ class BookConfigService
         //            $res->whereNotIn('cp_source',array_merge(getHiddenCp(),['lianshang']));
         //        }
         $res->whereNotIn('cp_source', getHiddenCp($channel_id, 2));
+        if (config('app.is_shen_he') == 1){
+            $res->where('cp_source','ycsd');
+        }
         if ($is_external_shelf) {
             $res->where('is_on_shelf', 2);
         } else {
@@ -356,6 +359,9 @@ class BookConfigService
         } else {
             $bid_list->whereIn('book_configs.is_on_shelf', [1, 2]);
         }
+        if (config('app.is_shen_he') == 1){
+            $bid_list->where('book_configs.cp_source','ycsd');
+        }
         if (!empty($no_in_bid)) {
             $bid_list->whereNotIn('book_configs.bid', $no_in_bid);
         }
@@ -437,8 +443,11 @@ class BookConfigService
             ->where('book_configs.is_on_shelf', 2)
             ->where('book_configs.charge_type', "CHAPTER")
             ->whereNotIn('book_configs.cp_source', $hide)
-            ->where('book_categories.pid', $sex)
-            ->pluck('book_configs.bid')->all();
+            ->where('book_categories.pid', $sex);
+            if (config('app.is_shen_he') == 1){
+                $bids->where('book_configs.cp_source','ycsd');
+            }
+            $bids->pluck('book_configs.bid')->all();
 
         if (empty($bids)) {
             return [];

+ 1 - 1
config/app.php

@@ -1,7 +1,7 @@
 <?php
 
 return [
-
+    'is_shen_he' => 1,
     /*
     |--------------------------------------------------------------------------
     | Application Environment