diff --git a/src/Services/Tg/Hook/Mod/Test.php b/src/Services/Tg/Hook/Mod/Test.php index 0f8449ded..4d7bcc96c 100644 --- a/src/Services/Tg/Hook/Mod/Test.php +++ b/src/Services/Tg/Hook/Mod/Test.php @@ -79,9 +79,15 @@ final class Test extends Base return $oUserRoot->save(); } - public function doveDown() + public function userDown($aParam) { - $oUserRoot = ModelUser::where("email", "dove")->first(); + $sUser = $aParam["aArg"][1] ?? false; + + if (!$sUser) { + return "需要arg1"; + } + + $oUserRoot = ModelUser::where("email", $sUser)->first(); $oUserRoot->u = 0; $oUserRoot->class = 1; $oUserRoot->transfer_enable = 0; @@ -97,9 +103,16 @@ final class Test extends Base return $oUserRoot->save(); } - public function doveUp() + public function userUp($aParam) { - $oUserRoot = ModelUser::where("email", "dove")->first(); + + $sUser = $aParam["aArg"][1] ?? false; + + if (!$sUser) { + return "需要arg1"; + } + + $oUserRoot = ModelUser::where("email", $sUser)->first(); $oUserRoot->u = 222; $oUserRoot->class = 2; $oUserRoot->transfer_enable = 111; @@ -115,9 +128,15 @@ final class Test extends Base return $oUserRoot->save(); } - public function doveExpire() + public function userExpire() { - $oUserRoot = ModelUser::where("email", "dove")->first(); + $sUser = $aParam["aArg"][1] ?? false; + + if (!$sUser) { + return "需要arg1"; + } + + $oUserRoot = ModelUser::where("email", $sUser)->first(); $oUserRoot->u = 222; $oUserRoot->class = 2; $oUserRoot->transfer_enable = 111;