From 8b076e52a999da31d189bb351abc658c6d2132b4 Mon Sep 17 00:00:00 2001 From: "X14XA\\shengli" Date: Sun, 11 May 2025 17:43:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B3=A8=E9=94=80=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 16 +++++++++++++- src/biz/AppUserLogoutRequest.php | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 src/biz/AppUserLogoutRequest.php diff --git a/README.md b/README.md index 452d7e1..87a7420 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ ### 安装 + ```shell composer require maiyoule/mqttclient_author ``` ### 配置 + ```php $manager = new MQTTManager(); //设置APPID @@ -14,6 +16,8 @@ $manager->setPrivateKey(''); ### 使用 +#### 创建 + ```php //创建MQTT用户 $request = new AppUserCreateRequest(); @@ -32,4 +36,14 @@ if (!$biz->isSuccess()) { $data = $biz->getData(); //.... print_r($data); -``` \ No newline at end of file +``` + +#### 注销登录 +```php +$request=new \cn\com\maiyoule\mqttclient\biz\AppUserLogoutRequest(); +$request->setUsername('xxxxx'); + +$biz=$manager->exec($request); + +echo sprintf('注销结果:%b',$biz->isSuccess()) +``` diff --git a/src/biz/AppUserLogoutRequest.php b/src/biz/AppUserLogoutRequest.php new file mode 100644 index 0000000..9671ca4 --- /dev/null +++ b/src/biz/AppUserLogoutRequest.php @@ -0,0 +1,36 @@ + $this->getUsername() + ]; + } + + + private string $username; + + public function getUsername(): string + { + return $this->username; + } + + public function setUsername(string $username): void + { + $this->username = $username; + } + +} \ No newline at end of file From 90f683d655ded954379f88b764ee106be90159e5 Mon Sep 17 00:00:00 2001 From: "X14XA\\shengli" Date: Sun, 11 May 2025 17:43:47 +0800 Subject: [PATCH 2/2] 1.0.3 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 825a9a8..289426e 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "maiyoule/mqttclient_author", "type": "library", "description": "MQTT管理模块操作库", - "version": "1.0.2", + "version": "1.0.3", "license": "MIT", "authors": [ {