Explorar o código

'渠道列表增加状态筛选'

lh %!s(int64=3) %!d(string=hai) anos
pai
achega
2585afd380
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/Services/Channel/ChannelService.php

+ 2 - 1
src/Services/Channel/ChannelService.php

@@ -13,8 +13,9 @@ use General\Models\Channel\Channel;
 
 class ChannelService
 {
-    public function getChannelsByChannelUserIds(array $channel_user_ids)
+    public function getChannelsByChannelUserIds(array $channel_user_ids, $is_enabled)
     {
+        if ($is_enabled) return Channel::whereIn('channel_user_id', $channel_user_ids)->where('is_enabled', $is_enabled)->get();
         return Channel::whereIn('channel_user_id', $channel_user_ids)->get();
     }
 }