From 8e513695c5da73741f39ac7cf13ba432caeff4c3 Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Sun, 29 Jun 2025 16:58:33 +0800 Subject: [PATCH] no message --- public/tests/hook.php | 2 + src/Services/Tg/Hook/Mod/Buchang.php | 62 ++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 src/Services/Tg/Hook/Mod/Buchang.php diff --git a/public/tests/hook.php b/public/tests/hook.php index c408fbe7..d49842b6 100644 --- a/public/tests/hook.php +++ b/public/tests/hook.php @@ -91,6 +91,8 @@ $oHttp->aData['message']['text'] = '\/user#limit 10'; $oHttp->aData['message']['text'] = '/mail#tmp'; +$oHttp->aData['message']['text'] = '/buchang#buchang 2'; + //$oHttp->aData['message']['text'] = '\/coupon#findById 3'; diff --git a/src/Services/Tg/Hook/Mod/Buchang.php b/src/Services/Tg/Hook/Mod/Buchang.php new file mode 100644 index 00000000..32fb2a74 --- /dev/null +++ b/src/Services/Tg/Hook/Mod/Buchang.php @@ -0,0 +1,62 @@ +=", $sType)->get(); + $oUser = User::where("email", "yuejiqi@tuta.io")->get(); + + $i = 0; + foreach ($oUser as $oUserRow) { + $oUserRow->transfer_enable = $oUserRow->transfer_enable + $sValue; + $oUserRow->save(); + $i++; + } + + return "影响".$i."个用户"; + + } + + + + + + public function Find($aParam) + { + +// list($sCmd, $sCode) = explode(" ", $sText, 2); + + $sCode = $aParam['aArg'][1]; + + $aData = ModelDuck::where('code', $sCode)->first()->toArray(); + + $aData['use_width'] = Tools::flowToGB($aData['use_width']).'GB'; + $aData['max_width'] = Tools::flowToGB($aData['max_width']).'GB'; + $aData['today_width'] = Tools::flowToGB($aData['today_width']).'GB'; + + $sMsg = json_encode($aData, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); + + return $sMsg; + + } + + +}