...
This commit is contained in:
parent
c28cb72a82
commit
486962f875
@ -52,7 +52,7 @@ class ShopController extends BaseAuthedController
|
||||
$goodsList = $goodsList ? $goodsList : array();
|
||||
$buyRecordHash = ShopBuyRecord::allToHash();
|
||||
|
||||
foreach ($goodsList as $goods) {
|
||||
foreach ($goodsList as &$goods) {
|
||||
$goods['bought_times'] = 0;
|
||||
switch ($goods['limit_type']) {
|
||||
case mt\Item::DAILY_BUY_LIMIT: {
|
||||
@ -62,12 +62,12 @@ class ShopController extends BaseAuthedController
|
||||
break;
|
||||
case mt\Item::WEEKLY_BUY_LIMIT: {
|
||||
$buyRecord = getXVal($buyRecordHash, $goods['id']);
|
||||
$goodsDto['bought_times'] = $buyRecord ? $buyRecord['this_week_buy_times'] : 0;
|
||||
$goods['bought_times'] = $buyRecord ? $buyRecord['this_week_buy_times'] : 0;
|
||||
}
|
||||
break;
|
||||
case mt\Item::TOTAL_BUY_LIMIT: {
|
||||
$buyRecord = getXVal($buyRecordHash, $goods['id']);
|
||||
$goodsDto['bought_times'] = $buyRecord ? $buyRecord['total_buy_times'] : 0;
|
||||
$goods['bought_times'] = $buyRecord ? $buyRecord['total_buy_times'] : 0;
|
||||
}
|
||||
break;
|
||||
default: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user