request->get(); $userId = isset($get['id']) ? $get['id'] : 0; $merchantId = $this->merchantId; $payWay = configDict::getConfig('payWayName'); $capitalTypeList = configDict::getConfig('capitalTypeList'); $user = xhUserService::getById($userId); if(empty($user) || $user['merchantId'] != $merchantId){ util::stop('访问错误'); } $query = xhUserIntegral::find(); $query->where(['merchantId' =>$merchantId,'userId' => $userId]); $query->orderBy('id desc'); $countQuery = clone $query; $pages = new Pagination(['totalCount' => $countQuery->count(),'pageSize' => 20]); $models = $query->offset($pages->offset)->limit($pages->limit)->asArray()->all(); return $this->render('user', ['models' => $models,'pages' => $pages,'user' => $user,'payWay'=>$payWay,'capitalTypeList'=>$capitalTypeList]); } }