This commit is contained in:
aozhiwei 2023-08-08 11:05:44 +08:00
parent 851b875bb0
commit 4a6df1f73a
2 changed files with 25 additions and 1 deletions

View File

@ -204,4 +204,16 @@ class BaseController {
); );
} }
public function _getAccountIdByAddress($address)
{
$row = SqlHelper::ormSelectOne(
myself()->_getMysql(''),
't_user',
array(
'address' => $address
)
);
return $row ? $row['account_id'] : null;
}
} }

View File

@ -37,7 +37,19 @@ class GameItemMarketBuyOk {
} }
Mall::buyOk($orderId, $buyer); Mall::buyOk($orderId, $buyer);
$accountId = $orderDb['seller']; $accountId = myself()->_getAccountIdByAddress($buyer);
if (empty($accountId)) {
myself()->_addLogEx('', "mallBuyOk", "error_not_found_buyer", array(
'param1' => $orderDb['order_id'],
'param2' => json_encode(array(
'item_id' => $orderDb['item_id'],
'item_num' => $orderDb['item_num'],
)),
'param3' => json_encode($orderDb),
));
myself()->_rspOk();
return;
}
$itemId = $orderDb['item_id']; $itemId = $orderDb['item_id'];
$itemNum = $orderDb['item_num']; $itemNum = $orderDb['item_num'];
myself()->_addLogEx($accountId, "mallBuyOk", "begin", array( myself()->_addLogEx($accountId, "mallBuyOk", "begin", array(