From 8f71bf3314059f95b4acc5680ac90de8ec6d2679 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 28 Aug 2023 14:10:49 +0800 Subject: [PATCH] * Refactor getPrevKanban method. --- module/execution/model.php | 9 +++++---- module/execution/test/model/getprevkanban.php | 5 +---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 28c51d44a6..bb97f82645 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -4676,13 +4676,14 @@ class executionModel extends model } /** - * Get Prev Kanban. + * 获取上一个看板的数据。 + * Get the data from the previous Kanban. * - * @param int $executionID + * @param int $executionID * @access public - * @return array + * @return array|null */ - public function getPrevKanban($executionID) + public function getPrevKanban(int $executionID): array|null { $prevKanbans = $this->loadModel('setting')->getItem("owner=null&module=execution§ion=kanban&key=execution$executionID"); return json_decode($prevKanbans, true); diff --git a/module/execution/test/model/getprevkanban.php b/module/execution/test/model/getprevkanban.php index 16030cf6ff..ac5ecacd92 100755 --- a/module/execution/test/model/getprevkanban.php +++ b/module/execution/test/model/getprevkanban.php @@ -27,11 +27,8 @@ $task->gen(10); /** title=测试executionModel->getPrevKanban(); +timeout=0 cid=1 -pid=1 - -查询执行4数据 >> empty -保存数据后查询执行4数据 >> task1 */