소스 검색

subscribe

zz 6 년 전
부모
커밋
d67b44d68e
1개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 8 2
      app/Http/Controllers/Wap/Book/ChapterController.php

+ 8 - 2
app/Http/Controllers/Wap/Book/ChapterController.php

@@ -2,7 +2,6 @@
 
 namespace App\Http\Controllers\Wap\Book;
 
-use App\Console\Commands\YqBook;
 use App\Modules\Book\Models\DataAnalysisBookConfig;
 use App\Modules\Book\Services\BookService;
 use App\Modules\Book\Services\ChapterCommentsService;
@@ -1092,10 +1091,17 @@ class ChapterController extends BaseController
     protected function getSubscribe()
     {
         $send_order_info = null;
+        if(!$this->send_order_id && Redis::hget('channel:setting:'.$this->distribution_channel_id,'no_send_order_subscribe')){
+            return true;
+        }
         if($this->send_order_id){
             $send_order_info = SendOrderService::getById($this->send_order_id);
         }
-        if(in_array($this->distribution_channel_id,explode(',',env('INNER_CHANNEL_SUB','1'))) &&
+        $send_order_subsribe_status = Redis::hget('channel:setting:'.$this->distribution_channel_id,'send_order_subsribe');
+        if(is_null($send_order_subsribe_status)){
+            $send_order_subsribe_status = 1;
+        }
+        if($send_order_subsribe_status &&
             $send_order_info &&
             $send_order_info->promotion_type == 'EXTERNAL'
         ){