1
This commit is contained in:
parent
1cb0754de7
commit
f3b9792c6e
@ -66,7 +66,6 @@ class Staking(object):
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['cec_rewards', 0, '该nft结算得到的ceg数量'],
|
||||
['state', 0, '0:提前赎回 1:到期赎回'],
|
||||
]
|
||||
},
|
||||
]
|
||||
|
@ -4,6 +4,8 @@ namespace models;
|
||||
|
||||
require_once("mt/Staking.php");
|
||||
|
||||
require_once("models/User.php");
|
||||
|
||||
use phpcommon\SqlHelper;
|
||||
|
||||
use mt;
|
||||
@ -66,6 +68,7 @@ class Staking extends BaseModel {
|
||||
$tokenId = $info[2];
|
||||
$startTime = $info[3];
|
||||
$stakeTime = $info[4];
|
||||
$userDb = User::findByAddress($address);
|
||||
SqlHelper::upsert(
|
||||
myself()->_getMysql(''),
|
||||
't_staking',
|
||||
@ -79,6 +82,7 @@ class Staking extends BaseModel {
|
||||
|
||||
),
|
||||
array(
|
||||
'account_id' => $userDb ? $userDb['account_id'] : '',
|
||||
'address' => $address,
|
||||
'token_id' => $tokenId,
|
||||
'token_type' => '0',
|
||||
@ -143,6 +147,7 @@ class Staking extends BaseModel {
|
||||
$tokenId = $info[2];
|
||||
$startTime = $info[3];
|
||||
$stakeTime = $info[4];
|
||||
$userDb = User::findByAddress($address);
|
||||
SqlHelper::upsert(
|
||||
myself()->_getMysql(''),
|
||||
't_staking',
|
||||
@ -158,6 +163,7 @@ class Staking extends BaseModel {
|
||||
'status' => self::REDEEM_STATUS,
|
||||
),
|
||||
array(
|
||||
'account_id' => $userDb ? $userDb['account_id'] : '',
|
||||
'address' => $address,
|
||||
'token_id' => $tokenId,
|
||||
'token_type' => '0',
|
||||
|
Loading…
x
Reference in New Issue
Block a user