zqwang 2 年之前
父節點
當前提交
6aa25fe7f4
共有 1 個文件被更改,包括 11 次插入3 次删除
  1. 11 3
      app/Http/Controllers/QuickApp/Book/ChapterController.php

+ 11 - 3
app/Http/Controllers/QuickApp/Book/ChapterController.php

@@ -286,9 +286,7 @@ class ChapterController extends BaseController
             $book_info->is_on_shelf = 0;
             $book_info->is_on_shelf = 0;
         }
         }
         // 华为整改强制下架
         // 华为整改强制下架
-        if ($this->distribution_channel_id == 13131 && in_array($bid,[13762,65327,66643])){
-            $book_info->is_on_shelf = 4;
-        }
+
 
 
         if (!in_array($book_info->is_on_shelf, [1, 2])) {
         if (!in_array($book_info->is_on_shelf, [1, 2])) {
             if ($book_info->is_on_shelf != 4) {
             if ($book_info->is_on_shelf != 4) {
@@ -304,6 +302,16 @@ class ChapterController extends BaseController
                     //是否购买过该书,购买过则不删除
                     //是否购买过该书,购买过则不删除
                     $res = BookOrderService::getRecordByuidBid($this->uid, $bid);
                     $res = BookOrderService::getRecordByuidBid($this->uid, $bid);
                 } elseif ($charge_type == 'CHAPTER') {
                 } elseif ($charge_type == 'CHAPTER') {
+                    if ($package == 13131 && in_array($bid,[13762,65327,66643])){
+                        $res  = ReadRecordService::getReadRecord($this->uid);
+                        if ($res){
+                            $res = array_column($res,null,'bid');
+                            $res = $res[$bid] ?? [];
+                        }
+                        if (is_empty($res)){
+                            return response()->error('QAPP_OFF_SHELF');
+                        }
+                    }
                     //是否购买过该书章节,购买过则不删除
                     //是否购买过该书章节,购买过则不删除
                     $res = ChapterOrderService::checkBookIsOrdered($this->uid, $bid);
                     $res = ChapterOrderService::checkBookIsOrdered($this->uid, $bid);
                 } else {
                 } else {