userId]; $where[] = ['number','>',0]; $where[] = ['end_time','>=',time()]; if(isset($this->params['goods_id']) && !empty($this->params['goods_id'])){ $where[] = ['goods_id','=',$this->params['goods_id']]; } return $where; } public function lists():array { return UserEquity::with(['equityConfig'])->where($this->queryWhere()) ->limit($this->limitOffset, $this->limitLength) ->order('create_time desc') ->select() ->toArray(); } public function count(): int { return UserEquity::where($this->queryWhere())->count(); } }