From bebb58da84edc3e2bc9e25df3bb4d0ccfef15fe1 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 5 Sep 2024 08:52:29 +0800 Subject: [PATCH] * [perf story #64139] Add appendFlowFieldsForBelong method. --- module/upgrade/model.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 0e1fe89973..49bbe9bfa6 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -9869,4 +9869,20 @@ class upgradeModel extends model } return true; } + + public function appendFlowFieldsForBelong() + { + $flows = $this->dao->select('*')->from(TABLE_WORKFLOW)->where('buildin')->eq('0')->fetchAll('id'); + if(empty($flows)) return true; + + $flowTables = $this->dao->query("SHOW tables LIKE 'zt_flow_%'")->fetchAll(PDO::FETCH_COLUMN); + $flowTableDesc = array(); + foreach($flowTables as $flowTable) + { + $desc = $this->dao->query("DESC $flowTable")->fetchAll(PDO::FETCH_ASSOC); + $flowTableDesc[$flowTable] = array_column($desc, NULL, 'Field'); + } + + return true; + } }