['status'], '%like%' => ['name'], ]; } // 获取列表 public function lists(): array { $field = "id,name,app_id,app_key,url,register_status,status,create_time"; return System::field($field)->where($this->searchWhere)->where('status','<>',2) ->limit($this->limitOffset, $this->limitLength) ->order('id desc') ->select()->each(function($item){ $item['status_text'] = $item->status_text; })->toArray(); } // 获取数量 public function count(): int { return System::field('id')->where($this->searchWhere)->where('status','<>',2)->count(); } }