From 1915b9558df43b2a4aee5ac62589d19a46adc7e7 Mon Sep 17 00:00:00 2001 From: guanxiying Date: Tue, 29 Jun 2021 16:44:50 +0800 Subject: [PATCH] * Add the getByIdList function in doc module. --- module/doc/model.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/module/doc/model.php b/module/doc/model.php index f330e9e424..fc6444b57b 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -405,6 +405,23 @@ class docModel extends model return $doc; } + /** + * Get docs info by id list. + * + * @param array $docIdList + * @access public + * @return array + */ + public function getByIdList($docIdList = array()) + { + return $this->dao->select('*,t1.id as docID,t1.type as docType,t2.type as contentType')->from(TABLE_DOC)->alias('t1') + ->leftJoin(TABLE_DOCCONTENT)->alias('t2')->on('t1.id=t2.doc and t1.version=t2.version') + ->where('t1.id')->in($docIdList) + ->andWhere('deleted')->eq(0) + ->fetchAll('id'); + + } + /** * Create a doc. *