diff --git a/app/Rpc/v1/NewsService.php b/app/Rpc/v1/NewsService.php index a7e1302..83cf006 100755 --- a/app/Rpc/v1/NewsService.php +++ b/app/Rpc/v1/NewsService.php @@ -48,9 +48,13 @@ class NewsService extends BaseService */ public function index(int $id, int $limit = 30, int $page = 1): array { + $relationId = [ + '11' => [1, 11], + '10' => [9, 10], + ]; $query = AppNews::formatQuery(['created_at']) ->where('is_delete', 0) - ->where('platform', $id) + ->where('platform', $relationId[$id] ?? $id) ->select(['id']) ->orderBy('id', 'desc');; $pagination = $query->paginate($limit, page: $page);