This commit is contained in:
aozhiwei 2023-06-19 13:16:54 +08:00
parent 53e9c94683
commit 45e30c08a7
2 changed files with 13 additions and 2 deletions

View File

@ -16,6 +16,13 @@ class Transaction extends BaseModel {
const PLUGIN_CHIP_ACTION_TYPE = 7;
const UNPLUG_CHIP_ACTION_TYPE = 8;
const BUY_BEGIN_ACTION_TYPE = 100;
const BUY_EXP_ACTION_TYPE = 101;
const BUY_PASS_ACTION_TYPE = 102;
const BUY_END_ACTION_TYPE = 200;
const CREATED_STATUS = 1;
const REPORTED_STATUS = 2;
const COMPLETED_STATUS = 3;

View File

@ -4,8 +4,12 @@ namespace services;
class BlockChainService {
public static function gameItemMallBuy($account, $price)
public static function gameItemMallBuy($actionType, $account, $price)
{
if (!($actionType > Transaction::BUY_BEGIN_ACTION_TYPE &&
$actionType < Transaction::BUY_END_ACTION_TYPE)) {
}
$params = array(
'c' => 'GameItemMall',
'a' => 'buy',
@ -29,7 +33,7 @@ class BlockChainService {
$transId = $rspObj['trans_id'];
Transaction::add(
$transId,
Transaction::MINT_721_ACTION_TYPE,
$actionType,
$tokenId,
$tokenType,
$itemUniId,