1
This commit is contained in:
parent
53e9c94683
commit
45e30c08a7
@ -16,6 +16,13 @@ class Transaction extends BaseModel {
|
|||||||
const PLUGIN_CHIP_ACTION_TYPE = 7;
|
const PLUGIN_CHIP_ACTION_TYPE = 7;
|
||||||
const UNPLUG_CHIP_ACTION_TYPE = 8;
|
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 CREATED_STATUS = 1;
|
||||||
const REPORTED_STATUS = 2;
|
const REPORTED_STATUS = 2;
|
||||||
const COMPLETED_STATUS = 3;
|
const COMPLETED_STATUS = 3;
|
||||||
|
@ -4,8 +4,12 @@ namespace services;
|
|||||||
|
|
||||||
class BlockChainService {
|
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(
|
$params = array(
|
||||||
'c' => 'GameItemMall',
|
'c' => 'GameItemMall',
|
||||||
'a' => 'buy',
|
'a' => 'buy',
|
||||||
@ -29,7 +33,7 @@ class BlockChainService {
|
|||||||
$transId = $rspObj['trans_id'];
|
$transId = $rspObj['trans_id'];
|
||||||
Transaction::add(
|
Transaction::add(
|
||||||
$transId,
|
$transId,
|
||||||
Transaction::MINT_721_ACTION_TYPE,
|
$actionType,
|
||||||
$tokenId,
|
$tokenId,
|
||||||
$tokenType,
|
$tokenType,
|
||||||
$itemUniId,
|
$itemUniId,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user