This commit is contained in:
songliang 2023-07-06 15:04:49 +08:00
parent 508ba7aff0
commit 34e7209a3d

View File

@ -593,6 +593,9 @@ class ShopController extends BaseAuthedController
);
break;
case ShopController::TOKEN_TYPE_DIAMOND:
if ($isFreeBuy) {
$need_price = 0;
}
$costItems = $this->makeCostItems($costItemId, $goods_num * $need_price);
$lackItem = null;
if (!$this->_hasEnoughItems($costItems, $lackItem)) {
@ -608,6 +611,9 @@ class ShopController extends BaseAuthedController
$awardService = new services\AwardService();
$awardService->addItem($row['goods_id'], $goods_num);
ShopBuyRecord::add($id, $goods_num);
if ($isFreeBuy) {
$this->addFreeBuyRecord($row);
}
$this->_decItems($costItems);
$goodsDto = array(
'goods_id' => $id,