objMUser = new MUser(); } /** * 获取用户列表 * @throws \Exception */ public function getAllUser() { $params = $this->request->getRawJson(); $data = [ 'page' => isset($params['page']) ? $params['page'] : 1, 'pageSize' => isset($params['pageSize']) ? $params['pageSize'] : 10, ]; $selectParams = [ 'offset' => ($data['page'] - 1) * $data['pageSize'], 'limit' => $data['pageSize'], ]; $result = $this->objMUser->getAllUser($selectParams); if ($result->isSuccess()) { parent::sendOutput($result->getData()); } else { parent::sendOutput($result->getData(), ErrorCode::$dberror); } } }