getModel()->where('task_id', $taskId); if ($uid > 0) { $model = $model->where('uid', $uid); } return $model->order('step_no', 'asc')->select()->toArray(); } }