1
This commit is contained in:
parent
1be655ea80
commit
14c57a3920
@ -648,27 +648,26 @@ class BlockChainController extends BaseAuthedController {
|
||||
$this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
||||
return;
|
||||
}
|
||||
$decFeeCb = function ($transId) use ($costItems){
|
||||
$decFeeCb = function ($transId) use ($costItems, $chipIds){
|
||||
myself()->_decItems($costItems);
|
||||
foreach ($costItems as $costItem){
|
||||
TransactionPrefee::add($transId,$costItem);
|
||||
}
|
||||
};
|
||||
foreach ($chipIds as $chipId){
|
||||
$chipDb = Chip::getChipByTokenId($chipId);
|
||||
$items = array(
|
||||
'token_id' => $chipDb['token_id'],
|
||||
'token_type' => $chipDb['chip_type'],
|
||||
'item_id' => self::TEST_ITEM_ID,
|
||||
'item_num' => $chipDb['strength_max'] - $chipDb['strength']
|
||||
);
|
||||
Chip::update($chipId,array(
|
||||
'strength'=>$chipDb['strength_max']
|
||||
));
|
||||
$decFeeCb = function ($transId) use ($items){
|
||||
|
||||
foreach ($chipIds as $chipId){
|
||||
$chipDb = Chip::getChipByTokenId($chipId);
|
||||
$items = array(
|
||||
'token_id' => $chipDb['token_id'],
|
||||
'token_type' => $chipDb['chip_type'],
|
||||
'item_id' => self::TEST_ITEM_ID,
|
||||
'item_num' => $chipDb['strength_max'] - $chipDb['strength']
|
||||
);
|
||||
Chip::update($chipId,array(
|
||||
'strength'=>$chipDb['strength_max']
|
||||
));
|
||||
TransactionPrefee::add($transId,$items);
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
$this->internalBcCall(
|
||||
|
Loading…
x
Reference in New Issue
Block a user