...
This commit is contained in:
parent
d76f140e1b
commit
dc7946c7ff
@ -1129,7 +1129,7 @@ class ShopController extends BaseAuthedController
|
|||||||
$token_type = $goods['token_type'];
|
$token_type = $goods['token_type'];
|
||||||
$costItemId = $this->getCostItemIdByTokenType($token_type);
|
$costItemId = $this->getCostItemIdByTokenType($token_type);
|
||||||
|
|
||||||
$costItems = $this->makeCostItems($costItemId, $goods['goods_num'] * $count * $goods['price']);
|
$costItems = $this->makeCostItems($costItemId, $count * $goods['price']);
|
||||||
$lackItem = null;
|
$lackItem = null;
|
||||||
if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
||||||
$this->_rspErr(2, $this->_getLackItemErrMsg($lackItem));
|
$this->_rspErr(2, $this->_getLackItemErrMsg($lackItem));
|
||||||
@ -1138,7 +1138,7 @@ class ShopController extends BaseAuthedController
|
|||||||
|
|
||||||
|
|
||||||
$item_id = $goods['goods_id'];
|
$item_id = $goods['goods_id'];
|
||||||
$item_num = $goods['goods_num'] * $count;
|
$item_num = $goods['goods_num'];
|
||||||
|
|
||||||
$sql = "UPDATE t_shop_dailyselection SET count_$grid = count_$grid - $count WHERE idx = $idx";
|
$sql = "UPDATE t_shop_dailyselection SET count_$grid = count_$grid - $count WHERE idx = $idx";
|
||||||
$chk = $conn->execScript($sql);
|
$chk = $conn->execScript($sql);
|
||||||
@ -1149,7 +1149,7 @@ class ShopController extends BaseAuthedController
|
|||||||
$this->internalAddItem($propertyChgService, $itemMeta, $item_num, 0);
|
$this->internalAddItem($propertyChgService, $itemMeta, $item_num, 0);
|
||||||
}
|
}
|
||||||
$awardService = new services\AwardService();
|
$awardService = new services\AwardService();
|
||||||
$awardService->addItem($goods['goods_id'], $count);
|
$awardService->addItem($goods['goods_id'], $count * $item_num);
|
||||||
|
|
||||||
$this->_decItems($costItems);
|
$this->_decItems($costItems);
|
||||||
$event = [
|
$event = [
|
||||||
@ -1993,12 +1993,6 @@ class ShopController extends BaseAuthedController
|
|||||||
return phpcommon\bnToStr($ret_price);
|
return phpcommon\bnToStr($ret_price);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function Web3PriceLowFormat($price) {
|
|
||||||
$bn2 = phpcommon\bnInit('1000000000000000000');
|
|
||||||
$ret_price = phpcommon\bnDiv($price, $bn2);
|
|
||||||
return phpcommon\bnToStr($ret_price);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function countFreeBuyTimes($free_type, $id, $goods_id)
|
private function countFreeBuyTimes($free_type, $id, $goods_id)
|
||||||
{
|
{
|
||||||
$conn = myself()->_getMysql('');
|
$conn = myself()->_getMysql('');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user