...
This commit is contained in:
parent
f3d5a2e26a
commit
92b90f2b2a
@ -875,8 +875,8 @@ class MarketController extends BaseController {
|
||||
$durability_filter = getReqVal('durability_filter', 0);
|
||||
|
||||
$rows = $this->getNftListByAccountAndType($account, $type, $order_method, $order_asc, $job_filter_array, $search_filter_array, $lv_filter, $quality_filter, $durability_filter);
|
||||
|
||||
$total = count($rows);
|
||||
|
||||
$total = count($rows);
|
||||
$page_end = $start + $page_size;
|
||||
if ($page_end > $total) {
|
||||
$page_end = $total;
|
||||
|
@ -76,6 +76,9 @@ class ShopController extends BaseAuthedController
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (empty($goods['goods_num'])) {
|
||||
$goods['goods_num'] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$this->_rspData(
|
||||
@ -117,6 +120,9 @@ class ShopController extends BaseAuthedController
|
||||
return;
|
||||
}
|
||||
|
||||
// 这里命名混乱了, 购买个数,一捆个数命名冲突
|
||||
$goods_count = $row['goods_num'];
|
||||
|
||||
$buyRecordHash = ShopBuyRecord::allToHash();
|
||||
$boughtTimes = 1;
|
||||
switch ($row['limit_type']) {
|
||||
@ -194,7 +200,7 @@ class ShopController extends BaseAuthedController
|
||||
$itemMeta = mt\Item::get($row['goods_id']);
|
||||
$propertyChgService = new services\PropertyChgService();
|
||||
for ($i = 0; $i < $goods_num; $i++) {
|
||||
$this->internalAddItem($propertyChgService, $itemMeta);
|
||||
$this->internalAddItem($propertyChgService, $itemMeta, $goods_count);
|
||||
}
|
||||
$awardService = new services\AwardService();
|
||||
$awardService->addItem($row['goods_id'], $goods_num);
|
||||
@ -441,7 +447,7 @@ class ShopController extends BaseAuthedController
|
||||
return;
|
||||
}
|
||||
$this->_decItems($costItems);
|
||||
$this->internalAddItem($propertyChgService, $itemMeta);
|
||||
$this->internalAddItem($propertyChgService, $itemMeta, 1);
|
||||
$awardService = new services\AwardService();
|
||||
$awardService->addItem($itemId, $itemNum);
|
||||
ShopBuyRecord::add($itemId, $itemNum);
|
||||
@ -575,7 +581,7 @@ class ShopController extends BaseAuthedController
|
||||
return;
|
||||
}
|
||||
$this->_decItems($costItems);
|
||||
$this->internalAddItem($propertyChgService, $itemMeta);
|
||||
$this->internalAddItem($propertyChgService, $itemMeta, 1);
|
||||
$awardService = new services\AwardService();
|
||||
$awardService->addItem($itemId, $itemNum);
|
||||
ShopBuyRecord::add($itemId, $itemNum);
|
||||
@ -690,7 +696,7 @@ class ShopController extends BaseAuthedController
|
||||
return $costItems;
|
||||
}
|
||||
|
||||
private function internalAddItem($propertyChgService, $itemMeta)
|
||||
private function internalAddItem($propertyChgService, $itemMeta, $count)
|
||||
{
|
||||
switch ($itemMeta['type']) {
|
||||
case mt\Item::HERO_TYPE: {
|
||||
@ -720,7 +726,7 @@ class ShopController extends BaseAuthedController
|
||||
}
|
||||
break;
|
||||
default: {
|
||||
Bag::addItem($itemMeta['id'], 1);
|
||||
Bag::addItem($itemMeta['id'], $count);
|
||||
$propertyChgService->addBagChg();
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user