zhuchengjie 2 年之前
父节点
当前提交
e2d41aee60
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/Modules/Channel/Services/ChannelRecommendBooksService.php

+ 3 - 3
app/Modules/Channel/Services/ChannelRecommendBooksService.php

@@ -10,14 +10,14 @@ use App\Modules\Channel\Models\ChannelRecommendBooks;
 class ChannelRecommendBooksService
 {
 
-    static function getChannelBid()
+    static function getChannelBid($channel_id)
     {
-        return ChannelRecommendBooks::pluck('bid')->all();
+        return ChannelRecommendBooks::where('channel_id',$channel_id)->pluck('bid')->all();
     }
 
     static function getMergerBids($channel_id,$bid)
     {
-        $bids = BookConfigService::getAvailableBIdsbyBids(self::getChannelBid(),$channel_id);
+        $bids = BookConfigService::getAvailableBIdsbyBids(self::getChannelBid($channel_id),$channel_id);
         if (empty($bids)){
             return  [];
         }