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