request->isAjax) { if (Yii::$app->request->isGet) { $hi_bei_data = HigoWallet::find() ->where(['mall_id' => $this->mall_id, 'status' => StatusEnum::ENABLED]) ->andWhere(['>', 'hi_bei', 0]) ->select('user_id, hi_bei') ->with([ 'user' => function ($query) { $query->select('id,nickname,avatar_url'); } ]) ->limit(10) ->orderBy('hi_bei DESC') ->asArray() ->all(); $hi_value_data = HigoWallet::find() ->where(['mall_id' => $this->mall_id, 'status' => StatusEnum::ENABLED]) ->andWhere(['>', 'hi_value', 0]) ->select('user_id, hi_value') ->with([ 'user' => function ($query) { $query->select('id,nickname,avatar_url'); } ]) ->limit(10) ->orderBy('hi_value DESC') ->asArray() ->all(); //嗨呗 $total = HigoMall::getOne([['mall_id' => $this->mall_id], ['status' => StatusEnum::ENABLED]],true); $log = HigoHibeiLog::find()->where(['mall_id' => $this->mall_id,'from_type' => HigoHibeiLog::FROM_TYPE_AIRDROP,'status' => StatusEnum::ENABLED])->andWhere(['>','created_at',strtotime(date('Y-m-d'))])->one(); $total['airdrops_today'] = $log['change_num'] ?? 0; $update_time = date('Y-m-d H:i:s'); return $this->success('success', compact('hi_bei_data', 'hi_value_data','total', 'update_time')); } } return $this->render('index', []); } }