From ce8c4d9d4964846a49e11a3d59afbd5933ef908f Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 22 Jul 2024 15:27:39 +0800 Subject: [PATCH] 1 --- webapp/controller/OutAppMintController.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/webapp/controller/OutAppMintController.class.php b/webapp/controller/OutAppMintController.class.php index e021ab52..b4c1e0c5 100644 --- a/webapp/controller/OutAppMintController.class.php +++ b/webapp/controller/OutAppMintController.class.php @@ -29,6 +29,15 @@ class OutAppMintController extends BaseController { 'accoutn_id' => $accountId, 'uuid' => $uniid ))); + $userDb = User::find($accountId); + if (empty($userDb)) { + myself()->_rspErr(1, 'user not found'); + return; + } + if ($userDb['gold'] < 0) { + myself()->_rspErr(1, 'is valid user'); + return; + } $heroDb = Hero::findByAccountIdEx($accountId, $uniid); if (!$heroDb) { myself()->_rspErr(1, 'hero not found');