From d31184ccd3e5d83a6b5444bf2a3784cb95329bcb Mon Sep 17 00:00:00 2001 From: dingguodong Date: Tue, 29 Jun 2021 13:32:01 +0800 Subject: [PATCH] + Add func to get gitlab and project by productID. --- module/gitlab/model.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/gitlab/model.php b/module/gitlab/model.php index 1fbbaa4647..802b544688 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -478,6 +478,16 @@ class gitlabModel extends model ->fetchGroup('AID'); } + public function getProjectsByProduct($productID) + { + return $this->dao->select('AID, BID as gitlabProject')->from(TABLE_RELATION) + ->where('relation')->eq('interrated') + ->andWhere('AType')->eq('gitlab') + ->andWhere('BType')->eq('gitlabProject') + ->andWhere('product')->eq($productID) + ->fetchGroup('AID'); + } + /** * Get gitlabID and projectID. *