Browse Source

book 13765 on shelf for site 7477

zz 4 năm trước cách đây
mục cha
commit
4e8e10ea90

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

@@ -30,6 +30,9 @@ class BookController extends BaseController
         if (!$book_info) {
             return response()->error('QAPP_SYS_ERROR');
         }
+        if($this->distribution_channel_id == 7477 && $bid == 13765){
+            $book_info->is_on_shelf = 2;
+        }
         if (!in_array($book_info->is_on_shelf, [2])) {
             return response()->error('QAPP_OFF_SHELF');
         }

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

@@ -129,6 +129,12 @@ class ChapterController extends BaseController
         $book_info = BookConfigService::getBookById($bid);
         if (empty($book_info))
             return response()->error('QAPP_SYS_ERROR');
+        if($this->distribution_channel_id == 7477 && $bid == 13765){
+            $book_info->is_on_shelf = 2;
+        }
+        if (!in_array($book_info->is_on_shelf, [2])) {
+            return response()->error('QAPP_OFF_SHELF');
+        }
         $this->book_info = $book_info;
         //获取章节信息
         $chapter = ChapterService::getChapterNameById($cid, $bid);
@@ -291,6 +297,10 @@ class ChapterController extends BaseController
         $book_info = BookConfigService::getBookById($bid);;
         if (empty($book_info)) response()->error('QAPP_SYS_ERROR');
 
+        if($this->distribution_channel_id == 7477 && $bid == 13765){
+            $book_info->is_on_shelf = 2;
+        }
+
         if ($book_info->is_on_shelf == 0 || $book_info->is_on_shelf == 3) {
             if (!$this->isBookOrdered($bid)) {
                 response()->error('QAPP_OFF_SHELF');