...
This commit is contained in:
parent
508ba7aff0
commit
34e7209a3d
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user