瀏覽代碼

add getByIds

visuddhinanda 1 月之前
父節點
當前提交
1ca654f764
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      api-v12/app/Http/Api/ChannelApi.php

+ 8 - 0
api-v12/app/Http/Api/ChannelApi.php

@@ -27,6 +27,14 @@ class ChannelApi
             return false;
         }
     }
+    public static function getByIds(array $ids)
+    {
+        $channels = [];
+        foreach ($ids as  $id) {
+            $channels[] = self::getById($id);
+        }
+        return $channels;
+    }
     public static function getCanReadByUser($userUuid = null)
     {
         #获取 user 在某章节 所有有权限的 channel 列表