visuddhinanda 1 неделя назад
Родитель
Сommit
65b7f618a4
1 измененных файлов с 16 добавлено и 0 удалено
  1. 16 0
      api-v12/app/Services/PaliContentService.php

+ 16 - 0
api-v12/app/Services/PaliContentService.php

@@ -564,4 +564,20 @@ class PaliContentService
         }
         return $indexChannel;
     }
+
+    public function sentences(array $sentenceIds, array $channelIds, string $mode)
+    {
+        $query = [];
+        foreach ($sentenceIds as $id) {
+            # code...
+            $query[] = explode('-', $id);
+        }
+        $record = Sentence::select($this->selectCol)
+            ->whereIns(['book_id', 'paragraph', 'word_start', 'word_end'], $query)
+            ->whereIn('channel_uid', $channelIds)
+            ->get();
+        $indexChannel = $this->getChannelIndex($channelIds);
+        $result = $this->makeContentObj($record, $mode, $indexChannel);
+        return $result;
+    }
 }