This commit is contained in:
aozhiwei 2024-10-11 10:45:26 +08:00
parent 24bcbe531a
commit 6655ca2076

View File

@ -84,14 +84,13 @@ class HashRateShopController extends BaseAuthedController {
}
models\HashRate::decMyCurrentHashRate($price * $goodsNum);
models\HashRateShopBuyRecord::add($goodsMeta['id'], $goodsNum, $goodsMeta['type']);
/*
for ($i = 0; $i < $goodsNum; $i++) {
$this->internalAddItem($awardService,
$propertyChgService,
$itemMeta,
$goodsMeta['item_num']
);
}*/
}
$propertyChgService->addUserChg();
$this->_rspData(
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);
}
}