wangzq 2 år sedan
förälder
incheckning
3b2f6d05f3
1 ändrade filer med 3 tillägg och 4 borttagningar
  1. 3 4
      app/Http/Controllers/QuickApp/Book/BookController.php

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

@@ -630,21 +630,20 @@ class BookController extends BaseController
             return response()->success([]);
             return response()->success([]);
         }
         }
         $user =  (new QappUserService)->getGolableUser();
         $user =  (new QappUserService)->getGolableUser();
-        // if(isset($user->uid) && !empty($user->uid) && $user->send_order_id >  0){
+        if(isset($user->uid) && !empty($user->uid) && $user->send_order_id >  0){
             $bid =  BookConfigService::getAvailableBIdsbyBids([58238,60534,63220,14500,13254,63221,63548,14022,59334,58888,63417,61701],$this->distribution_channel_id,false);
             $bid =  BookConfigService::getAvailableBIdsbyBids([58238,60534,63220,14500,13254,63221,63548,14022,59334,58888,63417,61701],$this->distribution_channel_id,false);
             if (!empty($bid)){
             if (!empty($bid)){
                 $bid = array_random($bid,4);
                 $bid = array_random($bid,4);
             }
             }
             $orderRecord = ChapterOrderService::hasUserRecord($user->uid);
             $orderRecord = ChapterOrderService::hasUserRecord($user->uid);
 
 
-            // if($orderRecord && count($bid) >=  4){
-            if( count($bid) >=  4){
+            if($orderRecord && count($bid) >=  4){
                 $where = ['is_on_shelf' => [1,2],'bids' => $bid];
                 $where = ['is_on_shelf' => [1,2],'bids' => $bid];
                 // $books = BookConfigService::getBooksByIds($bid,[],false);
                 // $books = BookConfigService::getBooksByIds($bid,[],false);
                 $books = BookConfigService::getBookLists($where,[],false);
                 $books = BookConfigService::getBookLists($where,[],false);
                 return response()->collection(new BookTransformer(), $books);
                 return response()->collection(new BookTransformer(), $books);
             }
             }
-        // }
+        }
         return response()->success([]);
         return response()->success([]);
         $where = ['is_on_shelf' => [2]];
         $where = ['is_on_shelf' => [2]];
         $where['channel_id'] = ($package === 'com.beidao.kuaiying.zsy') ? 7477 : 0;
         $where['channel_id'] = ($package === 'com.beidao.kuaiying.zsy') ? 7477 : 0;