* myModel: specific table of the orderBy field.

This commit is contained in:
liugang
2024-02-21 14:21:30 +08:00
parent 7112d9f7f3
commit ee128cb28e
+2 -2
View File
@@ -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;