['id','order_status'], ]; } public function queryWhere() { // 指定用户 $propertyHeadId = PropertyHead::where('user_id',$this->userId)->value('id'); $where[] = ['property_head_id', '=', $propertyHeadId]; return $where; } public function lists(): array { $lists = PropertyOrder::where($this->searchWhere) ->where($this->queryWhere()) ->limit($this->limitOffset, $this->limitLength) ->field(['id','property_head_id','property_user_id','remark','order_status','work_id','create_time','update_time']) ->order('create_time desc') ->select() ->toArray(); return $lists; } /** * @notes 获取数量 * @return int */ public function count(): int { return PropertyOrder::where($this->searchWhere)->where($this->queryWhere())->count(); } }