This commit is contained in:
aozhiwei 2024-07-22 15:27:39 +08:00
parent 98223c63ae
commit ce8c4d9d49

View File

@ -29,6 +29,15 @@ class OutAppMintController extends BaseController {
'accoutn_id' => $accountId, 'accoutn_id' => $accountId,
'uuid' => $uniid '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); $heroDb = Hero::findByAccountIdEx($accountId, $uniid);
if (!$heroDb) { if (!$heroDb) {
myself()->_rspErr(1, 'hero not found'); myself()->_rspErr(1, 'hero not found');