From ee128cb28e88f43ebe4cc5993c7f18976b373e27 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 21 Feb 2024 14:21:30 +0800 Subject: [PATCH] * myModel: specific table of the orderBy field. --- module/my/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/my/model.php b/module/my/model.php index 110367a641..51328f64b2 100644 --- a/module/my/model.php +++ b/module/my/model.php @@ -1084,7 +1084,7 @@ class myModel extends model * @access public * @return array|bool */ - public function getReviewingFlows($objectType = 'all', $orderBy = 't2.id_desc', $checkExists = false): array|bool + public function getReviewingFlows($objectType = 'all', $orderBy = 'id_desc', $checkExists = false): array|bool { if($this->config->edition != 'max') return array(); @@ -1094,7 +1094,7 @@ class myModel extends model ->beginIF($objectType != 'all')->andWhere('t2.objectType')->eq($objectType)->fi() ->andWhere('t1.account')->eq($this->app->user->account) ->andWhere('t1.status')->eq('doing') - ->orderBy($orderBy) + ->orderBy("t2.{$orderBy}") ->query(); $objectIdList = array(); while($object = $stmt->fetch()) $objectIdList[$object->objectType][$object->objectID] = $object->objectID;