From dc7946c7ff5e69323018d607de0ccb113c214f12 Mon Sep 17 00:00:00 2001 From: songliang Date: Fri, 14 Jul 2023 15:43:33 +0800 Subject: [PATCH] ... --- webapp/controller/ShopController.class.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 7fc430d8..1f922568 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -1129,7 +1129,7 @@ class ShopController extends BaseAuthedController $token_type = $goods['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; if (!$this->_hasEnoughItems($costItems, $lackItem)) { $this->_rspErr(2, $this->_getLackItemErrMsg($lackItem)); @@ -1138,7 +1138,7 @@ class ShopController extends BaseAuthedController $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"; $chk = $conn->execScript($sql); @@ -1149,7 +1149,7 @@ class ShopController extends BaseAuthedController $this->internalAddItem($propertyChgService, $itemMeta, $item_num, 0); } $awardService = new services\AwardService(); - $awardService->addItem($goods['goods_id'], $count); + $awardService->addItem($goods['goods_id'], $count * $item_num); $this->_decItems($costItems); $event = [ @@ -1993,12 +1993,6 @@ class ShopController extends BaseAuthedController 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) { $conn = myself()->_getMysql('');