1
This commit is contained in:
parent
24bcbe531a
commit
6655ca2076
@ -84,14 +84,13 @@ class HashRateShopController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
models\HashRate::decMyCurrentHashRate($price * $goodsNum);
|
models\HashRate::decMyCurrentHashRate($price * $goodsNum);
|
||||||
models\HashRateShopBuyRecord::add($goodsMeta['id'], $goodsNum, $goodsMeta['type']);
|
models\HashRateShopBuyRecord::add($goodsMeta['id'], $goodsNum, $goodsMeta['type']);
|
||||||
/*
|
|
||||||
for ($i = 0; $i < $goodsNum; $i++) {
|
for ($i = 0; $i < $goodsNum; $i++) {
|
||||||
$this->internalAddItem($awardService,
|
$this->internalAddItem($awardService,
|
||||||
$propertyChgService,
|
$propertyChgService,
|
||||||
$itemMeta,
|
$itemMeta,
|
||||||
$goodsMeta['item_num']
|
$goodsMeta['item_num']
|
||||||
);
|
);
|
||||||
}*/
|
}
|
||||||
$propertyChgService->addUserChg();
|
$propertyChgService->addUserChg();
|
||||||
$this->_rspData(
|
$this->_rspData(
|
||||||
array(
|
array(
|
||||||
@ -101,4 +100,21 @@ class HashRateShopController extends BaseAuthedController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function internalAddItem($awardService,
|
||||||
|
$propertyChgService,
|
||||||
|
$itemMeta,
|
||||||
|
$count
|
||||||
|
)
|
||||||
|
{
|
||||||
|
myself()->_addItems(
|
||||||
|
array(
|
||||||
|
array(
|
||||||
|
'item_id' => $itemMeta['id'],
|
||||||
|
'item_num' => $count
|
||||||
|
)
|
||||||
|
),
|
||||||
|
$awardService,
|
||||||
|
$propertyChgService);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user